Update 'train.py'

This commit is contained in:
Patryk Gałka 2023-05-11 21:29:38 +02:00
parent 15e6c54266
commit 32af2c39d9

View File

@ -15,15 +15,15 @@ exint.observers.append(FileStorageObserver('my_runs'))
def my_config(): def my_config():
EPOCHS = int(os.environ['EPOCHS']) EPOCHS = int(os.environ['EPOCHS'])
train_data_x = exint.open_resource('./X_train.csv', 'r') train_data_x = exint.open_resource('./X_train.csv', 'r')
games_all = train_data_x.copy()
games_predict = train_data_x.pop('User_Score')
normalize = layers.Normalization() normalize = layers.Normalization()
_run.info["epochs"] = EPOCHS _run.info["epochs"] = EPOCHS
@exint.main @exint.main
def my_main(EPOCHS, games_all, games_predict,normalize): def my_main(EPOCHS,train_data_x, normalize):
_run.info["prepare_message_ts"] = str(datetime.now()) games_all = train_data_x.copy()
games_predict = train_data_x.pop('User_Score')
normalize.adapt(games_all) normalize.adapt(games_all)
norm_games_model = tensorflow.keras.Sequential([ norm_games_model = tensorflow.keras.Sequential([
normalize, normalize,