Creates an IOHandler that passes saved model artifacts to a callback.
function handleSave(artifacts) { // ... do something with the artifacts ... return {modelArtifactsInfo: {...}, ...};}const saveResult = model.save(tf.io.withSaveHandler(handleSave)); Copy
function handleSave(artifacts) { // ... do something with the artifacts ... return {modelArtifactsInfo: {...}, ...};}const saveResult = model.save(tf.io.withSaveHandler(handleSave));
A function that accepts a ModelArtifacts and returns a promise that resolves to a SaveResult.
ModelArtifacts
SaveResult
Creates an IOHandler that passes saved model artifacts to a callback.