How to understand this way of declaring a class?

class Linear(Bottle, nn.Linear): pass

I’m new user of torch. I get confused about this statement when I read the code in https://github.com/pytorch/examples/blob/master/snli/model.py, line 16. Can someone help me?

This is basic python multiple inheritance.
This basically means that the Linear class declared here is modelled first of all on nn.Linear, and then on Bottle.

For example on line 44 self.projection is defined to be an instance of Linear, this means that self.projection.forward references the forward method defined in the Bottle class, and that self.projection.weight references the weight parameter defined in the nn.Linear class.

I hope this helps.