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
OpenDAS
dlib
Commits
16cd104b
Commit
16cd104b
authored
May 07, 2017
by
Davis King
Browse files
Fixed affine_fc and clarified error message.
parent
c41b30a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
tools/convert_dlib_nets_to_caffe/main.cpp
tools/convert_dlib_nets_to_caffe/main.cpp
+2
-3
No files found.
tools/convert_dlib_nets_to_caffe/main.cpp
View file @
16cd104b
...
...
@@ -253,19 +253,18 @@ void convert_dlib_xml_to_cafffe_python_code(
else
if
(
i
->
detail_name
==
"bn_con"
||
i
->
detail_name
==
"bn_fc"
)
{
throw
dlib
::
error
(
"Conversion from dlib's batch norm layers to caffe's isn't supported. Instead, "
"you should put your network into 'test mode' by switching batch norm layers to affine layers."
);
"you should put your dlib network into 'test mode' by switching batch norm layers to affine layers. "
"Then you can convert that 'test mode' network to caffe."
);
}
else
if
(
i
->
detail_name
==
"affine_con"
)
{
fout
<<
" n."
<<
i
->
caffe_layer_name
()
<<
" = L.Scale(n."
<<
find_input_layer_caffe_name
(
i
);
fout
<<
", axis=1"
;
fout
<<
", bias_term=True"
;
fout
<<
");
\n
"
;
}
else
if
(
i
->
detail_name
==
"affine_fc"
)
{
fout
<<
" n."
<<
i
->
caffe_layer_name
()
<<
" = L.Scale(n."
<<
find_input_layer_caffe_name
(
i
);
fout
<<
", axis=3"
;
fout
<<
", bias_term=True"
;
fout
<<
");
\n
"
;
}
...
...
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