File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change 3030import tf_keras
3131
3232
33- def _add_batch_dimension (shape : Sequence [int ]) -> Sequence [Optional [int ]]:
34- """Adds a batch dimension as the first dimension to a given shape.
35-
36- Args:
37- shape: The shape to which the dimension is added. The size in all dimensions
38- must be at least one. Empty shape (i.e. the shape of scalar values) is
39- allowed and it will produce a 1D tensor.
40-
41- Returns:
42- The shape with the batch dimension.
43-
44- Raises:
45- ValueError: When the input shape is not valid.
46- """
47- if any (size <= 0 for size in shape ):
48- raise ValueError ('The shape may contain only positive numbers' )
49- return (None , * shape )
50-
51-
5233@dataclasses .dataclass (frozen = True )
5334class GraphNetworkLayer :
5435 """Specifies one segment of the pipeline of the graph network.
You can’t perform that action at this time.
0 commit comments