Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
a7643e6f
Commit
a7643e6f
authored
Apr 30, 2020
by
Reimar Leike
Browse files
Fix a bug where studentt would only work if theta is a scalar
parent
c5c2881e
Pipeline
#74130
passed with stages
in 29 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty6/operators/energy_operators.py
View file @
a7643e6f
...
...
@@ -296,7 +296,7 @@ class StudentTEnergy(EnergyOperator):
def
apply
(
self
,
x
):
self
.
_check_input
(
x
)
res
=
((
self
.
_theta
+
1
)
/
2
)
*
(
x
**
2
/
self
.
_theta
).
ptw
(
"log1p"
).
sum
()
res
=
((
(
self
.
_theta
+
1
)
/
2
)
*
(
x
**
2
/
self
.
_theta
).
ptw
(
"log1p"
)
)
.
sum
()
if
not
x
.
want_metric
:
return
res
met
=
ScalingOperator
(
self
.
domain
,
(
self
.
_theta
+
1
)
/
(
self
.
_theta
+
3
))
...
...
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