提交 164d9cdf 编写于 作者: M Megvii Engine Team

feat(mge): do not export F.nn.linear

GitOrigin-RevId: 589964729da1b933333f475ee39e4f0a40bbfdde
上级 e42679b5
......@@ -37,7 +37,6 @@ __all__ = [
"dropout",
"indexing_one_hot",
"leaky_relu",
"linear",
"local_conv2d",
"logsigmoid",
"logsumexp",
......
......@@ -7,7 +7,7 @@
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import numpy as np
from ..functional import linear
from ..functional.nn import linear
from ..tensor import Parameter
from . import init
from .module import Module
......
......@@ -31,7 +31,7 @@ class Linear(QuantizedModule):
inp_scale = dtype.get_scale(inp.dtype)
w_scale = dtype.get_scale(self.weight.dtype)
bias_dtype = dtype.qint32(inp_scale * w_scale)
return F.linear(
return F.nn.linear(
inp,
self.weight,
None if self.bias is None else self.bias.astype(bias_dtype),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册