TypeError: Expected list for 'axis' argument to 'squeeze' Op, not range(0,3).
I have no idea what this even means, I have slightly modified the file for it to work by using tips from the internet. The modification I have made is near the top of the file where I changed import tensorflow as tf
to
import tensorflow.compat.v1 as tf tf.disable_v2_behavior()
Download this file (under its responsibility) and paste into your project.
https://github.com/fo40225/tensorflow-windows-wheel/blob/master/1.4.0/py36/CPU/avx2/tensorflow-1.4.0-cp36-cp36m-win_amd64.whl
conda create --name tensorflow14 python=3.6
conda activate tensorflow14
pip install tensorflow-1.4.0-cp36-cp36m-win_amd64.whl
python gan_train.py
Next, you will have this error:
ValueError: Tried to convert 'reduction_indices' to a tensor and failed. Error: Argument must be a dense tensor: range(0, 3) - got shape [3], but wanted [].
I can fix changing:
m, v = tf.nn.moments(x, range(ndim - 1))
With this:
m, v = tf.nn.moments(x, list(range(ndim - 1)))