Updates to tutorial and run post codacy changes
This commit is contained in:
committed by
Nicola Demo
parent
9e55746546
commit
b38b0894b1
5
tutorials/tutorial13/tutorial.py
vendored
5
tutorials/tutorial13/tutorial.py
vendored
@@ -107,9 +107,8 @@ problem.discretise_domain(1, 'grid', domains=['bound_cond0','bound_cond1'])
|
||||
from pina.optim import TorchScheduler
|
||||
|
||||
# training with PINN and visualize results
|
||||
model=FeedForward(input_dimensions=1, output_dimensions=1, layers=[100, 100, 100])
|
||||
pinn = PINN(problem=problem,
|
||||
model=model,
|
||||
model=FeedForward(input_dimensions=1, output_dimensions=1, layers=[100, 100, 100]),
|
||||
scheduler=TorchScheduler(torch.optim.lr_scheduler.MultiStepLR, # Pass the class directly, not an instance
|
||||
milestones=[1000,2000,3000,4000],
|
||||
gamma=0.9))
|
||||
@@ -119,7 +118,7 @@ trainer.train()
|
||||
|
||||
# training with PINN and visualize results
|
||||
sapinn = SAPINN(problem=problem,
|
||||
model=model,
|
||||
model=FeedForward(input_dimensions=1, output_dimensions=1, layers=[100, 100, 100]),
|
||||
scheduler_model=TorchScheduler(torch.optim.lr_scheduler.MultiStepLR,
|
||||
milestones=[1000,2000,3000,4000],
|
||||
gamma=0.9))
|
||||
|
||||
Reference in New Issue
Block a user