0

Thanks for TF-Slim, it is easier to build new models

But when comes about training the model, it seems that slim.learning.train can't fetch a tensor which i need to check my model.

It can only return the loss (the training op), the code below is in tensorflow/contrib/slim/python/slim/learning.py, it shows how loss is printed.

if sess.run(train_step_kwargs['should_log']):
  logging.info('global step %d: loss = %.4f (%.3f sec/step)',
               np_global_step, total_loss, time_elapsed)

Is there some ways to fetch a tensor or just print the value of it?

ycd
  • 36
  • 1
  • 7

1 Answers1

1

Assuming that you have tensor t, then you can print it every time a graph is executed that involves using t by associating the tensor with a tf.Print() print function as follows:

t = tf.Print(t, [t])