question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Outputs of true_fn and false_fn must have the same type: float32, uint8

See original GitHub issue

Hi Thanks for this awesome project I have a problem when I try to train the model I get this error

Traceback (most recent call last): File "src/train_softmax.py", line 582, in <module> main(parse_arguments(sys.argv[1:])) File "src/train_softmax.py", line 129, in main image_batch, label_batch = facenet.create_input_pipeline(input_queue, image_size, nrof_preprocess_threads, batch_size_placeholder) File "/Users/mohammadkhaleghi/AI/facenet/src/facenet.py", line 122, in create_input_pipeline lambda:tf.image.per_image_standardization(image)) File "/opt/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func return func(*args, **kwargs) File "/opt/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/ops/control_flow_ops.py", line 1274, in cond "%s, %s" % (x.dtype.name, y.dtype.name)) ValueError: Outputs of true_fn and false_fn must have the same type: float32, uint8 any idea what can be problem?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:12

github_iconTop GitHub Comments

16reactions
pohsienLiucommented, Mar 6, 2020

This error means that your image is uint8 format, So you neet to add

 image = tf.to_float(image)

in “facenet/src/facenet.py:121”.

2reactions
pasa13142commented, Jan 27, 2020

pip install tensorflow-gpu==1.7 or 1.4 or 1.14

Read more comments on GitHub >

github_iconTop Results From Across the Web

Outputs of true_fn and false_fn must have the same type: int32 ...
K.in_train_phase requires that self.rev_entropy(x, self.beta,self.batch) and x must have the same type in this case.
Read more >
TF gives ValueError: Outputs of true_fn and false_fn must ...
I'm using the NGC docker Tensorflow 19.05 py3 image. I have cloned GitHub - tensorflow/models: Models and examples built with TensorFlow and ...
Read more >
tf.cond | TensorFlow v2.11.0
Both true_fn and false_fn must return the same (possibly nested) value structure of lists, tuples, and/or named tuples. Singleton lists and tuples form...
Read more >
Viewing online file analysis results for 'Blue Jeans Launcher.exe'
Not all malicious and suspicious indicators are displayed. Get your own cloud service or the full version to view all details. Malicious Indicators...
Read more >
Diff - platform/prebuilts/go/darwin-x86 - Google Git
+ + Clients of these APIs might need to adjust for the missing + frames. ... <code>int</code> are not the same type even...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found