示例#1
0
def main():
    if clean_dir:
        clean_outdir(outdir)

    x0 = generate_vf_landmarks(magnification,
                               ecc0,
                               ecc1,
                               n_prototypes,
                               vf='full',
                               filename=full_filename('vf', outdir))
    b0 = generate_V2_boundary_retinotopy_for_DM(boundary_len,
                                                map_h,
                                                filename=full_filename(
                                                    'boundary', outdir))

    y = initialize_map(map_h,
                       map_w,
                       x0,
                       filename=full_filename('init', outdir),
                       random_seed=random_seed)

    optimize(x0,
             b0,
             b1,
             b2,
             map_h,
             map_w,
             y,
             k0=k0,
             kr=kr,
             eta0=eta0,
             outdir=outdir,
             save_interval=save_interval,
             n=n_iterations)
def main(rseed, outputdir):
    if clean_dir:
        clean_outdir(outputdir)

    x0 = generate_vf_landmarks(magnification,
                               ecc0,
                               ecc1,
                               n_prototypes,
                               vf='full',
                               filename=full_filename('vf', outputdir))
    b0 = generate_V2_boundary_retinotopy(boundary_len,
                                         map_h,
                                         branch='vd',
                                         filename=full_filename(
                                             'boundary', outputdir),
                                         tilt=10.0)

    y = initialize_map(map_h,
                       map_w,
                       x0,
                       filename=full_filename('init', outdir),
                       random_seed=rseed)

    # loop through b1 and b2
    b1s = [0.03 * 1.6**i for i in range(0, 8)]
    b2s = [0.03 * 1.6**i for i in range(0, 8)]
    print("b1:", b1s)
    print("b2:", b2s)
    for b1 in b1s:
        for b2 in b2s:
            print("b1 = %10.4f \t b2 = %10.4f" % (b1, b2))
            optimize(
                x0,
                b0,
                b1,
                b2,
                map_h,
                map_w,
                y,
                k0=k0,
                kr=kr,
                eta0=eta0,
                outdir=outputdir,
                save_interval=0,  # disable saving intermediate maps
                n=n_iterations,
                report_iterations=False,
                log_iterations=False)