Skip to content

Commit

Permalink
Adding max pool to Pytorch IMX500 v3 TPC no quantization list
Browse files Browse the repository at this point in the history
  • Loading branch information
Ofir Gordon authored and Ofir Gordon committed Jun 17, 2024
1 parent 06fdc8f commit f817147
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import torch
from torch import add, sub, mul, div, flatten, reshape, split, unsqueeze, dropout, sigmoid, tanh, chunk, unbind, topk, \
gather, equal, transpose, permute, argmax, squeeze
from torch.nn import Conv2d, Linear, ConvTranspose2d
from torch.nn import Conv2d, Linear, ConvTranspose2d, MaxPool2d
from torch.nn import Dropout, Flatten, Hardtanh, Identity
from torch.nn import ReLU, ReLU6, PReLU, SiLU, Sigmoid, Tanh, Hardswish, LeakyReLU
from torch.nn.functional import relu, relu6, prelu, silu, hardtanh, hardswish, leaky_relu
Expand Down Expand Up @@ -83,7 +83,8 @@ def generate_pytorch_tpc(name: str, tp_model: tp.TargetPlatformModel):
argmax,
gather,
topk,
squeeze])
squeeze,
MaxPool2d])

tp.OperationsSetToLayers("Conv", [Conv2d, ConvTranspose2d],
attr_mapping=pytorch_linear_attr_mapping)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import torch
from torch import add, sub, mul, div, flatten, reshape, split, unsqueeze, dropout, sigmoid, tanh, chunk, unbind, topk, \
gather, equal, transpose, permute, argmax, squeeze
from torch.nn import Conv2d, Linear, ConvTranspose2d
from torch.nn import Conv2d, Linear, ConvTranspose2d, MaxPool2d
from torch.nn import Dropout, Flatten, Hardtanh, Identity
from torch.nn import ReLU, ReLU6, PReLU, SiLU, Sigmoid, Tanh, Hardswish, LeakyReLU
from torch.nn.functional import relu, relu6, prelu, silu, hardtanh, hardswish, leaky_relu
Expand Down Expand Up @@ -82,7 +82,8 @@ def generate_pytorch_tpc(name: str, tp_model: tp.TargetPlatformModel):
argmax,
gather,
topk,
squeeze])
squeeze,
MaxPool2d])

tp.OperationsSetToLayers("Conv", [Conv2d, ConvTranspose2d],
attr_mapping=pytorch_linear_attr_mapping)
Expand Down

0 comments on commit f817147

Please sign in to comment.