Javascript TypeError:s[p]。形状在firefox中未定义
在这里,XS[1]的形状是(127,),而YS[1]的形状是(12,),我已经根据“\n”和“,”进行了拆分,仍然存在错误。任何帮助都将不胜感激 我通过以某种方式包装输入和输出来修复它 {input1:tf.tensor(数组(XS[1].split(','))},{main_输出:tf.tensor(数组(YS[1].split(','))}Javascript TypeError:s[p]。形状在firefox中未定义,javascript,tensorflowjs-converter,Javascript,Tensorflowjs Converter,在这里,XS[1]的形状是(127,),而YS[1]的形状是(12,),我已经根据“\n”和“,”进行了拆分,仍然存在错误。任何帮助都将不胜感激 我通过以某种方式包装输入和输出来修复它 {input1:tf.tensor(数组(XS[1].split(','))},{main_输出:tf.tensor(数组(YS[1].split(','))} model = tf.sequential(); a = tf.layers.input({shape: [127,]}); b = tf.la
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});