MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / save

Method save

ann_class2/tf_with_save.py:111–118  ·  view source on GitHub ↗
(self, filename)

Source from the content-addressed store, hash-verified

109 return 1 - error_rate(self.predict(X), Y)
110
111 def save(self, filename):
112 j = {
113 'D': self.D,
114 'K': self.K,
115 'model': self.savefile
116 }
117 with open(filename, 'w') as f:
118 json.dump(j, f)
119
120 @staticmethod
121 def load(filename):

Callers 2

mainFunction · 0.95
fitMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected