Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
06bda58a
Commit
06bda58a
authored
Nov 09, 2017
by
Hamdi Sahloul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DNN Torch - workaround when torch importer is disabled
parent
3921fab2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
torch_importer.cpp
modules/dnn/src/torch/torch_importer.cpp
+14
-8
No files found.
modules/dnn/src/torch/torch_importer.cpp
View file @
06bda58a
...
...
@@ -1198,6 +1198,16 @@ Mat readTorchBlob(const String &filename, bool isBinary)
return
importer
->
tensors
.
begin
()
->
second
;
}
Net
readNetFromTorch
(
const
String
&
model
,
bool
isBinary
)
{
CV_TRACE_FUNCTION
();
TorchImporter
importer
(
model
,
isBinary
);
Net
net
;
importer
.
populateNet
(
net
);
return
net
;
}
#else
Ptr
<
Importer
>
createTorchImporter
(
const
String
&
,
bool
)
...
...
@@ -1212,17 +1222,13 @@ Mat readTorchBlob(const String&, bool)
return
Mat
();
}
#endif //defined(ENABLE_TORCH_IMPORTER) && ENABLE_TORCH_IMPORTER
Net
readNetFromTorch
(
const
String
&
model
,
bool
isBinary
)
{
CV_TRACE_FUNCTION
();
TorchImporter
importer
(
model
,
isBinary
);
Net
net
;
importer
.
populateNet
(
net
);
return
net
;
CV_Error
(
Error
::
StsNotImplemented
,
"Torch importer is disabled in current build"
);
return
Net
();
}
#endif //defined(ENABLE_TORCH_IMPORTER) && ENABLE_TORCH_IMPORTER
CV__DNN_EXPERIMENTAL_NS_END
}}
// namespace
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