nsml.load

nsml.load(checkpoint, load_fn=None, session=None)

The function that load saved model. nsml.bind() only defines a save function.

Parameters
  • checkpoint (str) – defines the checkpoint of the session to be called.

  • load_fn (fn) –

    It receives function define the way of loading the model as an argument. The priority at which the load function is called is

    1. load_fn delivered to this function

    2. load function bound to nsml.bind()

    3. default load function defined by NSML.

  • session (str) – Loads the saved model from the session name.

Example

if __name__ == '__main__':
    ...
    if config.mode == 'train':
        ...
        # write down model number on checkpoint and session name that want to load.
        nsml.load(checkpoint)='model number', session='session name')