Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: Bad whitespace - there was a space before 'class' on several lines.
Since python is a whitespace sensitive language, misplaced whitespace
can make it unparseable.  This commit fixes several places where there
was bad whitespace.
  • Loading branch information
ckaran committed Aug 13, 2020
commit a3942c3adf5cca63a7e30a7d54f45811c53466e4
6 changes: 3 additions & 3 deletions testdata/dnn/onnx/generate_onnx_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ def forward(self, x, y):
save_data_and_model_multy_inputs("upsample_unfused_two_inputs_opset9_torch1.4", UpsampleUnfusedTwoInput(), input_0, input_1, version=9)
save_data_and_model_multy_inputs("upsample_unfused_two_inputs_opset11_torch1.4", UpsampleUnfusedTwoInput(), input_0, input_1, version=11)

class FrozenBatchNorm2d(nn.Module):
class FrozenBatchNorm2d(nn.Module):
def __init__(self, n):
super(FrozenBatchNorm2d, self).__init__()
self.register_buffer("weight", torch.ones(n))
Expand All @@ -832,15 +832,15 @@ def forward(self, x):
model = FrozenBatchNorm2d(2)
save_data_and_model("batch_norm_subgraph", x, model)

class GatherScalar(nn.Module):
class GatherScalar(nn.Module):
def forward(self, x):
return x[1]

x = Variable(torch.randn(2))
model = GatherScalar()
save_data_and_model("gather_scalar", x, model)

class Gather(nn.Module):
class Gather(nn.Module):
def forward(self, x):
return x[..., 1]

Expand Down