If you call net.forward(end='somelayer') from python, where somelayer is a layer that has a different name for its output blob, _Net_forward() will attempt to access net.blobs['somelayer'] (and in fact, returns this as the output). This happens because this line appends the end layer name to the list of blobs to be output. If the appended name doesn't exist as a blob, the result is an exception.
Note that there may also be multiple outputs for the end layer, in which case the current behavior doesn't make sense either.
If you call
net.forward(end='somelayer')from python, wheresomelayeris a layer that has a different name for its output blob, _Net_forward() will attempt to accessnet.blobs['somelayer'](and in fact, returns this as the output). This happens because this line appends the end layer name to the list of blobs to be output. If the appended name doesn't exist as a blob, the result is an exception.Note that there may also be multiple outputs for the end layer, in which case the current behavior doesn't make sense either.