Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# build network
model = Sequential()
# add number of layer specified
for layer in range(N_LAYERS):
model.compile(loss='mae', optimizer='adam')
# print model summary
# reshape data for training
print(f'... reshaping data for training ...')
data_train = data_reshape_for_model(data,N_TIMESTEPS,N_FEATURES)
# begin training iterations
for i in range(N_TRAIN_ITERATIONS):
print(f'... training iteration {i} ...')
model = train(model,data_train,callbacks=[LossHistory()])
# get predictions on healthy data using final trained model
yhat = predict(model,data_train)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment