MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / get_shape

Function get_shape

fastdeploy/model_executor/models/tp_utils.py:218–220  ·  view source on GitHub ↗

get_shape

(tensor)

Source from the content-addressed store, hash-verified

216 """func"""
217
218 def get_shape(tensor):
219 """get_shape"""
220 return tensor.get_shape() if hasattr(tensor, "get_shape") else tensor.shape
221
222 def slice_tensor(tensor, start, end):
223 """slice_tensor"""

Callers 4

slice_tensorMethod · 0.85
split_tensorMethod · 0.85
slice_tensorFunction · 0.85
split_tensorFunction · 0.85

Calls 1

get_shapeMethod · 0.80

Tested by

no test coverage detected