Kaggle competition: Digit Recognizer
my_encoder_exp162 = MyEncoderExp162(args_exp162)
 my_encoder_exp162.load_state_dict(torch.load(prefix + '/models/my_encoder_exp162_best.pth'))
my_encoder_exp162.to(args_exp162.device)
 my_encoder_exp162.eval() ;
my_encoder_exp166 = MyEncoderExp166(args_exp166)
 my_encoder_exp166.load_state_dict(torch.load(prefix + '/models/my_encoder_exp166_best.pth'))
my_encoder_exp166.to(args_exp166.device)
 my_encoder_exp166.eval() ;
my_encoder_exp184 = MyEncoderExp184(args_exp184)
 my_encoder_exp184.load_state_dict(torch.load(prefix + '/models/my_encoder_exp184_best.pth'))
my_encoder_exp184.to(args_exp184.device)
 my_encoder_exp184.eval() ;
my_encoder_exp218 = MyEncoderExp218(args_exp218)
 my_encoder_exp218.load_state_dict(torch.load(prefix + '/models/my_encoder_exp218_best.pth'))
my_encoder_exp218.to(args_exp218.device)
 my_encoder_exp218.eval() ;
my_encoder_exp224 = MyEncoderExp224(args_exp224)
 my_encoder_exp224.load_state_dict(torch.load(prefix + '/models/my_encoder_exp224_best.pth'))
my_encoder_exp224.to(args_exp224.device)
 my_encoder_exp224.eval() ;
my_encoder_exp222 = MyEncoderExp222(args_exp222)
 my_encoder_exp222.load_state_dict(torch.load(prefix + '/models/my_encoder_exp222_best.pth'))
my_encoder_exp222.to(args_exp222.device)
 my_encoder_exp222.eval() ;
que = pd.read_csv(prefix + '/data/questions.csv' ).astype({'question_id': 'int16', 'bundle_id': 'int16', 'correct_answer': 'int8', 'part': 'int8'})
 que_proc = pd.read_pickle(prefix + '/others/que_proc.pkl')
 que_proc_2 = pd.read_pickle(prefix + '/others/que_proc_2.pkl')
 que_onehot = pd.read_pickle(prefix + '/others/que_onehot.pkl')
 que_part_onehot = pd.read_pickle(prefix + '/others/que_part_onehot.pkl')
 lec = pd.read_csv(prefix + '/data/lectures.csv' ).astype({'lecture_id': 'int16', 'tag': 'int16', 'part': 'int8'})
 lec_map = np.load(prefix + '/others/lec_map.npy')
 lec_proc = pd.read_pickle(prefix + '/others/lec_proc.pkl')
 que_proc_int = np.load(prefix + '/others/que_proc_int.npy')
 n_sample = 400
user_map_ref = load_pickle(prefix + '/others/user_map_train.npy')
 n_users_ref = np.load(prefix + '/others/n_users_train.npy')
 r_ref_g1 = np.load(prefix + '/references/nn_content_id_history' + '_length_' + str(n_sample)+ '_train.npy')
 r_ref_g2 = np.load(prefix + '/references/nn_normed_log_timestamp_history' + '_length_' + str(n_sample)+ '_train.npy')
 r_ref_g3 = np.load(prefix + '/references/nn_correctness_history' + '_length_' + str(n_sample)+ '_train.npy')
 r_ref_g4 = np.load(prefix + '/references/nn_question_had_explanation_history' + '_length_' + str(n_sample)+ '_train.npy')
 r_ref_g5 = np.load(prefix + '/references/nn_normed_elapsed_history' + '_length_' + str(n_sample)+ '_train.npy')
 r_ref_g6 = np.load(prefix + '/references/nn_normed_modified_timedelta_history' + '_length_' + str(n_sample)+ '_train.npy')
 r_ref_g7 = np.load(prefix + '/references/nn_user_answer_history' + '_length_' + str(n_sample)+ '_train.npy')
 r_ref_g8 = np.load(prefix + '/references/nn_task_container_id_diff_history' + '_length_' + str(n_sample)+ '_train.npy')
 r_ref_g9 = np.load(prefix + '/references/nn_content_type_id_diff_history' + '_length_' + str(n_sample)+ '_train.npy')
 r_ref_g10 = np.load(prefix + '/references/nn_task_container_id_history' + '_length_' + str(n_sample)+ '_train.npy')
 r_ref_delta = np.load(prefix + '/references/timestamp_diff_train.npy')
 r_ref_delta_2 = np.load(prefix + '/references/task_container_id_diff_train.npy')
 r_ref_delta_3 = np.load(prefix + '/references/content_type_id_diff_train.npy')
 r_ref_1 = np.load(prefix + '/references/rolling_mean_sum_count_train.npy')
 r_ref_2 = np.load(prefix + '/references/rolling_mean_sum_count_for_6_tags_and_whole_tag_train.npy')
 r_ref_3 = np.load(prefix + '/references/rolling_mean_sum_count_for_part_train.npy')
 r_ref_4 = np.load(prefix + '/references/lec_rolling_count_train.npy')
 r_ref_5 = np.load(prefix + '/references/lec_part_rolling_count_train.npy')
 r_ref_6 = np.load(prefix + '/references/lec_type_of_rolling_count_train.npy')
 r_ref_7 = np.load(prefix + '/references/lec_tags_rolling_count_train.npy')
 r_ref_8 = load_pickle(prefix + '/references/rolling_mean_sum_count_for_content_id_darkness_train.npy')
 r_ref_12 = np.load(prefix + '/references/norm_rolling_count_and_cut_for_user_answer_train.npy')
 r_ref_13 = np.load(prefix + '/references/rolling_mean_for_prior_question_elapsed_time_train.npy')
 r_ref_14 = np.load(prefix + '/references/rolling_mean_for_prior_question_had_explanation_train.npy')
 r_ref_15 = np.load(prefix + '/references/rolling_sum_for_prior_question_isnull_train.npy')
 r_ref_16 = np.load(prefix + '/references/positive_rolling_mean_for_prior_question_elapsed_time_train.npy')
 r_ref_17 = np.load(prefix + '/references/negative_rolling_mean_for_prior_question_elapsed_time_train.npy')
 r_ref_18 = np.load(prefix + '/references/positive_rolling_mean_for_prior_question_had_explanation_train.npy')
 r_ref_19 = np.load(prefix + '/references/negative_rolling_mean_for_prior_question_had_explanation_train.npy')
 r_ref_20 = np.load(prefix + '/references/n_samples_rolling_mean_train.npy' )<categorify>
history = model.fit_generator(datagen.flow(X_train, y_train, batch_size=128),
epochs=50,
validation_data=datagen.flow(X_val, y_val, batch_size=128),
verbose=1,
steps_per_epoch=X_train.shape[0] // 64,
callbacks=[reduce_lr] )
<import_modules><EOS> 
predictions = model.predict_classes(X_test, verbose=0)
 submissions = pd.DataFrame({"ImageId" : list(range(1, len(predictions)+1)) , "Label" : predictions})
 submissions.to_csv("digit_recognizer.csv", index=False, header=True )