in Education by
What is global_step ? why do we use '0' while setting up global_step? def training(loss,learning_rate): tf.summary.scalar('loss',loss) optimizer = tf.train.GradientDescentOptimizer(learning_rate) # Why 0 as the first parameter of the global_step tf.Variable? global_step = tf.Variable(0, name='global_step',trainable=False) train_op = optimizer.minimize(loss, global_step=global_step) return train_op does increment by one after update of variable means that global_step becomes 1? Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
It means the total number of batches a graph can see. When we use optimizer.minimize() the variable is increased by one in global_step argument. To set the values of global_step useuse tf.train.get_global_step or tf.train.get_or_create_global_step. Cheers. Go through the artificial intelligence course to get clear understanding of benefits of using Tensorflow.

Related questions

0 votes
    I was looking at the docs of TensorFlow about tf.nn.conv2d here. But I can't understand what it does or ... it raised the question. Select the correct answer from above options...
asked Jan 27, 2022 in Education by JackTerrance
0 votes
    I am having problem in understanding the difference between three optimizers for loss.I went through some documents ... differences? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    In tf.nn.max_pool of tensorflow what is the difference between 'SAME' and 'VALID'? I read in here that ... pool means in tensorflow? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    I read that regularization terms are implemented by manually adding an additional term to loss value in neural network ... it manually? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    I want to assign a value to a TensorFlow variable in Python and I am using this: import tensorflow as tf import ... do to correct this? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    I want different learning layers in different layers just like we do in Caffe. I just want to speed up the training ... can I do this? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    What does the following function do? Should I consider it as a lookup table like in skip-gram model? tf.nn. ... mod', name=None) Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    I am trying to understand the role of the Flatten function in Keras. Below is my code, which is a simple two ... flatten it? Thanks! Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I'm wondering how to calculate precision and recall measures for multiclass multilabel classification, i.e. classification ... labels? Select the correct answer from above options...
asked Jan 31, 2022 in Education by JackTerrance
0 votes
    What is the role of Flatten in Keras. I am executing the code below and it's a two layered network. The ... output is already flat? Select the correct answer from above options...
asked Jan 25, 2022 in Education by JackTerrance
0 votes
    I want my model to be trained with some classified images. They are of different sizes, so how can I train ... resizing the images? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    I am searching for the better option to save a trained model in PyTorch, these are the options I am using ... the above two functions? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    Using up-to-date Keras and Tensorflow on Ubuntu 16.04 and 14.04. For the following code: img2D = ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 23, 2022 in Education by JackTerrance
0 votes
    Suppose I have a Tensorflow tensor. How do I get the dimensions (shape) of the tensor as integer values? I ... 'Dimension' instead. Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I am new to TensorFlow. While I am reading the existing documentation, I found the term tensor really confusing. ... types of tensors? Select the correct answer from above options...
asked Jan 29, 2022 in Education by JackTerrance
...