3. When the following error is reported when the program runs, open the...\site-packages\tensorflow\python\platform\app.py file, and change the 124 lines of code _sys.exit(main(argv)) to main(argv), This modification was unsuccessful. to be solved? ? ? If anyone knows how to solve it, please leave a message! Thanks!
tensorflow version: 1.5.0
4. If you want to write the activation function for each layer as a list, and call each one in a loop, when there is None in the middle, you cannot directly actList[-1] to act on a thing, and the whole formula will become None.
Such as:
actList = [tf.nn.relu, tf.nn.relu, None]
You can directly actList[i](tf.matmul(layer_i,weights)+biases) before, but the last layer cannot be written like this, you need to judge:
if actList[-1] != None:
output = actList[-1](tf.matmul(layer_i,weights)+biases)
else:
output = tf.matmul(layer_i,weights)+biases
This is the correct way to open it! ! !
I have been working on this bug for a long time, the accuracy has not been improved, it has been nan, and the parameter adjustment has no effect. Finally found out it was the problem! ! !
2018-04-24 16:30