Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix retinanet #6870

Merged
merged 3 commits into from
Nov 26, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions oneflow/user/kernels/narrow_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class NarrowKernel final : public user_op::OpKernel {
private:
void Compute(user_op::KernelComputeContext* ctx) const override {
const user_op::Tensor* in = ctx->Tensor4ArgNameAndIndex("in", 0);
if (in->shape().elem_cnt() == 0) { return; }
user_op::Tensor* out = ctx->Tensor4ArgNameAndIndex("out", 0);
const int64_t& dim = ctx->Attr<int64_t>("dim");
const int64_t& start = ctx->Attr<int64_t>("start");
Expand Down
1 change: 1 addition & 0 deletions python/oneflow/framework/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@ def RegisterMethods():
Tensor.__format__ = _format
Tensor.__floordiv__ = _floor_divide
Tensor.__len__ = _len
Tensor.__mod__ = _fmod
Tensor.uniform_ = _uniform
Tensor.trunc_normal_ = _trunc_normal_
Tensor.kaiming_uniform_ = _kaiming_uniform
Expand Down