Exemple #1
0
    test_norm = test.astype('float32')
    # normalize to range 0-1
    train_norm = train_norm / 255.0
    test_norm = test_norm / 255.0
    # return normalized images
    return train_norm, test_norm


# prepare pixel data
trainX, testX = prep_pixels(trainX, testX)

hp = HP()
hp.save_path = 'saved_runs'

hp.description = "syclop micro feature learning runs"
hp.this_run_name = 'micro_{}'.format(run_index)
deploy_logs()
#%%
############################### Get Trained Teacher ##########################3
path = '/home/orram/Documents/GitHub/imagewalker/teacher_student/'
path = '/home/labs/ahissarlab/orra/imagewalker/teacher_student/'


def train_model(path, trainX, trainY):
    def net():
        input = keras.layers.Input(shape=(32, 32, 3))

        #Define CNN
        x = keras.layers.Conv2D(32, (3, 3),
                                activation='relu',
                                padding='same',
Exemple #2
0
                    action='store_false')

parser.set_defaults(eval_mode=False,
                    decode_from_dvs=False,
                    test_mode=False,
                    rising_beta_schedule=True,
                    decoder_ignore_position=False,
                    curriculum_enable=True,
                    conv_fe=False,
                    acceleration_mode=False)

config = parser.parse_args()
config = vars(config)
hp.upadte_from_dict(config)
hp.this_run_name = sys.argv[
    0] + '_noname_' + hp.run_name_suffix + '_' + lsbjob + '_' + str(
        int(time.time()))

#define model
n_timesteps = hp.steps_per_episode

##
deploy_logs()
##
if hp.decoder_arch == 'multicore_201':
    decoder = rnn_model_multicore_201(
        n_cores=hp.decoder_n_cores,
        lr=hp.decoder_learning_rate,
        ignore_input_B=hp.decoder_ignore_position,
        dropout=hp.decoder_dropout,
        rnn_type=hp.decoder_rnn_type,