Skip to content

Commit 87173dd

Browse files
committed
check class of gpuarray properly
1 parent 8a78249 commit 87173dd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

code/mtcnn/+mtcnn/proposeRegions.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414
% Copyright 2019 The MathWorks, Inc.
1515

1616
useDagNet = isa(weightsOrNet, "DAGNetwork");
17-
assert(isa(im, "single"), "mtcnn:proposeRegions:wrongImageType", ...
17+
if isa(im, "gpuArray")
18+
imClass = classUnderlying(im);
19+
else
20+
imClass = class(im);
21+
end
22+
assert(imClass == "single", "mtcnn:proposeRegions:wrongImageType", ...
1823
"Input image should be a single scale -1 to 1");
1924

2025
% Stride of the proposal network

0 commit comments

Comments
 (0)