Skip to content

Commit

Permalink
Add more informative error message to alleviate confusion in BVLC#11
Browse files Browse the repository at this point in the history
  • Loading branch information
yosinski committed Aug 11, 2015
1 parent 2e1452d commit 5860c41
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions caffevis/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,19 @@ def run(self):
if back_mode == 'grad':
with WithTimer('CaffeProcThread:backward', quiet = self.debug_level < 1):
#print '**** Doing backprop with %s diffs in [%s,%s]' % (backprop_layer, diffs.min(), diffs.max())
self.net.backward_from_layer(backprop_layer, diffs, zero_higher = True)
try:
self.net.backward_from_layer(backprop_layer, diffs, zero_higher = True)
except AttributeError:
print 'ERROR: required bindings (backward_from_layer) not found! Try using the deconv-deep-vis-toolbox branch as described here: https://github.com/yosinski/deep-visualization-toolbox'
raise
else:
with WithTimer('CaffeProcThread:deconv', quiet = self.debug_level < 1):
#print '**** Doing deconv with %s diffs in [%s,%s]' % (backprop_layer, diffs.min(), diffs.max())
self.net.deconv_from_layer(backprop_layer, diffs, zero_higher = True)
try:
self.net.deconv_from_layer(backprop_layer, diffs, zero_higher = True)
except AttributeError:
print 'ERROR: required bindings (deconv_from_layer) not found! Try using the deconv-deep-vis-toolbox branch as described here: https://github.com/yosinski/deep-visualization-toolbox'
raise

with self.state.lock:
self.state.back_stale = False
Expand Down

0 comments on commit 5860c41

Please sign in to comment.