Skip to content

Commit 4494056

Browse files
committed
Segment default name should work the same as for other elements
1 parent 5853043 commit 4494056

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cheetah/accelerator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1949,7 +1949,7 @@ class Segment(Element):
19491949
:param name: Unique identifier of the element.
19501950
"""
19511951

1952-
def __init__(self, elements: list[Element], name: str = "unnamed") -> None:
1952+
def __init__(self, elements: list[Element], name: Optional[str] = None) -> None:
19531953
super().__init__(name=name)
19541954

19551955
self.elements = nn.ModuleList(elements)

0 commit comments

Comments
 (0)