提交 9c929a49 编写于 作者: W wanghaoshuang

Fix warning log

上级 f31217fc
...@@ -30,7 +30,7 @@ template <typename Place, typename T, size_t D> ...@@ -30,7 +30,7 @@ template <typename Place, typename T, size_t D>
void PadFunction(const framework::ExecutionContext& context) { void PadFunction(const framework::ExecutionContext& context) {
auto pads = context.Attr<std::vector<int>>("paddings"); auto pads = context.Attr<std::vector<int>>("paddings");
Eigen::array<std::pair<int, int>, D> paddings; Eigen::array<std::pair<int, int>, D> paddings;
for (int i = 0; i < paddings.size(); ++i) { for (size_t i = 0; i < paddings.size(); ++i) {
paddings[i].first = pads[i * 2]; paddings[i].first = pads[i * 2];
paddings[i].second = pads[i * 2 + 1]; paddings[i].second = pads[i * 2 + 1];
} }
...@@ -81,7 +81,7 @@ template <typename Place, typename T, size_t D> ...@@ -81,7 +81,7 @@ template <typename Place, typename T, size_t D>
void PadGradFunction(const framework::ExecutionContext& context) { void PadGradFunction(const framework::ExecutionContext& context) {
auto pads = context.Attr<std::vector<int>>("paddings"); auto pads = context.Attr<std::vector<int>>("paddings");
Eigen::array<std::pair<int, int>, D> paddings; Eigen::array<std::pair<int, int>, D> paddings;
for (int i = 0; i < paddings.size(); ++i) { for (size_t i = 0; i < paddings.size(); ++i) {
paddings[i].first = -pads[i * 2]; paddings[i].first = -pads[i * 2];
paddings[i].second = -pads[i * 2 + 1]; paddings[i].second = -pads[i * 2 + 1];
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册