Pytorch FX Quantization for custom models
PyTorch Forums
Pytorch FX Quantization for custom models
So below is my pytorch model Temporal Shift Model for video classification. temporal shift import torch import torch.nn as nn class TemporalShift(nn.Module): def __init__(self,n_segments=8,n_div=8): super().__init__() self.n_segment=n_segments self.n_div=n_div def forward(self,x): return self.shift(x,self.n_segment,self.n_div) @staticmethod def shift(x,n_seg,fold_div): nt,c,h,w=x.shape batch=nt//n_...
0 comments
No comments yet.