codebase/utils.py
def load_model_by_name(model, global_step):
	"""
	Load a model based on its name model.name and the checkpoint iteration step

	Args:
		model: Model: (): A model
		global_step: int: (): Checkpoint iteration
	"""
	file_path = os.path.join('checkpoints',
							 model.name,
							 'model-{:05d}.pt'.format(global_step))
	state = torch.load(file_path)
	model.load_state_dict(state)
	print("Loaded from {}".format(file_path))

	Load a model based on its name model.name and the checkpoint iteration step

	Args:
		model: Model: (): A model
		global_step: int: (): Checkpoint iteration
	
Load a model based on its name model.name and the checkpoint iteration step
Load a model based on its name model . name and the checkpoint iteration step
def load_model_by_name(model, global_step):
	file_path = os.path.join('checkpoints',
							 model.name,
							 'model-{:05d}.pt'.format(global_step))
	state = torch.load(file_path)
	model.load_state_dict(state)
	print("Loaded from {}".format(file_path))
def load_model_by_name ( model , global_step ) : file_path = os . path . join ( 'checkpoints' , model . name , 'model-{:05d}.pt' . format ( global_step ) ) state = torch . load ( file_path ) model . load_state_dict ( state ) print ( "Loaded from {}" . format ( file_path ) )
Load a model based on its name model.name and the checkpoint iteration step
Load a model based on its name model . name and the checkpoint iteration step
"""
	Load a model based on its name model.name and the checkpoint iteration step

	Args:
		model: Model: (): A model
		global_step: int: (): Checkpoint iteration
	"""
model
None
global_step
None