File tree Expand file tree Collapse file tree 1 file changed +16
-15
lines changed Expand file tree Collapse file tree 1 file changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -971,6 +971,22 @@ Mat readTorchBlob(const String &filename, bool isBinary)
971
971
return importer->tensors .begin ()->second ;
972
972
}
973
973
974
+ #else
975
+
976
+ Ptr<Importer> createTorchImporter (const String&, bool )
977
+ {
978
+ CV_Error (Error::StsNotImplemented, " Torch importer is disabled in current build" );
979
+ return Ptr<Importer>();
980
+ }
981
+
982
+ Mat readTorchBlob (const String&, bool )
983
+ {
984
+ CV_Error (Error::StsNotImplemented, " Torch importer is disabled in current build" );
985
+ return Mat ();
986
+ }
987
+
988
+ #endif // defined(ENABLE_TORCH_IMPORTER) && ENABLE_TORCH_IMPORTER
989
+
974
990
Net readNetFromTorch (const String &model, bool isBinary)
975
991
{
976
992
Ptr<Importer> importer;
@@ -988,20 +1004,5 @@ Net readNetFromTorch(const String &model, bool isBinary)
988
1004
return net;
989
1005
}
990
1006
991
- #else
992
-
993
- Ptr<Importer> createTorchImporter (const String&, bool )
994
- {
995
- CV_Error (Error::StsNotImplemented, " Torch importer is disabled in current build" );
996
- return Ptr<Importer>();
997
- }
998
-
999
- Mat readTorchBlob (const String&, bool )
1000
- {
1001
- CV_Error (Error::StsNotImplemented, " Torch importer is disabled in current build" );
1002
- return Mat ();
1003
- }
1004
-
1005
- #endif // defined(ENABLE_TORCH_IMPORTER) && ENABLE_TORCH_IMPORTER
1006
1007
}
1007
1008
}
You can’t perform that action at this time.
0 commit comments