hi, the subLayers of your module should be its submodules. So:
1/ I made my CaffeNet module derived from nn.sequential
2/Then I defined a add method which adds layer to the subModule dictionary (self._modules) of a nn.sequential:
def add(self, layer):
self._modules[str(self.index)]=layer
self.index=self.index+1
3/Then I call this method with each layer of CaffeNet