Skip to content

Commit 7e0aea8

Browse files
committed
add tensor level attributes
1 parent d80f35a commit 7e0aea8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utensor_cgen/ir/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
from functools import reduce
55

66
import attr
7-
import numpy as np
87
import six
98
from attr.validators import instance_of
109

10+
import numpy as np
1111
import tensorflow as tf
1212
from tensorflow.core.framework.attr_value_pb2 import AttrValue as _AttrValue
1313
from tensorflow.core.framework.attr_value_pb2 import \
@@ -69,6 +69,7 @@ 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))
7273

7374
@shape.validator
7475
def check(self, attrib, shape_values):

0 commit comments

Comments
 (0)