Skip to content

Commit

Permalink
fix Cast bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MPolaris committed Aug 5, 2022
1 parent 56cea43 commit 46a0aaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layers/common_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ def __call__(self, inputs):
inputs[i] = tf.cast(input[i], dtype=self.tf_cast_map[self.cast_to])
else:
if isinstance(inputs, np.ndarray) or isinstance(inputs, np.generic):
inputs[i] = np_cast_op(inputs)
inputs = np_cast_op(inputs)
else:
inputs[i] = tf.cast(inputs, dtype=self.tf_cast_map[self.cast_to])
inputs = tf.cast(inputs, dtype=self.tf_cast_map[self.cast_to])

return inputs

0 comments on commit 46a0aaf

Please sign in to comment.