Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NVIDIA/TensorRT
/ batch_to_gpu
Function
batch_to_gpu
demo/Tacotron2/waveglow/data_function.py:73–78 ·
view source on GitHub ↗
(batch)
Source
from the content-addressed store, hash-verified
71
72
73
def
batch_to_gpu(batch):
74
x, y, len_y = batch
75
x = to_gpu(x).float()
76
y = to_gpu(y).float()
77
len_y = to_gpu(torch.sum(len_y))
78
return
((x, y), y, len_y)
Callers
2
validate
Function · 0.50
main
Function · 0.50
Calls
1
to_gpu
Function · 0.90
Tested by
no test coverage detected