def solver_net_u(self, t, x): X = tf.concat([t, x], 1) H = 2.0 * (X - self.sol_lb) / (self.sol_ub - self.sol_lb) - 1.0 u = nn.neural_net(H, self.weights, self.biases, ACTIVATION) u_x = tf.gradients(u, x)[0] return u, u_x
def build_nn(H, params, activation): return nn.neural_net(H, params[0], params[1], activation)
def pde_net(self, terms): pde = nn.neural_net(terms, self.pde_weights, self.pde_biases, ACTIVATION) return pde
def identifier_net(self, t, x): X = tf.concat([t, x], 1) H = 2. * (X - self.idn_lb) / (self.idn_ub - self.idn_lb) - 1. u = nn.neural_net(H, self.u_weights, self.u_biases, ACTIVATION) return u