Operating environment
Ubuntu 14.04 LTS desktop amd64
GeForce GTX 750 Ti
ASRock Z170M Pro4S [Intel Z170chipset]
TensorFlow v0.11
cuDNN v5.1 for Linux
CUDA v7.5
Python 2.7.6
IPython 5.1.0 -- An enhanced Interactive Python.
A deep learning framework called TensorFlow? Learning the code.
summary, acc = sess.run([merged, accuracy], feed_dict=feed_dict(False))
What I was concerned about above is the difficulty of source reading "What is False?" Of feed_dict (False). I want to reduce the code that depends on my memory.
I wondered if python could make a comment format like fd_dct = feed_dict (/ * train = * / False);
in C.
http://stackoverflow.com/questions/5617159/mid-line-comment-in-python
You are correct, the answer is a big fat NO. ... Actually if you break your statement into multiple lines you can.
It is also a good idea to give up the Mid-line comment and make it a comment at the end of the line.
@shiracamus suggested using named arguments. It's certainly easy to understand.
Thank you for the information.
Recommended Posts