17

There is a little hard to guess why the case (I mean, upper case versus lower case) of constructors for variable, placeholder and constant is not the same, as below: tf.Variable(), tf.placeholder(), tf.constant().

What is the inherent difference between the variable method and the rest, that is start with an upper case letter?

user25004
  • 1,868
  • 1
  • 22
  • 47
  • 2
    Someone downvoted this without comment, so I upvoted it with this comment. I would also like to know whether there is a reason for this or if it's just different people doing different modules within tensorflow. – The Puternerd Apr 21 '17 at 07:01

1 Answers1

17

tf.constant() and tf.placeholder() are nodes in the graph (ops or operations). On the other hand tf.Variable() is a class.

And in PEP8 python style guide:

Class names should normally use the CapWords convention.

erobertc
  • 644
  • 1
  • 9
  • 20
Salvador Dali
  • 214,103
  • 147
  • 703
  • 753