Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dcuai
dlexamples
Commits
f4e6a6c7
Commit
f4e6a6c7
authored
Jul 06, 2022
by
lidc
Browse files
修改错误number of rows must be a positive integer,not 4.0,该错误在v100上不会出现
parent
9086775f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
PyTorch/Compute-Vision/Objection/YOLOv3/utils/utils.py
PyTorch/Compute-Vision/Objection/YOLOv3/utils/utils.py
+1
-1
No files found.
PyTorch/Compute-Vision/Objection/YOLOv3/utils/utils.py
View file @
f4e6a6c7
...
@@ -872,7 +872,7 @@ def plot_images(imgs, targets, paths=None, fname='images.png'):
...
@@ -872,7 +872,7 @@ def plot_images(imgs, targets, paths=None, fname='images.png'):
fig
=
plt
.
figure
(
figsize
=
(
10
,
10
))
fig
=
plt
.
figure
(
figsize
=
(
10
,
10
))
bs
,
_
,
h
,
w
=
imgs
.
shape
# batch size, _, height, width
bs
,
_
,
h
,
w
=
imgs
.
shape
# batch size, _, height, width
bs
=
min
(
bs
,
16
)
# limit plot to 16 images
bs
=
min
(
bs
,
16
)
# limit plot to 16 images
ns
=
np
.
ceil
(
bs
**
0.5
)
# number of subplots
ns
=
int
(
np
.
ceil
(
bs
**
0.5
)
)
# number of subplots
for
i
in
range
(
bs
):
for
i
in
range
(
bs
):
boxes
=
xywh2xyxy
(
targets
[
targets
[:,
0
]
==
i
,
2
:
6
]).
T
boxes
=
xywh2xyxy
(
targets
[
targets
[:,
0
]
==
i
,
2
:
6
]).
T
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment