MCPcopy Create free account
hub / github.com/modelscope/FunASR / set_device

Method set_device

funasr/models/transducer/rnnt_decoder.py:192–199  ·  view source on GitHub ↗

Set GPU device to use. Args: device: Device ID.

(self, device: torch.device)

Source from the content-addressed store, hash-verified

190 return dec_out.squeeze(1), states
191
192 def set_device(self, device: torch.device) -> None:
193 """Set GPU device to use.
194
195 Args:
196 device: Device ID.
197
198 """
199 self.device = device
200
201 def init_state(self, batch_size: int) -> Tuple[torch.Tensor, Optional[torch.tensor]]:
202 """Initialize decoder states.

Callers 4

__call__Method · 0.80
forwardMethod · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected