This commit is contained in:
nickwalton
2019-10-22 15:06:37 -06:00
parent d0042d4d47
commit 2b92b90ed6
+2 -2
View File
@@ -94,8 +94,8 @@ with tf.device('/gpu:0'):
def call(self, inputs, embed=True):
if embed:
dtype = tf.keras.backend.dtype(inputs)
if dtype != 'int32' and dtype != 'int64':
inputs = math_ops.cast(inputs, 'int32')
# if dtype != 'int32' and dtype != 'int64':
# inputs = math_ops.cast(inputs, 'int32')
return embedding_ops.embedding_lookup(self.w, inputs)
else:
return tf.tensordot(inputs, tf.transpose(self.w), 1) + self.b