What’s the difference of name scope and a variable scope in tensorflow?

What’s the differences between these functions? tf.variable_op_scope(values, name, default_name, initializer=None) Returns a context manager for defining an op that creates variables. This context manager validates that the given values are from the same graph, ensures that that graph is the default graph, and pushes a name scope and a variable scope. tf.op_scope(values, name, default_name=None) Returns … Read more

How to print the value of a Tensor object in TensorFlow?

I have been using the introductory example of matrix multiplication in TensorFlow. matrix1 = tf.constant([[3., 3.]]) matrix2 = tf.constant([[2.],[2.]]) product = tf.matmul(matrix1, matrix2) When I print the product, it is displaying it as a Tensor object: <tensorflow.python.framework.ops.Tensor object at 0x10470fcd0> But how do I know the value of product? The following doesn’t help: print product … Read more

Could not find a version that satisfies the requirement tensorflow

I installed the latest version of Python (3.6.4 64-bit) and the latest version of PyCharm (2017.3.3 64-bit). Then I installed some modules in PyCharm (Numpy, Pandas, etc), but when I tried installing Tensorflow it didn’t install, and I got the error message: Could not find a version that satisfies the requirement TensorFlow (from versions: ) … Read more

Disable Tensorflow debugging information

By debugging information I mean what TensorFlow shows in my terminal about loaded libraries and found devices etc. not Python errors. I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcudnn.so locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:105] … Read more

How to compile Tensorflow with SSE4.2 and AVX instructions?

This is the message received from running a script to check if Tensorflow is working: I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.so.8.0 locally I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.so.5 locally I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.so.8.0 locally I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.so.8.0 locally … Read more

What’s the difference between tf.placeholder and tf.Variable?

I’m a newbie to TensorFlow. I’m confused about the difference between tf.placeholder and tf.Variable. In my view, tf.placeholder is used for input data, and tf.Variable is used to store the state of data. This is all what I know. Could someone explain to me more in detail about their differences? In particular, when to use … Read more

How to prevent tensorflow from allocating the totality of a GPU memory?

I work in an environment in which computational resources are shared, i.e., we have a few server machines equipped with a few Nvidia Titan X GPUs each. For small to moderate size models, the 12 GB of the Titan X is usually enough for 2–3 people to run training concurrently on the same GPU. If … Read more

What is the meaning of the word logits in TensorFlow? [duplicate]

This question already has answers here: What are logits? What is the difference between softmax and softmax_cross_entropy_with_logits? (7 answers) Closed 1 year ago. In the following TensorFlow function, we must feed the activation of artificial neurons in the final layer. That I understand. But I don’t understand why it is called logits? Isn’t that a … Read more

What is the difference between ‘SAME’ and ‘VALID’ padding in tf.nn.max_pool of tensorflow?

What is the difference between ‘SAME’ and ‘VALID’ padding in tf.nn.max_pool of tensorflow? In my opinion, ‘VALID’ means there will be no zero padding outside the edges when we do max pool. According to A guide to convolution arithmetic for deep learning, it says that there will be no padding in pool operator, i.e. just … Read more