I don’t think it works the same.
I implemented caffe models in pytorch, and while caffe use top and bottom to define layers, this is defined in the forward function in pytorch. So you need to know how data is passed to layers to know what are top and bottoms.