Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
50a52424
Commit
50a52424
authored
May 24, 2017
by
Vladislav Sovrasov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnn: fix possible build problem with tensor flow, get rid of catch(...)
parent
10aee918
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
35 deletions
+11
-35
caffe_importer.cpp
modules/dnn/src/caffe/caffe_importer.cpp
+1
-9
tf_importer.cpp
modules/dnn/src/tensorflow/tf_importer.cpp
+9
-17
torch_importer.cpp
modules/dnn/src/torch/torch_importer.cpp
+1
-9
No files found.
modules/dnn/src/caffe/caffe_importer.cpp
View file @
50a52424
...
...
@@ -374,15 +374,7 @@ Ptr<Importer> cv::dnn::createCaffeImporter(const String&, const String&)
Net
cv
::
dnn
::
readNetFromCaffe
(
const
String
&
prototxt
,
const
String
&
caffeModel
/*= String()*/
)
{
Ptr
<
Importer
>
caffeImporter
;
try
{
caffeImporter
=
createCaffeImporter
(
prototxt
,
caffeModel
);
}
catch
(...)
{
}
Ptr
<
Importer
>
caffeImporter
=
createCaffeImporter
(
prototxt
,
caffeModel
);
Net
net
;
if
(
caffeImporter
)
caffeImporter
->
populateNet
(
net
);
...
...
modules/dnn/src/tensorflow/tf_importer.cpp
View file @
50a52424
...
...
@@ -736,23 +736,6 @@ void TFImporter::populateNet(Net dstNet)
}
// namespace
Net
cv
::
dnn
::
readNetFromTensorflow
(
const
String
&
model
)
{
Ptr
<
Importer
>
importer
;
try
{
importer
=
createTensorflowImporter
(
model
);
}
catch
(...)
{
}
Net
net
;
if
(
importer
)
importer
->
populateNet
(
net
);
return
net
;
}
Ptr
<
Importer
>
cv
::
dnn
::
createTensorflowImporter
(
const
String
&
model
)
{
return
Ptr
<
Importer
>
(
new
TFImporter
(
model
.
c_str
()));
...
...
@@ -767,3 +750,12 @@ Ptr<Importer> cv::dnn::createTensorflowImporter(const String&)
}
#endif //HAVE_PROTOBUF
Net
cv
::
dnn
::
readNetFromTensorflow
(
const
String
&
model
)
{
Ptr
<
Importer
>
importer
=
createTensorflowImporter
(
model
);
Net
net
;
if
(
importer
)
importer
->
populateNet
(
net
);
return
net
;
}
modules/dnn/src/torch/torch_importer.cpp
View file @
50a52424
...
...
@@ -989,15 +989,7 @@ Mat readTorchBlob(const String&, bool)
Net
readNetFromTorch
(
const
String
&
model
,
bool
isBinary
)
{
Ptr
<
Importer
>
importer
;
try
{
importer
=
createTorchImporter
(
model
,
isBinary
);
}
catch
(...)
{
}
Ptr
<
Importer
>
importer
=
createTorchImporter
(
model
,
isBinary
);
Net
net
;
if
(
importer
)
importer
->
populateNet
(
net
);
...
...
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