## Softmax and cross entropy

Softmax is unlike other activation functions such as tanh and sigmoid, which take one number as input and output one number. Softmax activation function takes several numbers as input and […]

Softmax is unlike other activation functions such as tanh and sigmoid, which take one number as input and output one number. Softmax activation function takes several numbers as input and […]

MNIST dataset is a frequently used image dataset for neuron network and deep learning study. How to download the MNIST dataset? import tensorflow as tf (X_train, y_train), (X_test, y_test) = […]

tf.TensorArray is a class, not a function. You can use tf.TensorArray to construct a TensorArray operation: ta = tf.TensorArray(dtype=tf.float32, size=2) Here, the tensorarray contains 2 tensors. How to get […]

Consider the following example: a=tf.constant([[1,2,3],[4,5,6]],shape=(2,3),name=”a”) b=a+1 It will produce the following graph: We can see a constant tensorflow operation has two attributes: dtype is the type of the elements stored […]

To understand the content of this chapter, we need to review the concept about gradient and gradient descent. Gradient descent algorithm was introduced in chapter 4. In that chapter, a […]

Knowing the version of Python and tensorflow currently installed on your PC is important as tensorflow may not run on the latest version of python, or you installed a 32-bit […]

The python with statement is a little strange to programmers of other languages. It is frequently occurred in tensorflow related codes like: with tf.Session() as sess: do something A new […]

The tensorflow.constant is one of the functions to create a tensor with known values. Its usage is flexible and may not be what you think. The simplest usage would be: […]

LTU(Linear Threshold Unit) \(\vec{w}=\{w_1,w_2,…,w_n\}\) is the weight vector, \(\vec{x}=\{x_1,x_2,…,x_n\}\) is an input feature vector. step(z) can be a heaviside step function which outputs 1 for z>=0, and outputs 0 for […]

To understand tensorflow computation graph, you need to know how to print or plot it. If you can visualize the computation graph, it would be easy to understand it. The […]