Skip to content

Commit 525fbad

Browse files
committed
fix pylint
1 parent 72c0557 commit 525fbad

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tf2onnx/onnx_opset/rnn.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
logger = logging.getLogger(__name__)
1818

1919

20-
# pylint: disable=unused-argument,missing-docstring
20+
# pylint: disable=unused-argument,missing-docstring,invalid-name
2121

2222
@tf_op("LSTMBlockCell")
2323
class LSTMBlockCell:
@@ -224,28 +224,28 @@ def NM(nm):
224224
ctx.make_node('Reshape', [W_flattened.output[0], w_shape_const.output[0]], outputs=[W])
225225
ctx.make_node('Reshape', [R_flattened.output[0], r_shape_const.output[0]], outputs=[R])
226226
ctx.make_node('Reshape', [B_flattened.output[0], b_shape_const.output[0]], outputs=[B])
227-
ctx.make_node('Split', [W], outputs = WS)
228-
ctx.make_node('Split', [R], outputs = RS)
229-
ctx.make_node('Split', [B], outputs = BS)
230-
ctx.make_node('Split', [H], outputs = HS)
227+
ctx.make_node('Split', [W], outputs=WS)
228+
ctx.make_node('Split', [R], outputs=RS)
229+
ctx.make_node('Split', [B], outputs=BS)
230+
ctx.make_node('Split', [H], outputs=HS)
231231
XNF = XNB = X
232232
for i in range(num_layers):
233233
suffix = '_' + str(i*num_dirs)
234234
ctx.make_node('GRU', [XNF, NM('W' + suffix), NM('R' + suffix), NM('B' + suffix), '', NM('H'+ suffix)],
235-
outputs = [NM('Y' + suffix), NM('YH' + suffix)],
235+
outputs=[NM('Y' + suffix), NM('YH' + suffix)],
236236
attr={'direction':'forward', 'hidden_size':num_units})
237237
XNF = NM(X + suffix)
238-
ctx.make_node('Squeeze', [NM('Y' + suffix)], outputs = [XNF], attr={'axes': [1]})
238+
ctx.make_node('Squeeze', [NM('Y' + suffix)], outputs=[XNF], attr={'axes': [1]})
239239
if num_dirs == 2:
240240
suffix = '_' + str(i*2+1)
241241
ctx.make_node('GRU', [XNB, NM('W' + suffix), NM('R' + suffix), NM('B' + suffix), '', NM('H'+ suffix)],
242-
outputs = [NM('Y' + suffix), NM('YH' + suffix)],
242+
outputs=[NM('Y' + suffix), NM('YH' + suffix)],
243243
attr={'direction':'reverse', 'hidden_size':num_units})
244244
XNB = NM(X + suffix)
245-
ctx.make_node('Squeeze', [NM('Y' + suffix)], outputs = [XNB], attr={'axes': [1]})
245+
ctx.make_node('Squeeze', [NM('Y' + suffix)], outputs=[XNB], attr={'axes': [1]})
246246
ctx.remove_node(node.name)
247247
if num_dirs == 2:
248-
ctx.make_node('Concat', [XNF, XNB], outputs = [node.output[0]], attr={'axis': -1})
248+
ctx.make_node('Concat', [XNF, XNB], outputs=[node.output[0]], attr={'axis': -1})
249249
else:
250-
identity_0 = ctx.make_node('Identity', [XNF], outputs = [node.output[0]])
251-
concat_0 = ctx.make_node('Concat', YHS, outputs = [node.output[1]], attr={'axis': 0})
250+
ctx.make_node('Identity', [XNF], outputs=[node.output[0]])
251+
ctx.make_node('Concat', YHS, outputs=[node.output[1]], attr={'axis': 0})

0 commit comments

Comments
 (0)