model = tf.sequential();
a = tf.layers.input({shape: [127,]});
b = tf.layers.dense({units:64, inputShape: [127,], activation: 'relu' }).apply(a)
c = tf.layers.dropout(0.5).apply(b)
d = tf.layers.dense({units:64, activation: 'relu'}).apply(c)
e = tf.layers.dropout(0.5).apply(d)
f = tf.layers.dense({units:12, activation: 'sigmoid'}).apply(e)
model = tf.model({inputs: a, outputs: f});
model.compile({
optimizer: 'rmsprop',
loss: 'meanSquaredError',
metrics: 'accuracy'
});
console.log(model.summary());
await model.fit(input1:XS[1].split(','), {main_output:YS[1].split(',')}, {epochs: 50});
这里 XS[1] 的形状是 (127,) 而 YS[1] 的形状是 (12,),我已经根据 '\n' 和 ',' 进行了拆分,但错误仍然存在。任何帮助将不胜感激!