Closed Mixpap closed 2 years ago
Ok I saw my mistake, and corrected
#...
x_sampling, t_sampling = np.meshgrid(
np.linspace(-1, 1, 100),
np.linspace(0, 1, 100)
)
#now we use observed data (u_data at x_data,t_data)
C = (t == t_data) * (x == x_data) * abs(u - u_data)
m = sn.SciModel([x, t], [L1, C])
x_train=np.append(x_sampling,x_data)
t_train=np.append(t_sampling,t_data)
h = m.train([x_train, t_train], ['zero', 'zero'], learning_rate=0.002, epochs=5000, verbose=0)
#...
Hi! Maybe a silly question, but how can I add both observed data AND training data during the training.
Looking on the examples there is two ways of using scinn, one by sampling randomly data points for the physics part of the los function to train, using the snippet from the burgers equation example:
and the other by using data using the
Data
function, which looks likeHow someone can give both Data(u) but also use a (bigger) sampling space for the physics los function to optimise?
I have tried using something like
but the results are terrible, so I thought that maybe this is not a correct way to follow, am I missing something? Thanks!