@@ -162,13 +162,13 @@ def perform(self, *args, **kwargs):
162
162
raise NotImplementedError ("Test Op should not be present in final graph" )
163
163
164
164
165
- test_op = MyTestOp ()
165
+ my_test_op = MyTestOp ()
166
166
167
167
168
168
def test_vectorize_node_default_signature ():
169
169
vec = tensor (shape = (None ,))
170
170
mat = tensor (shape = (5 , None ))
171
- node = test_op .make_node (vec , mat )
171
+ node = my_test_op .make_node (vec , mat )
172
172
173
173
vect_node = vectorize_node (node , mat , mat )
174
174
assert isinstance (vect_node .op , Blockwise ) and isinstance (
@@ -179,9 +179,9 @@ def test_vectorize_node_default_signature():
179
179
with pytest .raises (
180
180
ValueError , match = "Signature not provided nor found in core_op MyTestOp"
181
181
):
182
- Blockwise (test_op )
182
+ Blockwise (my_test_op )
183
183
184
- vect_node = Blockwise (test_op , signature = "(m),(n)->(m),(n)" ).make_node (vec , mat )
184
+ vect_node = Blockwise (my_test_op , signature = "(m),(n)->(m),(n)" ).make_node (vec , mat )
185
185
assert vect_node .outputs [0 ].type .shape == (
186
186
5 ,
187
187
None ,
@@ -198,7 +198,7 @@ def test_blockwise_shape():
198
198
inp_test = np .zeros ((5 , 4 , 3 ), dtype = config .floatX )
199
199
200
200
# Shape can be inferred from inputs
201
- op = Blockwise (test_op , signature = "(m, n) -> (n, m)" )
201
+ op = Blockwise (my_test_op , signature = "(m, n) -> (n, m)" )
202
202
out = op (inp )
203
203
assert out .type .shape == (5 , None , None )
204
204
@@ -210,7 +210,7 @@ def test_blockwise_shape():
210
210
assert tuple (shape_fn (inp_test )) == (5 , 3 , 4 )
211
211
212
212
# Shape can only be partially inferred from inputs
213
- op = Blockwise (test_op , signature = "(m, n) -> (m, k)" )
213
+ op = Blockwise (my_test_op , signature = "(m, n) -> (m, k)" )
214
214
out = op (inp )
215
215
assert out .type .shape == (5 , None , None )
216
216
@@ -233,7 +233,7 @@ def test_blockwise_shape():
233
233
inp1_test = np .zeros ((7 , 1 , 4 , 3 ), dtype = config .floatX )
234
234
inp2_test = np .zeros ((1 , 5 , 4 , 3 ), dtype = config .floatX )
235
235
236
- op = Blockwise (test_op , signature = "(m, n), (m, n) -> (n, m), (m, k)" )
236
+ op = Blockwise (my_test_op , signature = "(m, n), (m, n) -> (n, m), (m, k)" )
237
237
outs = op (inp1 , inp2 )
238
238
assert outs [0 ].type .shape == (7 , 5 , None , None )
239
239
assert outs [1 ].type .shape == (7 , 5 , None , None )
0 commit comments