Input Target Condition#

class InputTargetCondition(input, target)[source]#

Bases: ConditionInterface

Condition defined by input and target data. This condition can be used in both supervised learning and Physics-informed problems. Based on the type of the input and target, different condition implementations are available:

Initialize the object by storing the input and target data.

Parameters:

Note

If either input or target consists of a list of :class:~pina.graph.Graph or :class:~torch_geometric.data.Data objects, all elements must have the same structure (matching keys and data types).

class TensorInputTensorTargetCondition(input, target)[source]#

Bases: InputTargetCondition

InputTargetCondition subclass for torch.Tensor or LabelTensor input and target data.

Initialize the object by storing the input and target data.

Parameters:

Note

If either input or target consists of a list of :class:~pina.graph.Graph or :class:~torch_geometric.data.Data objects, all elements must have the same structure (matching keys and data types).

class TensorInputGraphTargetCondition(input, target)[source]#

Bases: InputTargetCondition

InputTargetCondition subclass for torch.Tensor or LabelTensor input and Graph or Data target data.

Initialize the object by storing the input and target data.

Parameters:

Note

If either input or target consists of a list of :class:~pina.graph.Graph or :class:~torch_geometric.data.Data objects, all elements must have the same structure (matching keys and data types).

class GraphInputTensorTargetCondition(input, target)[source]#

Bases: InputTargetCondition

InputTargetCondition subclass for Graph o Data input and torch.Tensor or LabelTensor target data.

Initialize the object by storing the input and target data.

Parameters:

Note

If either input or target consists of a list of :class:~pina.graph.Graph or :class:~torch_geometric.data.Data objects, all elements must have the same structure (matching keys and data types).

class GraphInputGraphTargetCondition(input, target)[source]#

Bases: InputTargetCondition

InputTargetCondition subclass for Graph/ Data input and target data.

Initialize the object by storing the input and target data.

Parameters:

Note

If either input or target consists of a list of :class:~pina.graph.Graph or :class:~torch_geometric.data.Data objects, all elements must have the same structure (matching keys and data types).