Kano001's picture
Upload 2707 files
dc2106c verified
raw
history blame
332 Bytes
# 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),)