Exemple #1
0
    config.CHECKPOINT_TEMPLATE = f'./output/{TRAINING_CONFIG.config_id}/checkpoints/checkpoint_-{config.CHECKPOINT_NUM}'
    CHECKPOINT.restore(config.CHECKPOINT_TEMPLATE)

    encoder = CHECKPOINT.encoder

    if config.BINARISED:
        config.PROCESSOR = lambda digit, image, grid: StimulusNetBinary(
            digit, image, grid, encoder, TRAINING_CONFIG.filler)
    else:
        config.PROCESSOR = lambda digit, image, grid: StimulusNet(
            digit, image, grid, encoder)

# Templates for data paths.
config.DATETIME_FORMAT = '%Y-%m-%d_%H-%M-%S'
config.DIGIT_SOUND_TEMPLATE = './sounds/{}.wav'

base_dir = './experiments/'

if config.TESTING:
    config.CONFIG_FILE_TEMPLATE = base_dir + 'tests/{}_{}_config.json'
    config.SESSION_FILE_TEMPLATE = base_dir + 'tests/{}_{}_session.csv'
    config.MOUSE_FILE_TEMPLATE = base_dir + 'tests/{}_{}_mouse.csv'
else:
    config.CONFIG_FILE_TEMPLATE = base_dir + 'participants/{}_{}_config.json'
    config.SESSION_FILE_TEMPLATE = base_dir + 'participants/{}_{}_session.csv'
    config.MOUSE_FILE_TEMPLATE = base_dir + 'participants/{}_{}_mouse.csv'

# Parameters for sound.
config.CORRECT_NOTE = 'G'
config.INCORRECT_NOTE = 'Csh'
Exemple #2
0
        grid = pickle.load(infile)

config.GRID = grid

# We initiate the stimulus processor type.

processors = {
    'direct': Stimulus,
    'net': lambda image, grid: StimulusNet(image, grid, config.ENCODER),
}

config.PROCESSOR = processors[config.PROCESSOR_TYPE]

# Templates for data paths.
config.DATETIME_FORMAT = '%Y-%m-%d_%H-%M-%S'
config.DIGIT_SOUND_TEMPLATE = './data/digit-voice/{}-alt.wav'

base_dir = './data/psychophysics-sessions/'

if config.TESTING:
    config.CONFIG_FILE_TEMPLATE = base_dir + 'tests/{}_{}_config.json'
    config.SESSION_FILE_TEMPLATE = base_dir + 'tests/{}_{}_session.csv'
    config.MOUSE_FILE_TEMPLATE = base_dir + 'tests/{}_{}_mouse.csv'
else:
    config.CONFIG_FILE_TEMPLATE = base_dir + 'participants/{}_{}_config.json'
    config.SESSION_FILE_TEMPLATE = base_dir + 'participants/{}_{}_session.csv'
    config.MOUSE_FILE_TEMPLATE = base_dir + 'participants/{}_{}_mouse.csv'

# Parameters for sound.
config.CORRECT_NOTE = 'G'
config.INCORRECT_NOTE = 'Csh'