diff options
author | Rodrigo Benenson <rodrigo.benenson@gmail.com> | 2015-10-22 18:18:08 +0200 |
---|---|---|
committer | Rodrigo Benenson <rodrigo.benenson@gmail.com> | 2015-10-22 18:18:08 +0200 |
commit | 09b8738d73ebc37dda09e8c6dd05e35609999c77 (patch) | |
tree | f3f02773f2e7e399868066d85c38313aefa918d4 /python | |
parent | 20c474fe40fe43dee68545dc80809f30ccdbf99b (diff) | |
download | caffeonacl-09b8738d73ebc37dda09e8c6dd05e35609999c77.tar.gz caffeonacl-09b8738d73ebc37dda09e8c6dd05e35609999c77.tar.bz2 caffeonacl-09b8738d73ebc37dda09e8c6dd05e35609999c77.zip |
diff.ndim != 4 is outdated
this code seems not to apply to the caffe head.
```
if diff.ndim != 4:
raise Exception('{} diff is not 4-d'.format(top))
```
Diffstat (limited to 'python')
-rw-r--r-- | python/caffe/pycaffe.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/python/caffe/pycaffe.py b/python/caffe/pycaffe.py index 8ea24da4..7bd4f411 100644 --- a/python/caffe/pycaffe.py +++ b/python/caffe/pycaffe.py @@ -146,8 +146,6 @@ def _Net_backward(self, diffs=None, start=None, end=None, **kwargs): # Set top diffs according to defined shapes and make arrays single and # C-contiguous as Caffe expects. for top, diff in kwargs.iteritems(): - if diff.ndim != 4: - raise Exception('{} diff is not 4-d'.format(top)) if diff.shape[0] != self.blobs[top].num: raise Exception('Diff is not batch sized') self.blobs[top].diff[...] = diff |