Attempting to run frechet_video_distance/example.py I get the error:
NotImplementedError: Cannot convert a symbolic Tensor (covariance/Size_2:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported
Ubuntu 20.04.2 LTS
tensorflow version: 2.4.1
complete traceback:
File "/home/ian/projects/frame-prediction-pytorch/fid/example.py", line 51, in <module>
tf.app.run(main)
File "/home/ian/miniconda3/envs/torch-tf/lib/python3.8/site-packages/tensorflow/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/home/ian/miniconda3/envs/torch-tf/lib/python3.8/site-packages/absl/app.py", line 303, in run
_run_main(main, args)
File "/home/ian/miniconda3/envs/torch-tf/lib/python3.8/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "/home/ian/projects/frame-prediction-pytorch/fid/example.py", line 40, in main
result = fvd.calculate_fvd(
File "/home/ian/projects/frame-prediction-pytorch/fid/frechet_video_distance.py", line 140, in calculate_fvd
return tfgan.eval.frechet_classifier_distance_from_activations(real_activations, generated_activations)
File "/home/ian/miniconda3/envs/torch-tf/lib/python3.8/site-packages/tensorflow_gan/python/eval/classifier_metrics.py", line 792, in frechet_classifier_distance_from_activations
return _frechet_classifier_distance_from_activations_helper(
File "/home/ian/miniconda3/envs/torch-tf/lib/python3.8/site-packages/tensorflow_gan/python/eval/classifier_metrics.py", line 716, in _frechet_classifier_distance_from_activations_helper
tfp.stats.covariance(activations1),)
File "/home/ian/miniconda3/envs/torch-tf/lib/python3.8/site-packages/tensorflow_probability/python/stats/sample_stats.py", line 438, in covariance
tf.ones([sample_ndims], tf.int32)),
File "/home/ian/miniconda3/envs/torch-tf/lib/python3.8/site-packages/tensorflow/python/util/dispatch.py", line 201, in wrapper
return target(*args, **kwargs)
File "/home/ian/miniconda3/envs/torch-tf/lib/python3.8/site-packages/tensorflow/python/ops/array_ops.py", line 3120, in ones
output = _constant_if_small(one, shape, dtype, name)
File "/home/ian/miniconda3/envs/torch-tf/lib/python3.8/site-packages/tensorflow/python/ops/array_ops.py", line 2804, in _constant_if_small
if np.prod(shape) < 1000:
File "<__array_function__ internals>", line 5, in prod
File "/home/ian/miniconda3/envs/torch-tf/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 3030, in prod
return _wrapreduction(a, np.multiply, 'prod', axis, dtype, out,
File "/home/ian/miniconda3/envs/torch-tf/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 87, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
File "/home/ian/miniconda3/envs/torch-tf/lib/python3.8/site-packages/tensorflow/python/framework/ops.py", line 852, in __array__
raise NotImplementedError(
NotImplementedError: Cannot convert a symbolic Tensor (covariance/Size_2:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported
Attempting to run
frechet_video_distance/example.py
I get the error:NotImplementedError: Cannot convert a symbolic Tensor (covariance/Size_2:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported
Ubuntu 20.04.2 LTS tensorflow version: 2.4.1
complete traceback:
Conda environment: