资源简介
unet用于图像分割(model.py)
代码片段和文件信息
from torch.nn import Module Sequential
from torch.nn import Conv3d ConvTranspose3d BatchNorm3d MaxPool3d AvgPool1d
from torch.nn import ReLU Sigmoid
import torch
class UNet3D(Module):
# __ __
# 1|__ ________________ __|1
# 2|__ ____________ __|2
# 3|__ ______ __|3
# 4|__ __ __|4
# The convolution operations on either side are residual subject to 1*1 Convolution for channel homogeneity
def __init__(self num_channels=32 feat_channels=[64 128 256 512 1024] residual=‘conv‘):
# residual: conv for residual input x through 1*1 conv across every layer for downsampling None for removal of residuals
super(UNet3D self).__init__()
# Encoder downsamplers
self.pool1 = MaxPool3d((122))
self.pool2 = MaxPool3d((122))
self.pool3 = MaxPool3d((122))
self.pool4 = MaxPool3d((122))
# Encoder convolutions
- 上一篇:使用sendgrid api 发送邮件
- 下一篇:OPENCV视频头调用
评论
共有 条评论