Esempio n. 1
0
            },
            curr_enc_conf={
                'spectral_norm': spectral_norm,
                'model_dim': node_input_dim,
                'use_concat': use_concat_input_gnn,
                'num_neurons': num_neurons
            })
    qnet_conf.gnn_conf = gnn_conf

    buffer_conf = NstepInputMemoryConfig(memory_conf={
        'use_return': True,
        'N': num_hist_time_steps
    })
    brain_conf = HierarchicalQmixBrainConfig(
        brain_conf={'use_double_q': use_double_q},
        fit_conf={
            'tau': 0.9,
            'eps_gamma': 0.995
        })

    sample_spec = buffer_conf.memory_conf['spec']
    num_hist_steps = buffer_conf.memory_conf['N']

    run_device = 'cpu'
    fit_device = 'cuda' if torch.cuda.is_available() else 'cpu'

    if use_attention:
        raise NotImplementedError
    else:
        mixer_gnn_conf = RelationalGraphNetworkConfig(
            gnn_conf={
                'spectral_norm': spectral_norm,
Esempio n. 2
0
    qnet_conf.gnn_conf = gnn_conf

    buffer_conf = NstepInputMemoryConfig(memory_conf={
        'use_return': True,
        'N': num_hist_time_steps,
        'gamma': gamma
    })
    brain_conf = HierarchicalQmixBrainConfig(brain_conf={
        'use_double_q':
        use_double_q,
        'gamma':
        gamma,
        'eps':
        eps_init,
        'eps_gamma':
        eps_gamma,
        'use_mixer_hidden':
        use_mixer_hidden
    },
                                             fit_conf={
                                                 'tau':
                                                 tau,
                                                 'auto_norm_clip':
                                                 auto_grad_norm_clip
                                             })

    sample_spec = buffer_conf.memory_conf['spec']
    num_hist_steps = buffer_conf.memory_conf['N']

    run_device = 'cpu'
    fit_device = 'cuda' if torch.cuda.is_available() else 'cpu'
Esempio n. 3
0
                'num_relations': num_relations
            })
    qnet_conf.gnn_conf = gnn_conf

    buffer_conf = NstepInputMemoryConfig(memory_conf={
        'use_return': True,
        'N': num_hist_time_steps,
        'gamma': gamma
    })
    brain_conf = HierarchicalQmixBrainConfig(brain_conf={
        'use_double_q':
        use_double_q,
        'gamma':
        gamma,
        'eps':
        eps_init,
        'eps_gamma':
        eps_gamma,
        'use_mixer_hidden':
        use_mixer_hidden
    },
                                             fit_conf={'tau': tau})

    sample_spec = buffer_conf.memory_conf['spec']
    num_hist_steps = buffer_conf.memory_conf['N']

    run_device = 'cpu'
    fit_device = 'cuda' if torch.cuda.is_available() else 'cpu'

    if use_attention:
        mixer_gnn_conf = RelationalNetworkConfig(