Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
3152d495
Commit
3152d495
authored
Jan 26, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reduction_indices was deprecated in TF
parent
b0fc944d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
tensorpack/tfutils/distributions.py
tensorpack/tfutils/distributions.py
+2
-3
No files found.
tensorpack/tfutils/distributions.py
View file @
3152d495
...
...
@@ -172,7 +172,7 @@ class CategoricalDistribution(Distribution):
def
_loglikelihood
(
self
,
x
,
theta
):
eps
=
1e-8
return
tf
.
reduce_sum
(
tf
.
log
(
theta
+
eps
)
*
x
,
reduction_indices
=
1
)
return
tf
.
reduce_sum
(
tf
.
log
(
theta
+
eps
)
*
x
,
1
)
def
_encoder_activation
(
self
,
dist_param
):
return
tf
.
nn
.
softmax
(
dist_param
)
...
...
@@ -214,8 +214,7 @@ class GaussianDistribution(Distribution):
exponent
=
(
x
-
mean
)
/
(
stddev
+
eps
)
return
tf
.
reduce_sum
(
-
0.5
*
np
.
log
(
2
*
np
.
pi
)
-
tf
.
log
(
stddev
+
eps
)
-
0.5
*
tf
.
square
(
exponent
),
reduction_indices
=
1
-
0.5
*
np
.
log
(
2
*
np
.
pi
)
-
tf
.
log
(
stddev
+
eps
)
-
0.5
*
tf
.
square
(
exponent
),
1
)
def
_encoder_activation
(
self
,
dist_param
):
...
...
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