diff --git a/pyinfinitensor/src/pyinfinitensor/onnx.py b/pyinfinitensor/src/pyinfinitensor/onnx.py index 03b6866f..a429368f 100644 --- a/pyinfinitensor/src/pyinfinitensor/onnx.py +++ b/pyinfinitensor/src/pyinfinitensor/onnx.py @@ -63,7 +63,7 @@ def from_onnx(model: onnx.ModelProto): (alpha, beta, transA, transB) = ( attributes[name] for name in ["alpha", "beta", "transA", "transB"] ) - # TODO 不支持这些参数 + # FIXME 不支持 `alpha` `beta` assert alpha == 1.0 assert beta == 1.0 tensors[node.output[0]] = handler.matmul( @@ -226,7 +226,7 @@ def from_onnx(model: onnx.ModelProto): tensors.get(node.output[0]), ) elif node.op_type == "Flatten": - # TODO 后端算子不支持沿任意轴展开 + # FIXME 后端算子不支持沿任意轴展开 axis = next( (attr.i for attr in node.attribute if attr.name == "axis"), None ) diff --git a/src/ffi/ffi_infinitensor.cc b/src/ffi/ffi_infinitensor.cc index 9300cdb8..37b7d5da 100644 --- a/src/ffi/ffi_infinitensor.cc +++ b/src/ffi/ffi_infinitensor.cc @@ -30,7 +30,7 @@ void init_graph_builder(py::module &m) { m, "CpuRuntimeObj"); py::class_>(m, "TensorObj"); py::enum_(m, "ActType") - .value("Linear", ActType::None) // None 是 Python 关键字,不能用 + .value("Linear", ActType::None) // `None` is Python keyword .value("Relu", ActType::Relu) .value("Sigmoid", ActType::Sigmoid) .value("Tanh", ActType::Tanh) diff --git a/src/operators/reduce_mean.cc b/src/operators/reduce_mean.cc index 3a562abb..95e09dc5 100644 --- a/src/operators/reduce_mean.cc +++ b/src/operators/reduce_mean.cc @@ -6,8 +6,6 @@ ReduceMeanObj::ReduceMeanObj(GraphObj *graph, Tensor input, Tensor output, : OperatorObj(OpType::ReduceMean, {input}, {output}), keepDims(keepDims) { const auto size = input->getDims().size(); if (_axes) { - // TODO 不需要这个,但需要处理负数,一对相反数应该不能同时出现。 - // IT_ASSERT((*_axes).size() <= input->getDims().size()); for (auto idx : *_axes) { if (idx < 0) IT_TODO_HALT();