Skip to content

implement action_distribution #737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

baedan
Copy link
Contributor

@baedan baedan commented Jul 19, 2022

No description provided.

@baedan baedan marked this pull request as ready for review July 19, 2022 11:13
```
"""
action_distribution(dist::Type{T}, model_output) where {T<:DiscreteDistribution} =
map(col -> dist(col; check_args=false), eachcol(softmax(model_output)))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug in Zygote: if this were changed to dist(col…) we get zero gradients everywhere.

also note JuliaStats/Distributions.jl#1084

@baedan baedan mentioned this pull request Aug 8, 2022
@jeremiahpslewis
Copy link
Member

This exists already (was merged in another PR?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants