一种方法为使用init和forward函数。my_model中传入torch.nn.module模块。下面为class的模版:
class my_model(torch.nn.module):
def __init__(self,a,b,c,...):
super (my_model,self)__init__():
self.my_model_a = a
self.b = b
self.c = c
...
def forward(self, input_1
一种方法为使用init和forward函数。my_model中传入torch.nn.module模块。下面为class的模版:
class my_model(torch.nn.module):
def __init__(self,a,b,c,...):
super (my_model,self)__init__():
self.my_model_a = a
self.b = b
self.c = c
...
def forward(self, input_1