Skip to content

Commit

Permalink
Fixed ONNX size req padding (#2918)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment authored May 29, 2024
1 parent 7311cde commit 25e9dc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/nodes/impl/pytorch/convert_to_onnx_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def convert_to_onnx_impl(
input_name: {0: "batch_size", 2: "height", 3: "width"},
output_name: {0: "batch_size", 2: "height", 3: "width"},
}
size = max(model.size_requirements.minimum, 3)
size = size + (size % model.size_requirements.multiple_of)
size = 3
size += model.size_requirements.get_padding(size, size)[0]
dummy_input = torch.rand(1, model.input_channels, size, size)
dummy_input = dummy_input.to(device)

Expand Down

0 comments on commit 25e9dc3

Please sign in to comment.