forked from jiuyuan/InfiniTensor
fix: 移除 c++ 中的中文注释,python TODO 改 FIXME
Signed-off-by: YdrMaster <ydrml@hotmail.com>
This commit is contained in:
parent
6871fff02b
commit
978269162a
|
@ -63,7 +63,7 @@ def from_onnx(model: onnx.ModelProto):
|
||||||
(alpha, beta, transA, transB) = (
|
(alpha, beta, transA, transB) = (
|
||||||
attributes[name] for name in ["alpha", "beta", "transA", "transB"]
|
attributes[name] for name in ["alpha", "beta", "transA", "transB"]
|
||||||
)
|
)
|
||||||
# TODO 不支持这些参数
|
# FIXME 不支持 `alpha` `beta`
|
||||||
assert alpha == 1.0
|
assert alpha == 1.0
|
||||||
assert beta == 1.0
|
assert beta == 1.0
|
||||||
tensors[node.output[0]] = handler.matmul(
|
tensors[node.output[0]] = handler.matmul(
|
||||||
|
@ -226,7 +226,7 @@ def from_onnx(model: onnx.ModelProto):
|
||||||
tensors.get(node.output[0]),
|
tensors.get(node.output[0]),
|
||||||
)
|
)
|
||||||
elif node.op_type == "Flatten":
|
elif node.op_type == "Flatten":
|
||||||
# TODO 后端算子不支持沿任意轴展开
|
# FIXME 后端算子不支持沿任意轴展开
|
||||||
axis = next(
|
axis = next(
|
||||||
(attr.i for attr in node.attribute if attr.name == "axis"), None
|
(attr.i for attr in node.attribute if attr.name == "axis"), None
|
||||||
)
|
)
|
||||||
|
|
|
@ -30,7 +30,7 @@ void init_graph_builder(py::module &m) {
|
||||||
m, "CpuRuntimeObj");
|
m, "CpuRuntimeObj");
|
||||||
py::class_<TensorObj, std::shared_ptr<TensorObj>>(m, "TensorObj");
|
py::class_<TensorObj, std::shared_ptr<TensorObj>>(m, "TensorObj");
|
||||||
py::enum_<ActType>(m, "ActType")
|
py::enum_<ActType>(m, "ActType")
|
||||||
.value("Linear", ActType::None) // None 是 Python 关键字,不能用
|
.value("Linear", ActType::None) // `None` is Python keyword
|
||||||
.value("Relu", ActType::Relu)
|
.value("Relu", ActType::Relu)
|
||||||
.value("Sigmoid", ActType::Sigmoid)
|
.value("Sigmoid", ActType::Sigmoid)
|
||||||
.value("Tanh", ActType::Tanh)
|
.value("Tanh", ActType::Tanh)
|
||||||
|
|
|
@ -6,8 +6,6 @@ ReduceMeanObj::ReduceMeanObj(GraphObj *graph, Tensor input, Tensor output,
|
||||||
: OperatorObj(OpType::ReduceMean, {input}, {output}), keepDims(keepDims) {
|
: OperatorObj(OpType::ReduceMean, {input}, {output}), keepDims(keepDims) {
|
||||||
const auto size = input->getDims().size();
|
const auto size = input->getDims().size();
|
||||||
if (_axes) {
|
if (_axes) {
|
||||||
// TODO 不需要这个,但需要处理负数,一对相反数应该不能同时出现。
|
|
||||||
// IT_ASSERT((*_axes).size() <= input->getDims().size());
|
|
||||||
for (auto idx : *_axes) {
|
for (auto idx : *_axes) {
|
||||||
if (idx < 0)
|
if (idx < 0)
|
||||||
IT_TODO_HALT();
|
IT_TODO_HALT();
|
||||||
|
|
Loading…
Reference in New Issue