tensorflow v1 backward compatibility

AttributeError: module ‘tensorflow’ has no attribute ‘Session’ In the latest version of tensorflow, e.g 2.2.0-rc3, session is not supported. Luckily it is now provided with backward compatibility . #sess = tf.Session(graph = graph1) sess = tf.compat.v1.Session(target=”, graph=graph1, config=None) Other attributes were also not supported e.g assign, global_variables_initializer #update = tf.assign(v, v+1) update = tf.compat.v1.assign(v, v+1) […]

What is Epoch, Batch Size and Iterations?

One Epoch is when an ENTIRE dataset is passed forward and backward through the neural network only ONCE. Since, one epoch is too big to feed at once it is divided into several smaller batches of size batch_size. Iterations is the number of batches needed to complete one epoch. For example, a dataset of 1000 samples […]

What is input_data in TFLearn?

tflearn.layers.core.input_data (shape=None, placeholder=None, dtype=tf.float32, data_preprocessing=None, data_augmentation=None, name=’InputData’) In TFLearn, the input_data is the input layer to the neural network. It is used to specify how the input looks like, before adding any of the usual layer in the sequential model. For example, in the MNIST data set where a 784 array represents 28×28 images with […]