Skip to content

pt.max is not differentiable in PyMC models #7251

@jessegrabowski

Description

@jessegrabowski

Description

The following model.dlogp() raises a NotImplemented error:

with pm.Model() as model:
    x = pm.Normal('x', shape=(2,))
    mu = x.max()
    pm.Normal('obs', mu, observed=np.random.uniform())

This should be differentiable (pt.max has gradients implemented), so it seems like something is going wrong in rewrites, either with respect to logp rewrites or with respect to MaxAndArgmax

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions