我有简单的代码可以正常工作,但是我需要创建像1%的ML完成和10%的ML完成等...
trainX = np.array(features_data)
trainY = np.array(labels_data)
model = Sequential()
model.add(Dense(10, input_dim=input_dimensions, activation='relu'))
model.add(Dense(1))
model.compile(loss='mean_squared_error', optimizer='adam')
model.fit(trainX, trainY, nb_epoch=3000, batch_size=2, verbose=2)
model.save(model_location)
或者如何在纪元执行后执行一些python代码?
Epoch 1707/3000
0s - loss: 0.5908
Epoch 1708/3000
0s - loss: 0.4808
Epoch 1709/3000
// how to execute here some code on python
0s - loss: 0.7568
Epoch 1710/3000
0s - loss: 0.5906