if isinstance(value, tf.Tensor):
if value.dtype is not self.native_type:
value = tf.cast(value, dtype=self.native_type)
return Int100Tensor(_crt_decompose(value))
if isinstance(value, np.ndarray):
return Int100Tensor(_crt_decompose(value))
After Change
if isinstance(value, tf.Tensor):
backing = [
tf.cast(v, dtype=INT_TYPE)
for v in _crt_decompose(value)
]
return Int100Tensor(backing)