Fix doc condition
This commit is contained in:
committed by
Nicola Demo
parent
bce9eb66ae
commit
6f97799284
@@ -41,8 +41,8 @@ class InputTargetCondition(ConditionInterface):
|
||||
GraphInputGraphTargetCondition
|
||||
|
||||
:raises ValueError: If input and or target are not of type
|
||||
:class:`torch.Tensor`, :class:`LabelTensor`, :class:`Graph`, or
|
||||
:class:`torch_geometric.data.Data`.
|
||||
:class:`torch.Tensor`, :class:`pina.label_tensor.LabelTensor`,
|
||||
:class:`pina.graph.Graph`, or :class:`~torch_geometric.data.Data`.
|
||||
"""
|
||||
if cls != InputTargetCondition:
|
||||
return super().__new__(cls)
|
||||
@@ -82,23 +82,21 @@ class InputTargetCondition(ConditionInterface):
|
||||
|
||||
def __init__(self, input, target):
|
||||
"""
|
||||
Initialize the InputTargetCondition, storing the input and target data.
|
||||
Initialize the object storing the input and target data.
|
||||
|
||||
:param input: Input data for the condition.
|
||||
:type input: torch.Tensor | LabelTensor | Graph |
|
||||
torch_geometric.data.Data | list[Graph] |
|
||||
list[torch_geometric.data.Data] | tuple[Graph] |
|
||||
tuple[torch_geometric.data.Data]
|
||||
:type input: torch.Tensor | LabelTensor | Graph | Data | list[Graph] |
|
||||
list[Data] | tuple[Graph] |
|
||||
tuple[Data]
|
||||
:param target: Target data for the condition.
|
||||
:type target: torch.Tensor | LabelTensor | Graph |
|
||||
torch_geometric.data.Data | list[Graph] |
|
||||
list[torch_geometric.data.Data] | tuple[Graph] |
|
||||
tuple[torch_geometric.data.Data]
|
||||
:type target: torch.Tensor | LabelTensor | Graph | Data | list[Graph] |
|
||||
list[Data] | tuple[Graph] | tuple[Data]
|
||||
|
||||
.. note::
|
||||
If either ``input`` or ``target`` are composed by a list of
|
||||
:class:`Graph`/:class:`torch_geometric.data.Data` objects, all
|
||||
elements must have the same structure (keys and data types)
|
||||
If either `input` or `target` are composed by a list of
|
||||
:class:`pina.graph.Graph` or :class:`~torch_geometric.data.Data`
|
||||
objects, all elements must have the same structure (keys and data
|
||||
types)
|
||||
"""
|
||||
|
||||
super().__init__()
|
||||
@@ -120,28 +118,30 @@ class InputTargetCondition(ConditionInterface):
|
||||
|
||||
class TensorInputTensorTargetCondition(InputTargetCondition):
|
||||
"""
|
||||
InputTargetCondition subclass for :class:`torch.Tensor`/:class:`LabelTensor`
|
||||
input and target data.
|
||||
InputTargetCondition subclass for :class:`torch.Tensor` or
|
||||
:class:`pina.label_tensor.LabelTensor` input and target data.
|
||||
"""
|
||||
|
||||
|
||||
class TensorInputGraphTargetCondition(InputTargetCondition):
|
||||
"""
|
||||
InputTargetCondition subclass for :class:`torch.Tensor`/:class:`LabelTensor`
|
||||
input and :class:`Graph`/:class:`torch_geometric.data.Data` target data.
|
||||
InputTargetCondition subclass for :class:`torch.Tensor` or
|
||||
:class:`pina.label_tensor.LabelTensor` input and
|
||||
:class:`pina.graph.Graph` or :class:`~torch_geometric.data.Data` target
|
||||
data.
|
||||
"""
|
||||
|
||||
|
||||
class GraphInputTensorTargetCondition(InputTargetCondition):
|
||||
"""
|
||||
InputTargetCondition subclass for :class:`Graph`/
|
||||
:class:`torch_geometric.data.Data` input and :class:`torch.Tensor`/
|
||||
:class:`LabelTensor` target data.
|
||||
InputTargetCondition subclass for :class:`pina.graph.Graph` o
|
||||
:class:`~torch_geometric.data.Data` input and :class:`torch.Tensor` or
|
||||
:class:`pina.label_tensor.LabelTensor` target data.
|
||||
"""
|
||||
|
||||
|
||||
class GraphInputGraphTargetCondition(InputTargetCondition):
|
||||
"""
|
||||
InputTargetCondition subclass for :class:`Graph`/
|
||||
:class:`torch_geometric.data.Data` input and target data.
|
||||
InputTargetCondition subclass for :class:`pina.graph.Graph`/
|
||||
:class:`~torch_geometric.data.Data` input and target data.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user