Skip to content

Commit

Permalink
fix: use std::nullopt as the default initial value for optional<vecto…
Browse files Browse the repository at this point in the history
…r<Shape>>
  • Loading branch information
kilinchange committed Aug 5, 2024
1 parent 3d00eac commit 068e8ab
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions docs/训练营作业介绍.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
// REF: https://onnx.ai/onnx/operators/onnx__Transpose.html#transpose-21
// =================================== 作业 ===================================
return {{}};
return std::nullopt;
}
````
Expand All @@ -130,7 +130,7 @@
// TODO:返回经过 clip 操作后的 shape
// REF: https://onnx.ai/onnx/operators/onnx__Clip.html#clip-13
// =================================== 作业 ===================================
return {{}};
return std::nullopt;
}
````
Expand Down Expand Up @@ -159,7 +159,7 @@
// TODO:返回经过 cast 操作后的 shape
// REF: https://onnx.ai/onnx/operators/onnx__Cast.html#cast-21
// =================================== 作业 ===================================
return {{}};
return std::nullopt;
}
````

Expand Down Expand Up @@ -222,7 +222,7 @@ optional<vector<Shape>> MatmulObj::inferShape(const TensorVec &inputs)
// TODO:返回经过 matmul 操作后的 shape
// REF: https://github.com/onnx/onnx/blob/main/docs/Operators.md#gemm
// =================================== 作业 ===================================
return {{}};
return std::nullopt;
}
````
Expand Down
2 changes: 1 addition & 1 deletion src/operators/matmul.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace infini
// TODO:返回经过 matmul 操作后的 shape
// REF: https://github.com/onnx/onnx/blob/main/docs/Operators.md#gemm
// =================================== 作业 ===================================
return {{}};
return std::nullopt;
}

} // namespace infini
2 changes: 1 addition & 1 deletion src/operators/transpose.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace infini
// REF: https://onnx.ai/onnx/operators/onnx__Transpose.html#transpose-21
// =================================== 作业 ===================================

return {{}};
return std::nullopt;
}

std::string TransposeObj::toString() const
Expand Down
4 changes: 2 additions & 2 deletions src/operators/unary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace infini
// TODO:返回经过 clip 操作后的 shape
// REF: https://onnx.ai/onnx/operators/onnx__Clip.html#clip-13
// =================================== 作业 ===================================
return {{}};
return std::nullopt;
}

std::string ClipObj::toString() const
Expand Down Expand Up @@ -75,7 +75,7 @@ namespace infini
// TODO:返回经过 cast 操作后的 shape
// REF: https://onnx.ai/onnx/operators/onnx__Cast.html#cast-21
// =================================== 作业 ===================================
return {{}};
return std::nullopt;
}

std::string CastObj::toString() const
Expand Down

0 comments on commit 068e8ab

Please sign in to comment.