language-style-transfer
language-style-transfer copied to clipboard
ValueError: Tensor conversion requested dtype int32 for Tensor with dtype float64: 'Tensor("strided_slice_2/stack_1:0", dtype=float64)'
I'm running the code with python 3.6 (fixed the print syntax errors) and added a utf-8 encoding when reading the dataset (I mention this since it maybe relevant). When i try to run the code i get: Traceback (most recent call last): File "C:\Users\pc\AppData\Roaming\Python\Python35\site-packages\tensorflow\python\framework\op_def_library.py", line 510, in _apply_op_helper preferred_dtype=default_dtype) File "C:\Users\pc\AppData\Roaming\Python\Python35\site-packages\tensorflow\python\framework\ops.py", line 1022, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "C:\Users\pc\AppData\Roaming\Python\Python35\site-packages\tensorflow\python\framework\ops.py", line 866, in _TensorTensorConversionFunction (dtype.name, t.dtype.name, str(t))) ValueError: Tensor conversion requested dtype int32 for Tensor with dtype float64: 'Tensor("strided_slice_2/stack_1:0", dtype=float64)'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\language-style-transfer\code\style_transfer.py", line 228, in
I was able to solve it by changing
half = self.batch_size / 2
to
half = tf.cast((self.batch_size / 2),tf.int32)
I was able to solve it by changing
half = self.batch_size / 2
tohalf = tf.cast((self.batch_size / 2),tf.int32)
in which file ? @omrivm
style_transfer.py
@omrivm yes i found that already . But i appreciate you replying back in no time ! : D
Cheers ! : )