We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NameError Traceback (most recent call last) /tmp/ipykernel_7064/4009749044.py in 19 n_steps = X_train.shape[1] 20 mdl = model_train(X_train, y_train, X_val, y_val, file_path, n_features = 14, n_steps = n_steps, ---> 21 scale = scale, batch_size = batch_size, n_classes = 2,class_weights = None, 22 layers = layers, dropout = dropout, lr = lr) 23 y_pred = np.argmax(mdl.predict(X_test), axis = 1)
NameError: name 'scale' is not defined
The text was updated successfully, but these errors were encountered:
Thanks for reporting this Elliot!
Please try setting scale to a value, e.g. scale = 0.01, either before calling the model_train function, or by changing the corresponding parameter.
scale
scale = 0.01
model_train
I will also update this in the repository soon.
Thanks, George
Sorry, something went wrong.
gchoumos
No branches or pull requests
Train a custom lightweight model on the Satellite data¶
import os
lr = 0.001
sat_model_filename = "lstm_att"
if os.path.exists('models'):
os.mkdir('models')
model_path = "models/{}.h5".format(sat_model_filename)
checkpoint = ModelCheckpoint(model_path, monitor='val_loss',
verbose=1, save_best_only=True, save_weights_only=False, mode='auto')
early = EarlyStopping(monitor='val_acc', min_delta=0.001, patience=10, verbose=0, mode='auto')
reduce_lr = ReduceLROnPlateau(monitor='val_loss', factor=0.5, patience=4, min_lr=0.0001)
file_path = "data/my_data.csv"
dropout = 0.5
layers = [256, 128]
batch_size = 256
n_steps = X_train.shape[1]
mdl = model_train(X_train, y_train, X_val, y_val, file_path, n_features = 14, n_steps = n_steps,
scale = scale, batch_size = batch_size, n_classes = 2,class_weights = None,
layers = layers, dropout = dropout, lr = lr)
y_pred = np.argmax(mdl.predict(X_test), axis = 1)
print(classification_report(np.argmax(y_test, axis = 1), y_pred, digits = 4))
NameError Traceback (most recent call last)
/tmp/ipykernel_7064/4009749044.py in
19 n_steps = X_train.shape[1]
20 mdl = model_train(X_train, y_train, X_val, y_val, file_path, n_features = 14, n_steps = n_steps,
---> 21 scale = scale, batch_size = batch_size, n_classes = 2,class_weights = None,
22 layers = layers, dropout = dropout, lr = lr)
23 y_pred = np.argmax(mdl.predict(X_test), axis = 1)
NameError: name 'scale' is not defined
The text was updated successfully, but these errors were encountered: