modify tutorials for plotter compatibility
This commit is contained in:
committed by
Nicola Demo
parent
5336f36f08
commit
d556c592e0
81
tutorials/tutorial3/tutorial.ipynb
vendored
81
tutorials/tutorial3/tutorial.ipynb
vendored
File diff suppressed because one or more lines are too long
12
tutorials/tutorial3/tutorial.py
vendored
12
tutorials/tutorial3/tutorial.py
vendored
@@ -131,15 +131,15 @@ plotter = Plotter()
|
||||
|
||||
# plotting at fixed time t = 0.0
|
||||
print('Plotting at t=0')
|
||||
plotter.plot(trainer, fixed_variables={'t': 0.0})
|
||||
plotter.plot(pinn, fixed_variables={'t': 0.0})
|
||||
|
||||
# plotting at fixed time t = 0.5
|
||||
print('Plotting at t=0.5')
|
||||
plotter.plot(trainer, fixed_variables={'t': 0.5})
|
||||
plotter.plot(pinn, fixed_variables={'t': 0.5})
|
||||
|
||||
# plotting at fixed time t = 1.
|
||||
print('Plotting at t=1')
|
||||
plotter.plot(trainer, fixed_variables={'t': 1.0})
|
||||
plotter.plot(pinn, fixed_variables={'t': 1.0})
|
||||
|
||||
|
||||
# The results are not so great, and we can clearly see that as time progress the solution get worse.... Can we do better?
|
||||
@@ -196,15 +196,15 @@ plotter = Plotter()
|
||||
|
||||
# plotting at fixed time t = 0.0
|
||||
print('Plotting at t=0')
|
||||
plotter.plot(trainer, fixed_variables={'t': 0.0})
|
||||
plotter.plot(pinn, fixed_variables={'t': 0.0})
|
||||
|
||||
# plotting at fixed time t = 0.5
|
||||
print('Plotting at t=0.5')
|
||||
plotter.plot(trainer, fixed_variables={'t': 0.5})
|
||||
plotter.plot(pinn, fixed_variables={'t': 0.5})
|
||||
|
||||
# plotting at fixed time t = 1.
|
||||
print('Plotting at t=1')
|
||||
plotter.plot(trainer, fixed_variables={'t': 1.0})
|
||||
plotter.plot(pinn, fixed_variables={'t': 1.0})
|
||||
|
||||
|
||||
# We can see now that the results are way better! This is due to the fact that previously the network was not learning correctly the initial conditon, leading to a poor solution when the time evolved. By imposing the initial condition the network is able to correctly solve the problem.
|
||||
|
||||
Reference in New Issue
Block a user