File size: 362 Bytes
a5e4e8f aad22ec a5e4e8f 5d4550d a5e4e8f aad22ec a5e4e8f 5d4550d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import torch
import pipeline
from transformers import pipeline
pipe = pipeline(
task='onnx-base',
model='m3/onnx-base',
batch_size=10,
device='cuda',
)
dummy_input = torch.tensor([[[[1, 2, 3], [4, 5, 6], [7, 8, 9]]]], dtype=torch.float32)
input_data = dummy_input.numpy()
result = pipe(
inputs=input_data, device='cuda',
)
print(result)
|