File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -961,7 +961,7 @@ def forward(self, input):
961
961
tmp = self ._helper .create_variable_for_type_inference (self ._dtype )
962
962
self ._helper .append_op (
963
963
type = "matmul" , inputs = inputs , outputs = {"Out" : tmp }, attrs = attrs )
964
- if self .bias :
964
+ if self .bias is not None :
965
965
pre_activation = self ._helper .create_variable_for_type_inference (
966
966
dtype = self ._dtype )
967
967
self ._helper .append_op (
Original file line number Diff line number Diff line change @@ -473,7 +473,7 @@ def edit_distance(input,
473
473
label = erased_label
474
474
475
475
this_inputs = {"Hyps" : [input ], "Refs" : [label ]}
476
- if input_length and label_length :
476
+ if input_length is not None and label_length is not None :
477
477
this_inputs ['HypsLength' ] = [input_length ]
478
478
this_inputs ['RefsLength' ] = [label_length ]
479
479
Original file line number Diff line number Diff line change @@ -1022,7 +1022,7 @@ def chunk_eval(input,
1022
1022
1023
1023
this_input = {"Inference": [input], "Label": [label]}
1024
1024
1025
- if seq_length:
1025
+ if seq_length is not None :
1026
1026
this_input["SeqLength"] = [seq_length]
1027
1027
1028
1028
helper.append_op(
You can’t perform that action at this time.
0 commit comments