Skip to content

Code 11.56 and 11.57 issue with negative log probabilities from softmax #239

Open
@DamonCharlesRoberts

Description

@DamonCharlesRoberts

For the code in 11.56 and 11.57, I had been trying to replicate the results using the pm.math.softmax method, however, I was getting errors during sampling due to it producing negative values.

Adjusting p_ = at.nnet.softmax(s) to be p = pm.math.softmax(s, axis=1) resolved the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions