Skip to content

Commit d4121ee

Browse files
authored
Merge pull request #4 from levimcclenny/main
add model.save and model.load_model
2 parents 9a1303a + b164b8e commit d4121ee

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tensordiffeq/models.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ def predict(self, X_star):
180180
f_u_star = self.f_model(self.u_model, *X_star)
181181
return u_star.numpy(), f_u_star.numpy()
182182

183+
def save(self, path):
184+
self.u_model.save(path)
185+
186+
def load_model(self, path):
187+
self.u_model = tf.keras.models.load_model(path)
183188

184189
# WIP
185190
# TODO Distributed Discovery Model

0 commit comments

Comments
 (0)