Пример #1
0
for i in range(1):

    net.wf.fc.weight.requires_grad = True
    net.wf.rbf.centers.requires_grad = False

    pos, obs_dict = net.train(250,
                              batchsize=250,
                              pos=pos,
                              obs_dict=obs_dict,
                              resample=100,
                              ntherm=-1,
                              loss='variance',
                              sol=morse_sol,
                              fig=fig)

    # net.wf.fc.weight.requires_grad = False
    # net.wf.rbf.centers.requires_grad = True

    # pos,obs_dict = net.train(50,
    #          batchsize=250,
    #          pos = pos,
    #          obs_dict = obs_dict,
    #          resample=100,
    #          ntherm=-1,
    #          loss = 'variance',
    #          sol=morse_sol,
    #          fig=fig)

net.plot_results(obs_dict, morse_sol, e0=-0.125)
Пример #2
0
fig = plt.figure()

for i in range(1):

    net.wf.fc.weight.requires_grad = True
    net.wf.rbf.centers.requires_grad = False

    pos, obs_dict = net.train(1000,
                              batchsize=250,
                              pos=pos,
                              obs_dict=obs_dict,
                              resample=100,
                              ntherm=-1,
                              loss='variance',
                              fig=fig)

    # net.wf.fc.weight.requires_grad = False
    # net.wf.rbf.centers.requires_grad = True

    # pos,obs_dict = net.train(50,
    #          batchsize=250,
    #          pos = pos,
    #          obs_dict = obs_dict,
    #          resample=100,
    #          ntherm=-1,
    #          loss = 'variance',
    #          sol=morse_sol,
    #          fig=fig)

net.plot_results(obs_dict)