Advanced Computing Platform for Theoretical Physics

Commit cd68302b authored by Pengfei Zhou's avatar Pengfei Zhou
Browse files

nmf

parent 28f43199
......@@ -142,8 +142,8 @@ if __name__ =='__main__' :
tensor2=torch.randn(args.bond,args.bond,dtype=torch.float64,device='cpu')
tensor2=torch.triu(tensor2)+torch.triu(tensor2,diagonal=1).t()
mf=MeanField(G,torch.exp(beta*tensor2),beta,'cpu')
#fe_bp=mf.BP()
#print("free_energy={:.15g}".format(fe_bp.item()))
fe_bp=mf.BP()
print("free_energy={:.15g}".format(fe_bp.item()))
fe_nmf=mf.NMF()
print("free_energy={:.15g}".format(fe_nmf.item()))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment