espnet.nets.pytorch_backend.nets_utils.to_device
Less than 1 minute
espnet.nets.pytorch_backend.nets_utils.to_device
espnet.nets.pytorch_backend.nets_utils.to_device(m, x)
Send tensor into the device of the module.
- Parameters:
- m (torch.nn.Module) – Torch module.
- x (Tensor) – Torch tensor.
- Returns: Torch tensor located in the same place as torch module.
- Return type: Tensor