I am trying to solve the Exercise 4 in Section 5.1, which is “Implement a block that takes two blocks as an argument, say
net2 and returns the concatenated output of both networks in the forward pass (this is also called a parallel block).”
I am trying to implement the multiple inheritance via:
class Concatenate(nn.Block, nn.Block):
def init(self, **kwargs):
But this seems not the correct way to implement multiple inheritance, can anyone give me any hint?