开始模型训练后,<class 'set'> 在控制台显示很长一段时间,之后脚本关闭,没有开始训练,也没有保存日志
model = tensorflow.keras.Sequential([
tensorflow.keras.Input(shape=(5,), name='input_layer'),
tensorflow.keras.layers.Dense(256, activation='relu', name='hidden_layer_1'),
tensorflow.keras.layers.Dense(256, name='hidden_layer_2'),
tensorflow.keras.layers.Dense(3, name='output_layer'),])
model.compile(
optimizer='Adam',
loss='mae',
metrics=['mean_absolute_error']
)
model_checkpoint = tensorflow.keras.callbacks.ModelCheckpoint(
filepath='my_model', # путь к папке, где будет сохранена модель
monitor='val_loss',
save_best_only=True,
mode='min'
)
model.fit(
datas,
resultst,
validation_split=-.1,
epochs=10,
batch_size = 1000,
callbacks= [
model_checkpoint
]
)