facenet
facenet copied to clipboard
TypeError: true_fn and false_fn arguments to tf.cond must have the same number, type, and overall structure of return values
Hi,
I am trying to validate on lfw dataset using pretrained model 20180402-114759. [https://github.com/davidsandberg/facenet/wiki/Validate-on-lfw]
This is the run command that I use:
python3 src/validate_on_lfw.py /home/sonic/datasets/lfw/lfw_mtcnnpy_160 /home/sonic/models/facenet/20180402-114759 --distance_metric 1 --use_flipped_images --subtract_mean --use_fixed_image_standardization
While I tried to run the test, error was issued.
`Traceback (most recent call last):
File "src/validate_on_lfw.py", line 167, in
true_fn output: Tensor("truediv:0", shape=(160, 160, None), dtype=float32) false_fn output: Tensor("per_image_standardization/convert_image_1:0", shape=(160, 160, None), dtype=uint8)
Error details: Tensor("truediv:0", shape=(160, 160, None), dtype=float32) and Tensor("per_image_standardization/convert_image_1:0", shape=(160, 160, None), dtype=uint8) have different types`
I use Ubuntu 20.04, nvidia driver 510, cuda==11.6, cudnn==8.4.0, tensorflow & tensorflow-gpu==2.2.0, python==3.8.10.
What is the best way to resolve an issue like this? Many thanks in advance!