在tensorflow中設(shè)置保存checkpoint的最大數(shù)量實(shí)例
更新時(shí)間:2020年01月21日 09:56:53 作者:橘的皮瓜著披。
今天小編就為大家分享一篇在tensorflow中設(shè)置保存checkpoint的最大數(shù)量實(shí)例,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
1、我就廢話不多說(shuō)了,直接上代碼吧!
# Set up a RunConfig to only save checkpoints once per training cycle. run_config = tf.estimator.RunConfig(save_checkpoints_secs=1e9,keep_checkpoint_max = 10) model = tf.estimator.Estimator( model_fn=deeplab_model_focal_class_imbalance_loss_adaptive.deeplabv3_plus_model_fn, model_dir=FLAGS.model_dir, config=run_config, params={ 'output_stride': FLAGS.output_stride, 'batch_size': FLAGS.batch_size, 'base_architecture': FLAGS.base_architecture, 'pre_trained_model': FLAGS.pre_trained_model, 'batch_norm_decay': _BATCH_NORM_DECAY, 'num_classes': _NUM_CLASSES, 'tensorboard_images_max_outputs': FLAGS.tensorboard_images_max_outputs, 'weight_decay': FLAGS.weight_decay, 'learning_rate_policy': FLAGS.learning_rate_policy, 'num_train': _NUM_IMAGES['train'], 'initial_learning_rate': FLAGS.initial_learning_rate, 'max_iter': FLAGS.max_iter, 'end_learning_rate': FLAGS.end_learning_rate, 'power': _POWER, 'momentum': _MOMENTUM, 'freeze_batch_norm': FLAGS.freeze_batch_norm, 'initial_global_step': FLAGS.initial_global_step })
以上這篇在tensorflow中設(shè)置保存checkpoint的最大數(shù)量實(shí)例就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
相關(guān)文章
pandas把dataframe轉(zhuǎn)成Series,改變列中值的類(lèi)型方法
下面小編就為大家分享一篇pandas把dataframe轉(zhuǎn)成Series,改變列中值的類(lèi)型方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2018-04-04python爬蟲(chóng)利用selenium實(shí)現(xiàn)自動(dòng)翻頁(yè)爬取某魚(yú)數(shù)據(jù)的思路詳解
這篇文章主要介紹了python爬蟲(chóng)利用selenium實(shí)現(xiàn)自動(dòng)翻頁(yè)爬取某魚(yú)數(shù)據(jù)的思路詳解,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2020-12-12總結(jié)分析Python的5個(gè)硬核函數(shù)
今天看到一篇很好的 Python 博文,結(jié)合自己的經(jīng)驗(yàn)總結(jié),分享給大家一篇關(guān)于eval, exec, compile, locals, globals這些函數(shù)的文章2021-11-11詳解Python的Django框架中inclusion_tag的使用
這篇文章主要介紹了詳解Python的Django框架中inclusion_tag的使用,文中示例基于Python較早的2.x版本,希望能夠注意一下,需要的朋友可以參考下2015-07-07