import tensorflow as tf

  with tf.compat.v1.Session() as sess:
    sess_graph = tf.compat.v1.Session(graph=graph, config=config)
    
    while num_remaining_images >= batch_size:
      # Reads and preprocess data
      np_images, np_labels = sess.run([images[0], labels[0]])
      np_labels -= 1
      #print(np_labels.shape)
      num_processed_images += batch_size
      num_remaining_images -= batch_size
      # Compute inference on the preprocessed data
      predictions1 = sess_graph.run(output_tensor,
                             {input_tensor: np_images})
      #predictions = predictions +1 
      #print(predictions1)
      predictions2 = tf.argmax(input=predictions1, axis=1)
      predictions = sess.run(predictions2)
      top1 += batch_size - (np.count_nonzero(predictions - np_labels))
      #print(top1/num_processed_images)
      #print(num_processed_images) 
      #print(predictions)
      #accuracy1 = tf.reduce_sum(
      #                         tf.nn.in_top_k(tf.cast(tf.Variable(predictions2), tf.float32),
      #                         tf.cast((tf.constant(np_labels), 1), tf.float32)))
      accuracy1 = tf.reduce_sum(
          input_tensor=tf.cast(tf.nn.in_top_k(predictions=tf.constant(predictions1),
              targets=tf.constant(np_labels), k=1), tf.float32))

      accuracy5 = tf.reduce_sum(
          input_tensor=tf.cast(tf.nn.in_top_k(predictions=tf.constant(predictions1),
