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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modnn
3
- Version: 3.0.0
3
+ Version: 3.0.2
4
4
  Summary: Physics-Informed Modularized Neural Network for Building Energy Modeling
5
5
  Author-email: Zixin Jiang <zjiang19@syr.edu>
6
6
  License-Expression: MIT
@@ -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 emulator(self, mdl_name=None):
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.ModNN(self.args).to(self.device)
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
- print("--- %s seconds ---" % (time.time() - start_time))
846
+ return model
853
847
 
854
848
 
855
849
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modnn
3
- Version: 3.0.0
3
+ Version: 3.0.2
4
4
  Summary: Physics-Informed Modularized Neural Network for Building Energy Modeling
5
5
  Author-email: Zixin Jiang <zjiang19@syr.edu>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "modnn"
7
- version = "3.0.0"
7
+ version = "3.0.2"
8
8
  description = "Physics-Informed Modularized Neural Network for Building Energy Modeling"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.7"
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