handson-ml2
handson-ml2 copied to clipboard
Casting X_batch to float32
Casting X_batch
to float32
to avoid an InvalidArgumentError
, caused by X_batch
being of type uint8
instead of float32
in the tf.concat()
operation, which should result in X_fake_and_real
.
InvalidArgumentError: cannot compute ConcatV2 as input #1(zero-based) was expected to be a float tensor but is a uint8 tensor [Op:ConcatV2] name: concat
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Hi @DavidLandup0 , Thanks for the PR. However, I cannot reproduce the error you were getting. I just tried running the notebook on Colab (which currently uses TensorFlow 2.6.0) and the code worked fine, I didn't get any error (or even any warning) in this part of the notebook:
Can you reproduce the error? If so, could you please indicate which version of TF you are using? And perhaps provide a minimum code example that I can use to reproduce the problem?
Thanks again.