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%,而之前)這裏?