javascript出现问题。
在函数from tensorflow import keras
import numpy as np
X = np.array([[1,2],[3,4],[5,6], [7,8]])[...,np.newaxis]
y = np.array([3,5,7,9])[..., np.newaxis]
print(X.shape)
print(y.shape)
model = keras.models.Sequential([
keras.layers.SimpleRNN(1, input_shape=[None, 1], return_sequences=True),
])
model.compile(loss='mse', optimizer='adam')
model.summary()
model.fit(X, y, epochs = 1)
print(model.predict(X).shape)
# this fails as expected
# keras.losses.mse(model.predict(X), y)
中,已定义参数row
,但未传递给rowClass
函数evaluate
确实记录了第一个console.log,但没有记录第二个。
row