How to save training model at each training step instead of periodic save based on time interval.? -

slim.learning.train(...) accepts two arguments pertaining to saving the model(save_interval_secs) or saving the summaries(save_summaries_secs). The problem with this API is, it only allows to save the model/summary based on some "time interval" but I need to do this based on "each step" of the training.

how to achieve this using TF-slim api.?

Here is the slim.learning train api -

def train(train_op, logdir, train_step_fn=train_step, train_step_kwargs=_USE_DEFAULT, log_every_n_steps=1, graph=None, master='', is_chief=True, global_step=None, number_of_steps=None, init_op=_USE_DEFAULT, init_feed_dict=None, local_init_op=_USE_DEFAULT, init_fn=None, ready_op=_USE_DEFAULT, summary_op=_USE_DEFAULT, **save_summaries_secs=600,** summary_writer=_USE_DEFAULT, startup_delay_steps=0, saver=None, **save_interval_secs=600,** sync_optimizer=None, session_config=None, session_wrapper=None, trace_every_n_steps=None, ignore_live_threads=False):


Slim is deprecated, and using Estimator you get full control over saving / summary frequency.

You can also set the seconds to a very small number so it always saves.


  • What is the learning curve for development on JD Edwards?
  • Different outcomes when using tf.Variable() and tf.get_variable()
  • Multi-dimensional regression with Keras
  • Equivalent for np.add.at in tensorflow
  • JSF Cannot format given Object as a Date
  • MySql - get days remaining
  • data.table replicate rows after join?
  • Visual studio alerts workspace already exists
  • How to add learning rate to summaries?
  • Can XOR be expressed using SKI combinators?
  • MRO with multiple inheritance in python
  • How to move an element within a structure, possibly with zippers?
  • @tailrec why does this method not compile with 'contains a recursive call not in tail position&
  • Fully customized Python Help Usage
  • SPARQL date range
  • Ruby 1.8.6 Array#uniq not removing duplicate hashes
  • EntLib Way to Bind “Null” Value to Parameter
  • Faster Way To Simultaneously Iterate Over Rolling Window Of Two Or More Numpy Arrays?
  • Runtime.exec() gives Error: Could not find or load main class
  • Django foreign key drop down
  • Debugging VB6 Code From Visual Studio 2010
  • Django model inheritance, filtering models
  • Diff between two dataframes in pandas
  • Grails calculated field in SQL
  • How to attach a node.js readable stream to a Sendgrid email?
  • MailKit: The IMAP server replied to the 'EXAMINE' command with a 'BAD' response
  • Is possible to count alias result on mysql
  • How to add date and time under each post in guestbook in google app engine
  • How to add a column to a Pandas dataframe made of arrays of the n-preceding values of another column
  • Does CUDA 5 support STL or THRUST inside the device code?
  • JSON with duplicate key names losing information when parsed
  • Hazelcast - OperationTimeoutException
  • Return words with double consecutive letters
  • RestKit - RKRequestDelegate does not exist
  • Revoking OAuth Access Token Results in 404 Not Found
  • Benchmarking RAM performance - UWP and C#
  • Change div Background jquery
  • Can Visual Studio XAML designer handle font family names with spaces as a resource?
  • How can I remove ASP.NET Designer.cs files?
  • Are Kotlin's Float, Int etc optimised to built-in types in the JVM? [duplicate]