fix: 移除 c++ 中的中文注释,python TODO 改 FIXME

Signed-off-by: YdrMaster <ydrml@hotmail.com>
This commit is contained in:
YdrMaster 2023-03-15 14:48:39 +08:00
parent 6871fff02b
commit 978269162a
3 changed files with 3 additions and 5 deletions

View File

@ -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
)

View File

@ -30,7 +30,7 @@ void init_graph_builder(py::module &m) {
m, "CpuRuntimeObj");
py::class_<TensorObj, std::shared_ptr<TensorObj>>(m, "TensorObj");
py::enum_<ActType>(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)

View File

@ -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();