We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
at analyze.py
analyze.py
The text was updated successfully, but these errors were encountered:
def load_pretrained_model(ID: int, checkpoint: int, verbose: bool): experiment_dir = f'experiments/{ID}' with open(f'{experiment_dir}/config.json', 'r') as exp_config_file: exp_config = json.load(exp_config_file) if verbose: print(f'experiment configuration: ') pprint.pprint(exp_config) model = load_model(exp_config) for candidate in os.listdir(f'{experiment_dir}/checkpoints/'): if candidate.startswith(f'checkpoint_{checkpoint}_'): model.load_state_dict(torch.load(f'{experiment_dir}/checkpoints/{candidate}')['model']) if verbose: print(f'checkpoint: epoch @ {checkpoint} loaded successfully! return pretrained model and configuration.') return model, exp_config if verbose: print(f'checkpoint: epoch @ {checkpoint} not searched; just return skeleton and configuration.') return model, exp_config
reference model loader
Sorry, something went wrong.
Ootzk
No branches or pull requests
at
analyze.py
The text was updated successfully, but these errors were encountered: