File size: 273 Bytes
a5e4e8f aad22ec a5e4e8f 5d4550d a5e4e8f 22fe4c5 a5e4e8f 22fe4c5 a5e4e8f 5d4550d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import torch
import pipeline
from transformers import pipeline
pipe = pipeline(
task='onnx-base',
model='m3/onnx-base',
batch_size=10,
device='cpu',
)
input = torch.tensor([[1, 2], [3, 4]], dtype=torch.float32).numpy()
result = pipe(input)
print(result)
|