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:
TensorInputTensorTargetCondition
: Fortorch.Tensor
orLabelTensor
input and target data.TensorInputGraphTargetCondition
: Fortorch.Tensor
orLabelTensor
input andGraph
ortorch_geometric.data.Data
target data.GraphInputTensorTargetCondition
: ForGraph
orData
input andtorch.Tensor
orLabelTensor
target data.GraphInputGraphTargetCondition
: ForGraph
orData
input and target data.
Initialize the object by storing the
input
andtarget
data.- Parameters:
input (torch.Tensor | LabelTensor | Graph | Data | list[Graph] | list[Data] | tuple[Graph] | tuple[Data]) – Input data for the condition.
target (torch.Tensor | LabelTensor | Graph | Data | list[Graph] | list[Data] | tuple[Graph] | tuple[Data]) – Target data for the condition.
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
orLabelTensor
input
andtarget
data.Initialize the object by storing the
input
andtarget
data.- Parameters:
input (torch.Tensor | LabelTensor | Graph | Data | list[Graph] | list[Data] | tuple[Graph] | tuple[Data]) – Input data for the condition.
target (torch.Tensor | LabelTensor | Graph | Data | list[Graph] | list[Data] | tuple[Graph] | tuple[Data]) – Target data for the condition.
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
orLabelTensor
input
andGraph
orData
target
data.Initialize the object by storing the
input
andtarget
data.- Parameters:
input (torch.Tensor | LabelTensor | Graph | Data | list[Graph] | list[Data] | tuple[Graph] | tuple[Data]) – Input data for the condition.
target (torch.Tensor | LabelTensor | Graph | Data | list[Graph] | list[Data] | tuple[Graph] | tuple[Data]) – Target data for the condition.
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
oData
input
andtorch.Tensor
orLabelTensor
target
data.Initialize the object by storing the
input
andtarget
data.- Parameters:
input (torch.Tensor | LabelTensor | Graph | Data | list[Graph] | list[Data] | tuple[Graph] | tuple[Data]) – Input data for the condition.
target (torch.Tensor | LabelTensor | Graph | Data | list[Graph] | list[Data] | tuple[Graph] | tuple[Data]) – Target data for the condition.
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
andtarget
data.Initialize the object by storing the
input
andtarget
data.- Parameters:
input (torch.Tensor | LabelTensor | Graph | Data | list[Graph] | list[Data] | tuple[Graph] | tuple[Data]) – Input data for the condition.
target (torch.Tensor | LabelTensor | Graph | Data | list[Graph] | list[Data] | tuple[Graph] | tuple[Data]) – Target data for the condition.
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).