深度可分离卷积pytorch代码实现
时间: 2023-09-25 09:14:59 浏览: 181
pytorch基础模型代码实现
深度可分离卷积的PyTorch代码实现可以参考以下示例代码:
```python
import torch
import torch.nn as nn
from torchsummary import summary
class DepthwiseSeparableConv(nn.Module):
def __init__(self, ch_in, ch_out):
super(DepthwiseSeparableConv, self).__init__()
self.ch_in = ch_in
self.ch_out = ch_out
self.depth_conv = nn.Conv2d(ch_in, ch_in, kernel
阅读全文