Skip to content

Use pymc's dlogp with rewrites #45

Closed
@dehorsley

Description

@dehorsley

With pymc-devs/pymc#6736 merged, pymc rewrites the logp graph before applying the gradient. This removes some Ops from the graph, which should have some performance benefits in general but mainly target at pymc-devs/pymc#6717. Currently, nutpie calculates dlogp itself here:

grads = pytensor.gradient.grad(logp, value_vars)

I think this can be replaced with a simple

grads = model.dlogp(value_vars) 

Though I think we can also drop the value_vars, it only seems to be used for the grad.

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