Variable is a way to to define inputs to the network, very much similar to the
Input class in
Keras. However, since we need to perform differentiation and other operations on the network, we cannot just use
Input. Instead, we need to define the inputs of the network through
For scientific computations, a
Variable has only a dimension of 1. Therefore, if you need to have a three-dimensional coordinate inputs, you need to define three variables:
from sciann import Variable x = Variable('x') y = Variable('y') z = Variable('z')
This is precisely because we need to perform differentiation with respect to (x, y, z).
sciann.functionals.variable.Variable(name=None, units=1, tensor=None, dtype=None)
Variable object for the network's input.
- name: String. Required as derivatives work only with layer names.
- units: Int. Number of feature of input var.
- tensor: Tensorflow
Tensor. Can be pass as the input path.
- dtype: data-type of the network parameters, can be ('float16', 'float32', 'float64').