Created
July 18, 2020 00:44
-
-
Save KenoLeon/9c7fa738e0f12d8fbf318f19e386b5f9 to your computer and use it in GitHub Desktop.
Train NN Keras
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def train_model(model, feature, label, epochs, batch_size): | |
| """Train Keras Model""" | |
| history = model.fit(x=feature, | |
| y=label, | |
| batch_size=batch_size, | |
| epochs=epochs) | |
| epochs = history.epoch | |
| hist = pd.DataFrame(history.history) | |
| mse = hist["mse"] | |
| return epochs, mse | |
| epochs, rmse = train_model(regressor_model, train_Features, train_Target, epochs, batch_size) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment