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

Function _get_attr_shape

python/paddle/utils/layers_utils.py:409–416  ·  view source on GitHub ↗
(list_shape)

Source from the content-addressed store, hash-verified

407 from paddle.tensor import fill_constant
408
409 def _get_attr_shape(list_shape):
410 attr_shape = []
411 for idx, dim in enumerate(list_shape):
412 if isinstance(dim, Variable):
413 attr_shape.append(-1)
414 else:
415 attr_shape.append(dim)
416 return attr_shape
417
418 def _get_shape_tensor(list_shape):
419 shape_tensor_list = []

Callers 1

get_shape_tensor_inputsFunction · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected