-1

I have a question related in tensorflow model training.

i use DNNClassifier model.

like below..

training_model.train(
                input_fn=self.input_fn_for_training(
                    training_data_frame,
                    num_epochs=epoch,
                    shuffle=shuffle,
                    batch_size=batch_size
                ),
                steps=step                
            )

i want see progress during training.

ex) print( %s, percentage ) 10.13

i seem to use hook option.

but i don't know exatly example.

plze, give me a sample source or guide.

thanks a lot!!

INDRAJITH EKANAYAKE
  • 3,894
  • 11
  • 41
  • 63
Park.BJ
  • 163
  • 1
  • 10

1 Answers1

1

Do you see logging output currently? Every few steps it should print the current steps/second and the loss. If you don't see anything, try running tf.logging.set_verbosity(tf.logging.INFO). This will get you output like:

INFO:tensorflow:Saving checkpoints for 1 into /tmp/tmpjwner4vx/model.ckpt.
INFO:tensorflow:loss = 0.13489059, step = 1
INFO:tensorflow:global_step/sec: 293.37
INFO:tensorflow:loss = 0.00076361303, step = 101 (0.341 sec)
INFO:tensorflow:global_step/sec: 375.87
INFO:tensorflow:loss = 0.000659691, step = 201 (0.266 sec)
INFO:tensorflow:global_step/sec: 388.997
Allen Lavoie
  • 5,778
  • 1
  • 17
  • 26