Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
zjhellofss committed Apr 21, 2024
2 parents 3bb5a7b + 69798bc commit a74906d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
- [TypeFloat](https://github.com/TypeFloat)
- [Jasmine-up](https://github.com/Jasmine-up)
- [PerrySkywalker](https://github.com/PerrySkywalker)
- [delve-wang](https://github.com/delve-wang)

### 如何参与项目贡献?
1. 提交代码增加新功能或修改bug;
Expand Down
7 changes: 1 addition & 6 deletions source/layer/details/upsample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,13 @@ StatusCode UpSampleLayer::Forward(const std::vector<std::shared_ptr<Tensor<float
const uint32_t dest_w = w * scale_w;
const float* input_col_ptr = input_channel.colptr(w);
for (uint32_t sw = 0; sw < scale_w; ++sw) {
if (dest_w + sw >= output_w) {
continue;
}
float* output_col_ptr = output_channel.colptr(dest_w + sw);
for (uint32_t h = 0; h < input_h; ++h) {
const uint32_t dest_h = h * scale_h;
float* output_ptr = output_col_ptr + dest_h;
const float input_value = *(input_col_ptr + h);
for (uint32_t sh = 0; sh < scale_h; ++sh) {
if (dest_h + sh < output_h) {
*(output_ptr + sh) = input_value;
}
*(output_ptr + sh) = input_value;
}
}
}
Expand Down

0 comments on commit a74906d

Please sign in to comment.