projects
/
platform
/
upstream
/
caffe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31a18c2
)
fixes pycaffe forward() and backward() behavior for nets whose layer names do not...
author
Noiredd
<snowball91b@gmail.com>
Wed, 12 Apr 2017 09:59:06 +0000
(11:59 +0200)
committer
Noiredd
<snowball91b@gmail.com>
Wed, 12 Apr 2017 09:59:06 +0000
(11:59 +0200)
python/caffe/pycaffe.py
patch
|
blob
|
history
diff --git
a/python/caffe/pycaffe.py
b/python/caffe/pycaffe.py
index
6360659
..
4a7b5a2
100644
(file)
--- a/
python/caffe/pycaffe.py
+++ b/
python/caffe/pycaffe.py
@@
-113,7
+113,7
@@
def _Net_forward(self, blobs=None, start=None, end=None, **kwargs):
if end is not None:
end_ind = list(self._layer_names).index(end)
- outputs = set([end] + blobs)
+ outputs = set(
self.top_names
[end] + blobs)
else:
end_ind = len(self.layers) - 1
outputs = set(self.outputs + blobs)
@@
-161,7
+161,7
@@
def _Net_backward(self, diffs=None, start=None, end=None, **kwargs):
if end is not None:
end_ind = list(self._layer_names).index(end)
- outputs = set([end] + diffs)
+ outputs = set(
self.bottom_names
[end] + diffs)
else:
end_ind = 0
outputs = set(self.inputs + diffs)