MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / _get_shape_from_tensor

Function _get_shape_from_tensor

python/paddle/hapi/model_summary.py:434–438  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

432 depth = len(list(model.sublayers()))
433
434 def _get_shape_from_tensor(x):
435 if isinstance(x, (paddle.base.Variable, paddle.base.core.eager.Tensor)):
436 return list(x.shape)
437 elif isinstance(x, (list, tuple)):
438 return [_get_shape_from_tensor(xx) for xx in x]
439
440 def _get_output_shape(output):
441 if isinstance(output, (list, tuple)):

Callers 1

hookFunction · 0.85

Calls 1

listFunction · 0.85

Tested by

no test coverage detected