Skip to content

Commit 70d4ba5

Browse files
committed
Fix bug
1 parent 7e0aea8 commit 70d4ba5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utensor_cgen/ir/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,21 @@ class TensorInfo(IRBase, _NoShallowCopyMixin):
6969
dtype = attr.ib(validator=instance_of(np.dtype))
7070

7171
shape = attr.ib(validator=instance_of((list, type(None))))
72-
attributes = attr.ib(factory=dict, validator=instance_of(dict))
73-
7472
@shape.validator
7573
def check(self, attrib, shape_values):
7674
if shape_values is not None:
7775
for v in shape_values:
7876
assert isinstance(v, (int, type(None))), \
7977
"shape should be a list of integers"
80-
78+
8179
_ugraph = attr.ib(repr=False)
8280
@_ugraph.validator
8381
def check(self, attrib, value):
8482
if not isinstance(value, uTensorGraph):
8583
raise ValueError('Expecting a uTensorGraph, get {}'.format(type(value)))
8684

85+
attributes = attr.ib(factory=dict, validator=instance_of(dict))
86+
8787
_NULL_PREFIX = 'utensor_null'
8888

8989
def move_into(self, ugraph):

0 commit comments

Comments
 (0)