Skip to content

When boxes is empty, it throws an error.#7

Open
sitifukujin wants to merge 5 commits intoHakuyume:masterfrom
sitifukujin:boxemptybugfix
Open

When boxes is empty, it throws an error.#7
sitifukujin wants to merge 5 commits intoHakuyume:masterfrom
sitifukujin:boxemptybugfix

Conversation

@sitifukujin
Copy link

When boxes is empty, it throws an error.

Copy link
Owner

@Hakuyume Hakuyume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution.

  1. Please use flake8 to check your coding style.
  2. You are using unknown as your name. Is it OK? After merging your PR, you can not change it.

if len(all_boxes) != 0 :
return np.stack(all_boxes), np.stack(all_labels), np.stack(all_scores)
else:
return np.zeros(0),np.zeros(0),np.zeros(0)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shape of boxes should be (0, 4).

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zeros -> empty

if len(all_boxes) != 0 :
return np.stack(all_boxes), np.stack(all_labels), np.stack(all_scores)
else:
return np.zeros(0),np.zeros(0),np.zeros(0)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zeros -> empty

all_scores.append(label_scores[i])

return np.stack(all_boxes), np.stack(all_labels), np.stack(all_scores)
if len(all_boxes) != 0 :
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!= -> >.

Copy link
Author

@sitifukujin sitifukujin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I did't know these checking tool.
It leads the beginner like me to write proper code.

@sitifukujin
Copy link
Author

Sorry, I don't know how to re-request pull request. Could you get my second version?

@Hakuyume
Copy link
Owner

Hakuyume commented Jun 5, 2017

Sorry, I don't know how to re-request pull request. Could you get my second version?

You can use git rebase and git push -f to rewrite commits.

@sitifukujin
Copy link
Author

I have already pushed the commitment into boxemptybugfix branch.

In my browser, I can see the my second source with the comment ("refactored on plint, flake8 and so on 9f60f42.") on the line. And in "files changes" tabs, second source are shown.
But I could know whether you see same thing and you could merge it.
Sorry, this is my first contribution.

I have to leave my office.
If not succeeded, I will try to do again tomorrow. Thanks for your kindness.

@Hakuyume
Copy link
Owner

Hakuyume commented Jun 6, 2017

In my browser, I can see the my second source with the comment ("refactored on plint, flake8 and so on 9f60f42.") on the line. And in "files changes" tabs, second source are shown.
But I could know whether you see same thing and you could merge it.

I can see two commits: 0de9fe4 and 9f60f42. If I merge this PR, both commits are merged. However, I can't merge them because you have not reflected my comments yet.

@sitifukujin
Copy link
Author

sitifukujin commented Jun 6, 2017

This version only obeys flake8 (pylint seems dislking "len()")
How about it?

@Hakuyume
Copy link
Owner

Hakuyume commented Jun 6, 2017

Please check #7 (comment) and #7 (review) .2

np.stack(all_scores)
else:
return np.empty(0), np.empty(0), np.empty(0)
return np.empty((0,4)), np.empty((0,4)), np.empty((0,4))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

np.empty(0) for labels and scores.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

        return np.empty((0,4)), np.empty(0), np.empty(0)

?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good (don't forget to use flake8)

@Hakuyume
Copy link
Owner

Hakuyume commented Jun 6, 2017

  1. You are using unknown as your name. Is it OK? After merging your PR, you can not change it.

I found you changed the author name of commits. But the name for the first two commits are still unknown.

@sitifukujin
Copy link
Author

It is difficult to change name on my git-tool.
I don't want to put my id. As the beginner like me, it does't seem value to name.
What effect will unknown make? I don't take care.

@Hakuyume
Copy link
Owner

Hakuyume commented Jun 6, 2017

I don't want to put my id. As the beginner like me, it does't seem value to name.
What effect will unknown make? I don't take care.

The only problem of unknown is that you can not show your contributions. So it is OK. (I just want to know if you mind it or not).

@sitifukujin
Copy link
Author

Hakuyume-san, thank you very much.
I missed your second comment since it don't show on conversation tab.
Your are good trainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants