MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / saveModel

Method saveModel

lstm-text-generation/index.js:183–189  ·  view source on GitHub ↗

* Save the model in IndexedDB. * * @returns ModelInfo from the saving, if the saving succeeds.

()

Source from the content-addressed store, hash-verified

181 * @returns ModelInfo from the saving, if the saving succeeds.
182 */
183 async saveModel() {
184 if (this.model == null) {
185 throw new Error('Cannot save model before creating model.');
186 } else {
187 return await this.model.save(this.modelSavePath_);
188 }
189 }
190
191 /**
192 * Remove the locally saved model from IndexedDB.

Callers 1

setUpUIFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected