-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose LayerFactory::LayerTypeList in pycaffe #2930
Conversation
Look good to me :) |
|
||
def test_standard_types(self): | ||
for type_name in ['Data', 'Convolution', 'InnerProduct']: | ||
assert type_name in caffe.layer_type_list(), \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should use self.assertTrue(...)
instead of assert ...
(edit: apparently assertIn
is a thing too, should use that)
LGTM besides above comment. |
Useful for validating NetParameters without crashing on SIGABRT
6cf22fe
to
51b172c
Compare
Thanks for the review. Changed and squashed. Why is Also, can you address this question:
That would be a huge help. |
Thanks for the update! The Edit: more info here -- apparently a plain
I think #1683 tried to do this |
Expose LayerFactory::LayerTypeList in pycaffe
I want to be able to validate NetParameters with pycaffe without waiting for Caffe to crash on SIGABRT.
Exposing
LayerTypeList
in pycaffe lets me check the layer types and handle errors in a reasonable way.Is there any way to catch all CHECK/DCHECK errors with pycaffe and turn them into Python exceptions?