Spaces:
Running
Running
File size: 332 Bytes
dc2106c |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
# Copyright (c) ONNX Project Contributors
# SPDX-License-Identifier: Apache-2.0
from onnx.reference.ops.aionnxml._op_run_aionnxml import OpRunAiOnnxMl
class Scaler(OpRunAiOnnxMl):
def _run(self, x, offset=None, scale=None): # type: ignore
dx = x - offset
return ((dx * scale).astype(x.dtype),)
|