PyTorch 3-深度学习-torch model demo
一: model build
1> cascade model_order
import torch
import torch.nn as nn
from torch.nn import Conv2d
import torch.nn.functional as F
import numpy as np
import netron
import onnx
#############################################
# #
# intput->layer1->layer2->layer3 #
# #
#############################################
class CascadeNet(nn.Module):
def __init__(self, op_list, model_params):
super(CascadeNet, self).__init__()
self.op_list = op_list
self.model_params = model_params
self.op_nums = len(op_list)
self.layer_list &