Currently, you have to build the network before transferring it to GPU via.cuda. So there isn’t yet a command that makes subsequent nn.* calls building layers on cuda. However, if you keep a collection of modules, it is quite easy to transfer them to GPU altogether after building them.