Adjust parameters
This commit is contained in:
parent
b2c2b80a83
commit
66701bab38
|
|
@ -17,7 +17,7 @@ train_ks = torch.tensor(train_data['k'].to_numpy(), dtype=torch.complex128)
|
||||||
|
|
||||||
#%%
|
#%%
|
||||||
# hyperparameters
|
# hyperparameters
|
||||||
N = 9
|
N = 5
|
||||||
|
|
||||||
# initialize random Hamiltonians
|
# initialize random Hamiltonians
|
||||||
H0 = torch.randn(N, N, dtype=torch.complex128)
|
H0 = torch.randn(N, N, dtype=torch.complex128)
|
||||||
|
|
@ -29,11 +29,11 @@ H1 = (H1 + torch.transpose(H1, 0, 1)).requires_grad_() # symmetric
|
||||||
# training
|
# training
|
||||||
|
|
||||||
# generate a set of c values to follow by subdividing the training cs
|
# generate a set of c values to follow by subdividing the training cs
|
||||||
subdivisions = 3
|
subdivisions = 2
|
||||||
c_steps = np.concatenate([np.linspace(start, stop, subdivisions, endpoint=False) for (start, stop) in zip(train_cs, train_cs[1:])])
|
c_steps = np.concatenate([np.linspace(start, stop, subdivisions, endpoint=False) for (start, stop) in zip(train_cs, train_cs[1:])])
|
||||||
c_steps = np.append(c_steps, train_cs[-1])
|
c_steps = np.append(c_steps, train_cs[-1])
|
||||||
|
|
||||||
lr = 0.05
|
lr = 0.01
|
||||||
epochs = 100000
|
epochs = 100000
|
||||||
for epoch in range(epochs):
|
for epoch in range(epochs):
|
||||||
ks = torch.empty(len(train_data), dtype=torch.complex128)
|
ks = torch.empty(len(train_data), dtype=torch.complex128)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue