Lstm many-to-one

How do I make many-to-one so that the linear layer is connected to the last lstm block?