modnn 3.0.0__tar.gz → 3.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {modnn-3.0.0 → modnn-3.0.2}/PKG-INFO +1 -1
- {modnn-3.0.0 → modnn-3.0.2}/modnn/Models/ModNN_data.py +1 -1
- {modnn-3.0.0 → modnn-3.0.2}/modnn/utils.py +5 -11
- {modnn-3.0.0 → modnn-3.0.2}/modnn.egg-info/PKG-INFO +1 -1
- {modnn-3.0.0 → modnn-3.0.2}/pyproject.toml +1 -1
- {modnn-3.0.0 → modnn-3.0.2}/LICENSE +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/README.md +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/modnn/Config.py +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/modnn/Dataset.py +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/modnn/Models/BaseNN.py +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/modnn/Models/ModNN_phy.py +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/modnn/Models/ModNN_phy_back.py +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/modnn/Models/PolicyNN.py +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/modnn/Models/__init__.py +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/modnn/Play.py +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/modnn/__init__.py +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/modnn/hyper_tune.py +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/modnn/run.py +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/modnn.egg-info/SOURCES.txt +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/modnn.egg-info/dependency_links.txt +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/modnn.egg-info/requires.txt +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/modnn.egg-info/top_level.txt +0 -0
- {modnn-3.0.0 → modnn-3.0.2}/setup.cfg +0 -0
|
@@ -385,4 +385,4 @@ class ModNN_step(nn.Module):
|
|
|
385
385
|
# After get total flux, we can predict the ΔTzone, and use residual connection to predict Tzone step by step
|
|
386
386
|
E_Zone_T = input_X[:, i:i+1, [0]] + self.Zone(total_flux)
|
|
387
387
|
|
|
388
|
-
return E_Zone_T,
|
|
388
|
+
return E_Zone_T, None, (None, None, None)
|
|
@@ -820,36 +820,30 @@ class Mod:
|
|
|
820
820
|
# savemodel = os.path.join(folder_name, mdl_name)
|
|
821
821
|
# torch.save(self.control_mdl.state_dict(), savemodel)
|
|
822
822
|
|
|
823
|
-
def
|
|
824
|
-
"""
|
|
825
|
-
:param mdl_name: load an existing model or load just trained model
|
|
826
|
-
:return: model
|
|
827
|
-
"""
|
|
828
|
-
start_time = time.time()
|
|
829
|
-
print("Loading emulator model")
|
|
823
|
+
def step_mdl(self, mdl_name=None):
|
|
830
824
|
if "modnn" in self.args["modeltype"]:
|
|
831
825
|
if self.args["envelop_mdl"] == "physics":
|
|
832
826
|
model = ModNN_phy.ModNN(self.args).to(self.device)
|
|
833
827
|
else:
|
|
834
|
-
model = ModNN_data.
|
|
828
|
+
model = ModNN_data.ModNN_step(self.args).to(self.device)
|
|
835
829
|
if self.args["modeltype"] == "LSTM":
|
|
836
830
|
model = BaseNN.Baseline(self.args).to(self.device)
|
|
837
831
|
|
|
838
832
|
folder_name = ("../Saved/{}/Trained_mdl".format(self.args['save_name']) +
|
|
839
|
-
'Enco{}_Deco{}'.format(str(self.args['enLen']),str(self.args['deLen'])))
|
|
833
|
+
'Enco{}_Deco{}'.format(str(self.args['enLen']), str(self.args['deLen'])))
|
|
840
834
|
if mdl_name is None:
|
|
841
835
|
mdl_name = '{}_{}daysTest_on{}.pth'.format(self.args["modeltype"],
|
|
842
836
|
str(self.args["trainday"]),
|
|
843
837
|
self.dataset.test_start)
|
|
844
838
|
else:
|
|
845
|
-
mdl_name=mdl_name
|
|
839
|
+
mdl_name = mdl_name
|
|
846
840
|
if not os.path.exists(folder_name):
|
|
847
841
|
os.makedirs(folder_name)
|
|
848
842
|
loadmodel = os.path.join(folder_name, mdl_name)
|
|
849
843
|
model.load_state_dict(torch.load(loadmodel))
|
|
850
844
|
model.eval()
|
|
851
845
|
self.model = model
|
|
852
|
-
|
|
846
|
+
return model
|
|
853
847
|
|
|
854
848
|
|
|
855
849
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|