From c833bd1eac94401bd00f04aa2103a20e162ca0f4 Mon Sep 17 00:00:00 2001 From: James Betker <jbetker@gmail.com> Date: Tue, 15 Sep 2020 20:57:59 -0600 Subject: [PATCH] Misc changes --- .idea/misc.xml | 2 +- .idea/mmsr.iml | 2 +- codes/data_scripts/validate_data.py | 2 +- codes/train.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index c974bd55..d9f696a7 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,5 +3,5 @@ <component name="JavaScriptSettings"> <option name="languageLevel" value="ES6" /> </component> - <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (torch-venv)" project-jdk-type="Python SDK" /> + <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (pytorch-1.7)" project-jdk-type="Python SDK" /> </project> \ No newline at end of file diff --git a/.idea/mmsr.iml b/.idea/mmsr.iml index 3bd5c1db..35f8a980 100644 --- a/.idea/mmsr.iml +++ b/.idea/mmsr.iml @@ -9,7 +9,7 @@ <excludeFolder url="file://$MODULE_DIR$/results" /> <excludeFolder url="file://$MODULE_DIR$/tb_logger" /> </content> - <orderEntry type="jdk" jdkName="Python 3.7 (torch-venv)" jdkType="Python SDK" /> + <orderEntry type="jdk" jdkName="Python 3.7 (pytorch-1.7)" jdkType="Python SDK" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="module" module-name="SwitchedConvolutions" /> </component> diff --git a/codes/data_scripts/validate_data.py b/codes/data_scripts/validate_data.py index ac7684c0..4bb2fe04 100644 --- a/codes/data_scripts/validate_data.py +++ b/codes/data_scripts/validate_data.py @@ -15,7 +15,7 @@ from skimage import io def main(): #### options parser = argparse.ArgumentParser() - parser.add_argument('-opt', type=str, help='Path to option YAML file.', default='../../options/train_mi1_spsr_switched2.yml') + parser.add_argument('-opt', type=str, help='Path to option YAML file.', default='../../options/train_feature_net.yml') parser.add_argument('--launcher', choices=['none', 'pytorch'], default='none', help='job launcher') parser.add_argument('--local_rank', type=int, default=0) diff --git a/codes/train.py b/codes/train.py index e7e8c25c..2e737d3f 100644 --- a/codes/train.py +++ b/codes/train.py @@ -160,7 +160,7 @@ def main(): start_epoch = resume_state['epoch'] current_step = resume_state['iter'] - model.resume_training(resume_state) # handle optimizers and schedulers + model.resume_training(resume_state, 'amp_opt_level' in opt.keys()) # handle optimizers and schedulers else: current_step = -1 if 'start_step' not in opt.keys() else opt['start_step'] start_epoch = 0