Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PaddlePaddle/Paddle
/ _yield_flat_nest
Function
_yield_flat_nest
python/paddle/utils/layers_utils.py:162–167 ·
view source on GitHub ↗
(nest)
Source
from the content-addressed store, hash-verified
160
161
162
def
_yield_flat_nest(nest):
163
for
n in _yield_value(nest):
164
if
is_sequence(n):
165
yield
from
_yield_flat_nest(n)
166
else
:
167
yield
n
168
169
170
def
to_sequence(nest):
Callers
1
flatten
Function · 0.85
Calls
2
_yield_value
Function · 0.85
is_sequence
Function · 0.85
Tested by
no test coverage detected