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

Train error,maybe something wrong in bounding_box.py #22

Open
Aliengmx opened this issue Mar 25, 2020 · 1 comment
Open

Train error,maybe something wrong in bounding_box.py #22

Aliengmx opened this issue Mar 25, 2020 · 1 comment

Comments

@Aliengmx
Copy link

@mjanusz
Hi, if I used python2.7 I got the same syntax error with #19.
And then I transform to python 3.7 I got another new error:
def _required(bbox: Optional[BoundingBox]) -> BoundingBox:
NameError: name 'Optional' is not defined

Is any help for this issue?

@oradomskyi
Copy link

Hi @Aliengmx

add import line below to the beginning of file bounding_box.py

from typing import Optional

mjanusz pushed a commit that referenced this issue Sep 21, 2020
* Fix for AxisError with numpy 1.18

FFN fails with
`numpy.AxisError: axis 4 is out of bounds for array of dimension 4`

when numpy 1.18 is used.

See the 1.18 note for numpy.expand_dims at
https://numpy.org/doc/stable/reference/generated/numpy.expand_dims.html
```
axis int or tuple of ints
Position in the expanded axes where the new axis (or axes) is placed.

Deprecated since version 1.13.0: Passing an axis where axis > a.ndim will be treated as axis == a.ndim, and passing axis < -a.ndim - 1 will be treated as axis == 0. This behavior is deprecated.

Changed in version 1.18.0: A tuple of axes is now supported. Out of range axes as described above are now forbidden and raise an AxisError.
```

* Fix import error

Training fails since Optional was not imported
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

No branches or pull requests

2 participants