Closed sarmadm closed 5 years ago
Hi
I'm using below model with talos :
my input is alist of sevent arrays like this
`X_train = [ f0_train_tw, f1_train_tw, f2_train_tw, f3_train_tw , f4_one_tr, f5_train_preds , f6_train]
Y_train = [Y_oh_tr, Ymrs_train, Y_oh_tr]
and test
X_test = [ f0_test_tw, f1_test_tw, f2_test_tw, f3_test_tw , f4_test_tr, f5_test_preds , f6_test]
def my_model( x_train, y_train, x_val, y_val, params ): . . .
loss = dict( m_out_reg= 'mse', out_bias = 'categorical_crossentropy', out_reg2clf= 'categorical_crossentropy' ) metrics = dict( m_out_reg = 'mae', out_bias = 'accuracy', out_reg2clf = 'accuracy' ) loss_weights = dict( m_out_reg = 20, out_bias = 1, out_reg2clf=1 ) model.compile(optimizer=opti, loss=loss, metrics=metrics, loss_weights=loss_weights) pth_r = 'drive/Colab_Notebooks/dnn_logs/5400/checkpoint_r_con_seq_rnn.hdf5' pth_c = 'drive/Colab_Notebooks/dnn_logs/5400/checkpoint_c_con_seq_rnn.hdf5' pth_r2c = 'drive/Colab_Notebooks/dnn_logs/5400/checkpoint_r2c_con_seq_rnn.hdf5' reduceLR = ReduceLROnPlateau(monitor='loss', factor=0.42, patience=9, verbose=1, mode='auto', cooldown=10) chkpt_c = ModelCheckpoint(pth_c, monitor='val_out_bias_acc', mode='max', verbose=2, save_best_only=True, save_weights_only=True, period=1) chkpt_r = ModelCheckpoint(pth_r, monitor='val_m_out_reg_mean_absolute_error', mode='min', verbose=2, save_best_only=True, save_weights_only=True, period=1) chkpt_r2c = ModelCheckpoint(pth_r2c, monitor='val_out_reg2clf_acc', mode='max', verbose=2, save_best_only=True, save_weights_only=True, period=1) out = model.fit( x= [X_train[0] ,X_train[1],X_train[2] ,X_train[3] ,X_train[4] ,X_train[5] ,X_train[6]] , y=Y_train, epochs=150, batch_size=params['batch_size'], validation_data = [[X_test[0] ,X_test[1] ,X_test[2] ,X_test[3] ,X_test[4] ,X_test[5] ,X_test[6]], Y_test], callbacks = [chkpt_r, chkpt_c, chkpt_r2c, reduceLR] , class_weight =class_weight)
`
Then I call talos like this :
ta.Scan(X_train, Y_train , p, input_model, x_val=X_test , y_val=Y_test )
I get this error :
`AttributeError Traceback (most recent call last)
Maybe this is useful for you #154. Once that is resolved, also your case is resolved.
This is now resolved in daily dev. See #154 for more details. Closing here.
Hi
I'm using below model with talos :
my input is alist of sevent arrays like this
`X_train = [ f0_train_tw, f1_train_tw, f2_train_tw, f3_train_tw , f4_one_tr, f5_train_preds , f6_train]
Y_train = [Y_oh_tr, Ymrs_train, Y_oh_tr]
and test
X_test = [ f0_test_tw, f1_test_tw, f2_test_tw, f3_test_tw , f4_test_tr, f5_test_preds , f6_test]
Y_train = [Y_oh_tr, Ymrs_train, Y_oh_tr]
def my_model( x_train, y_train, x_val, y_val, params ): . . .
`
Then I call talos like this :
ta.Scan(X_train, Y_train , p, input_model, x_val=X_test , y_val=Y_test )
I get this error :
`AttributeError Traceback (most recent call last)