I build a network which returns numpy arrays of the same size as the input. However this network is really slow and needs more than 10 seconds to process 12 images.
When I use tf.compat.v1.disable_eager_execution() the same network processes 12 images in less than 0.1 seconds. Now, however, the network returns tensors that I can not convert to numpy arrays. This is the output of the network when I do print(output):
Tensor("mul_20:0", shape=(12, 224, 224, 3), dtype=float32)
I tried output.numpy() and get the following error:
AttributeError: 'Tensor' object has no attribute 'numpy'
What can I do to solve this problem?