nan error fix
All checks were successful
s434765-training/pipeline/head This commit looks good

This commit is contained in:
Karolina Oparczyk 2021-05-17 18:56:39 +02:00
parent 58d72f71c8
commit 9feb02a3b8

View File

@ -3,8 +3,6 @@ import numpy as np
from tensorflow import keras
device = 'cpu'
data = pd.read_csv("data_train", sep=',', error_bad_lines=False).dropna()
X = data.loc[:,data.columns == "2805317"].astype(int)
y = data.loc[:,data.columns == "198909"].astype(int)
@ -19,9 +17,9 @@ y = NormalizeData(y)
model = keras.Sequential([
keras.layers.Dense(32,input_dim = X.shape[1],kernel_initializer='normal', activation='relu'),
keras.layers.Dense(64,kernel_initializer='normal', activation='relu'),
keras.layers.Dense(1,kernel_initializer='normal', activation='relu'),
keras.layers.Dense(32,input_dim = X.shape[1], activation='relu'),
keras.layers.Dense(64, activation='relu'),
keras.layers.Dense(1,activation='relu'),
])
model.compile(loss='mean_absolute_error', optimizer='adam', metrics=['mean_absolute_error'])