Skip to content

make minimize jit-able? #4

@alibool

Description

@alibool

Thanks for this great package, it seems thatminimize is not jit-able? for example

from torchmin import minimize
import torch
from functools import partial


def bar(y, x):
    return (x + y).square().sum()

# raise error
@torch.jit.script
def foo(x: torch.Tensor) -> torch.Tensor:
    result = minimize(partial(bar, x=x), torch.tensor([0., 1.]), method='bfgs')
    return result.x

Will you consider making minimize jit-able?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions