Advanced Computing Platform for Theoretical Physics
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pengfei Zhou
GI based TN
Commits
2c10d31c
Commit
2c10d31c
authored
Aug 20, 2020
by
Pengfei Zhou
Browse files
bp
parent
a96d2da1
Changes
1
Hide whitespace changes
Inline
Side-by-side
parallel_bp.py
View file @
2c10d31c
...
...
@@ -74,7 +74,7 @@ class MeanField():
#print(differ)
if
differ
<
self
.
conv_crit
:
break
;
marg_i
=
F
.
softmax
(
torch
.
spmm
(
spB1_
,
torch
.
log
(
tmp
@
self
.
W
))
-
torch
.
mean
(
marg_i
@
self
.
W
,
dim
=
0
),
dim
=
1
)
marg_i
=
F
.
softmax
(
torch
.
spmm
(
spB1_
,
torch
.
log
(
cav_ij
@
self
.
W
))
-
torch
.
mean
(
marg_i
@
self
.
W
,
dim
=
0
),
dim
=
1
)
print
(
step
)
print
(
differ
)
print
(
marg_i
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment