Skip to content

Commit

Permalink
Added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhambhokare1 committed Nov 4, 2020
1 parent 3914460 commit c8d9893
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions torch/onnx/symbolic_opset9.py
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,7 @@ def batch_norm(g, input, weight, bias, running_mean, running_var, training, mome
bias_value = torch.tensor([0.] * input_sizes[1]).type(
'torch.' + input.type().scalarType() + 'Tensor')
bias = g.op("Constant", value_t=bias_value)
# If track_running_stats is set to False batch statistics are instead used during evaluation time
if running_mean is None or sym_help._is_none(running_mean) or running_var is None or sym_help._is_none(running_var):
assert len(input_sizes) > 1
reshape_in = g.op("Reshape", input,
Expand Down

0 comments on commit c8d9893

Please sign in to comment.