Skip to content

Commit

Permalink
fix some Tensor not None checks
Browse files Browse the repository at this point in the history
  • Loading branch information
albertz committed Jan 22, 2025
1 parent 325caed commit 6ef3495
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nn/naming.py
Original file line number Diff line number Diff line change
Expand Up @@ -1115,10 +1115,10 @@ def make_net_dict_raw(self, net: Net, *, _stack: Optional[_StackInfo] = None) ->
continue
# We need dyn_size_ext to know the implicit dims, to correctly set out_shape.
# If dyn_size_ext is not set yet, try to complete it.
if not dim.dyn_size_ext:
if dim.dyn_size_ext is None:
dim.complete_dyn_size()
assert (
dim.dyn_size_ext
dim.dyn_size_ext is not None
), f"{sub_name_ctx}: need {dim} to be defined to be able to know about implicit dims"
dim_tags.extend(data_template.dim_tags_set_implicit_only_wrapped)
assert len(dim_tags) == len(
Expand Down

0 comments on commit 6ef3495

Please sign in to comment.