mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-09 23:12:02 +00:00
16 lines
441 B
Python
16 lines
441 B
Python
|
import refiners.fluxion.layers as fl
|
||
|
|
||
|
|
||
|
def test_module_get_path() -> None:
|
||
|
chain = fl.Chain(
|
||
|
fl.Sum(
|
||
|
fl.Linear(1, 1),
|
||
|
fl.Linear(1, 1),
|
||
|
),
|
||
|
fl.Sum(),
|
||
|
)
|
||
|
|
||
|
assert chain.Sum_1.Linear_2.get_path(parent=chain.Sum_1) == "Chain.Sum_1.Linear_2"
|
||
|
assert chain.Sum_1.Linear_2.get_path(parent=chain.Sum_1, top=chain.Sum_1) == "Sum.Linear_2"
|
||
|
assert chain.Sum_1.get_path() == "Chain.Sum_1"
|