-
Notifications
You must be signed in to change notification settings - Fork 92
Fix bugs in DataLoader and tutorial5 notebook #376
New issue
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
Conversation
…__torch_functions__ and __mul__
| default :class:`torch.nn.MSELoss`. | ||
| """ | ||
| if optimizers is None: | ||
| optimizers = TorchOptimizer(torch.optim.Adam, lr=0.001) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you not passing kwargs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kwargs are passed when TorchOptimizer is initialized outside the Solver class
from pina.optim import TorchOptimizer
from pina.solver import PINN
from torch.optim import SGD
optimizer = TorchOptimizer(SGD, lr=0.1, ...)
in_ = LabelTensor(torch.rand((10,2)), ['u_0', 'u_1'])
out_ = LabelTensor(torch.rand((10,1)), ['u'])
class TestProblem(AbstractProblem):
input_variables = ['u_0', 'u_1']
output_variables = ['u']
conditions = {
'data': Condition(input_points=in_, output_points=out_),
}
solver = SupervisedSolver(problem=problem, model=model, optimizer=optimizer)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we pass the standard torch optimizer and inside solvers do the wrapper? To me, for the user, this is more intuitive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ndem0 what do you think?
…iciency of LabelTensor
No description provided.