In the definition of object ConvNet2
, there are something I can’t understand:
def forward(self, x):
for l in self.layers: x = l(x)
according to the definition of self.layers, self.layers is the object ConvLayer
, I am confused by why x = l(x)
rather than x=l.forward(x)
can directly calls the method forward
of ConvLayer
?