We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
out_features
out_features is only defined for linear layers (or, at least, it's not defined for sigmoid layers). MWE:
# model.py import torch nn = torch.nn.Sequential(torch.nn.Linear(1, 10), torch.nn.Sigmoid()) torch.save(nn, "sigmoid_output.pt")
# model.jl import MathOptAI import PythonCall import JuMP nn = MathOptAI.PytorchModel("sigmoid_output.pt") gb = MathOptAI.GrayBox(nn) model = JuMP.Model() JuMP.@variable(model, x) MathOptAI.add_predictor(model, gb, [x])
Fails with: ERROR: LoadError: Python: AttributeError: 'Sigmoid' object has no attribute 'out_features'
ERROR: LoadError: Python: AttributeError: 'Sigmoid' object has no attribute 'out_features'
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
out_features
is only defined for linear layers (or, at least, it's not defined for sigmoid layers). MWE:Fails with:
ERROR: LoadError: Python: AttributeError: 'Sigmoid' object has no attribute 'out_features'
The text was updated successfully, but these errors were encountered: