If you are using lins inside a nn.Module you should use nn.ModuleList instead of a plain Python list to properly register all linear layers. Otherwise e.g. the optimizer won’t be able to find them.
This will also make sure to transfer all layers onto your GPU, if you call lean_vector.cuda().