MCPcopy Create free account
hub / github.com/NVIDIA/DALI / shape

Method shape

dali/python/nvidia/dali/data_node.py:317–331  ·  view source on GitHub ↗

Returns the run-time shapes of this DataNode as a new DataNode Parameters ---------- arg_dtype : DALIDataType, optional If specified, the shape will be converted to this data type; defaults to INT64. device : str, optional The device ("cpu" or

(self, *, dtype=None, device="cpu")

Source from the content-addressed store, hash-verified

315 return nvidia.dali.fn.expand_dims(sliced, axes=new_axes, new_axis_names=new_axis_names)
316
317 def shape(self, *, dtype=None, device="cpu"):
318 """Returns the run-time shapes of this DataNode as a new DataNode
319
320 Parameters
321 ----------
322 arg_dtype : DALIDataType, optional
323 If specified, the shape will be converted to this data type; defaults to INT64.
324 device : str, optional
325 The device ("cpu" or "gpu") where the result is returned; defaults to CPU.
326 """
327 from . import fn
328
329 if device == "cpu":
330 self._check_gpu2cpu()
331 return fn._shape(self, dtype=dtype, device=device)
332
333 def property(self, key, *, device="cpu"):
334 """Returns a metadata property associated with a DataNode

Callers 15

py_shapeFunction · 0.45
py_shape_listFunction · 0.45
ExposeTensorFunction · 0.45
ExposeTensorListCPUFunction · 0.45
ExposeTesorListGPUFunction · 0.45
_get_shapeFunction · 0.45
get_shapeMethod · 0.45
RunImplMethod · 0.45
RunImplMethod · 0.45
RunImplMethod · 0.45
GetInputShapeMethod · 0.45
GetOutputShapeMethod · 0.45

Calls 1

_check_gpu2cpuMethod · 0.95

Tested by 15

RunImplMethod · 0.36
RunImplMethod · 0.36
RunImplMethod · 0.36
TYPED_TESTFunction · 0.36
TESTFunction · 0.36
compareFunction · 0.36
TestSampleViewCPUFunction · 0.36
TESTFunction · 0.36
TYPED_TESTFunction · 0.36
validateMethod · 0.36
FillWithNumberFunction · 0.36
CompareWithNumberFunction · 0.36