我正在努力让保存处理程序工作以保存我的模型。我已经查看了所有堆栈溢出和 GitHub,但没有骰子。
啊啊啊救命啊!!!大声笑提前谢谢一堆!:)
这是我的模型代码:
const tf = require('@tensorflow/tfjs');
require('@tensorflow/tfjs-node');
const model = tf.sequential();
model.add(tf.layers.dense({
units: 36,
inputShape: [13]
}));
model.add(tf.layers.dense({
units: 36,
activation: 'relu'
}));
model.add(tf.layers.dense({
units: 1,
activation: 'sigmoid'
}));
model.compile({
optimizer: 'adam',
metrics: ['accuracy'],
loss: 'meanSquaredError',
});
await model.fit(xs, ys, {
epochs: 100
}).then(info => {
console.log('Accuracy', info.history.acc);
});
await model.save(localhost())
这是我的package.json
依赖项:
"dependencies": {
"@tensorflow/tfjs-node": "^2.1.0",
"aws-sdk": "^2.695.0",
"core-js": "^3.6.5",
"node-fetch": "^2.6.0"
}
错误信息:
ValueError: Cannot find any save handlers for URL