1
这是一个简单的图层,它可以将底层blob传递到顶层,而不会做任何其他操作。在pycaffe中创建一个简单的标识层后,网络不会收敛
import caffe
import numpy as np
class MyCustomLayer(caffe.Layer):
def setup(self, bottom, top):
if len(bottom) != 1:
raise Exception("Wrong number of bottom blobs")
def forward(self, bottom, top):
top[0].data[...] = bottom[0].data
def reshape(self, bottom, top):
top[0].reshape(*bottom[0].shape)
pass
def backward(self, propagate_down, bottom, top):
"""
This layer does not back propagate
"""
pass
然而,在网络中使用时,网络将不会收敛,并会留在0.1
准确性
它是什么,我做错了(使用该层是0.75%,而之前)这里?