python - Confused about tensorflow sessions -




im working tensorflow , used tensorflow tutorial training cifar-10 network. training using monitoredsession.

with tf.train.monitoredtrainingsession(         checkpoint_dir=model_path,         hooks=[tf.train.stopatstephook(last_step=max_batches),                tf.train.nantensorhook(cross_entropy),                _loggerhook()]) mon_sess:     while not mon_sess.should_stop():         mon_sess.run(train_step) 

in last line there run(train_step). , whats nice here is, function used until max_batches reached. put own code arround this.

but want use normal session. because want use own concept of checkpoint saving , implementing validation-set.

if use normal session like

with tf.session() sess:     sess.run(initialiser..)     while(whatever):         sess.run(train_step) 

it doesnt work in monitored session. steps sess.run() not repeadly. monitored different? , how can solve that.

thanks :)





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -