Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PaddlePaddle/Paddle
/ to_sequence
Function
to_sequence
python/paddle/utils/layers_utils.py:170–174 ·
view source on GitHub ↗
(nest)
Source
from the content-addressed store, hash-verified
168
169
170
def
to_sequence(nest):
171
if
is_sequence(nest):
172
return
nest
173
else
:
174
return
[nest]
175
176
177
def
flatten(nest: NestedStructure[_T]) -> typing.Sequence[_T]:
Callers
2
_to_sequence_except_dict
Function · 0.90
run_sir
Method · 0.90
Calls
1
is_sequence
Function · 0.85
Tested by
no test coverage detected