部署Caffe回归模型 [英] Deploy caffe regression model
问题描述
我已经用caffe
训练了回归网络.我在训练和测试阶段都使用"EuclideanLoss"
层.我已经绘制了这些图,结果看起来很有希望.
I have trained a regression network with caffe
. I use "EuclideanLoss"
layer in both the train and test phase. I have plotted these and the results look promising.
现在,我想部署模型并使用它.我知道如果使用SoftmaxLoss
,则最后一层必须在部署文件中为Softmax
. Euclidean loss
应该是什么?
Now I want to deploy the model and use it. I know that if SoftmaxLoss
is used, the final layer must be Softmax
in the deploy file. What should this be in the case of Euclidean loss
?
推荐答案
对于部署,您只需要丢弃损失层,在本例中为"EuclideanLoss"
层.网络的输出是您为损失层提供的"bottom"
.
For deploy you only need to discard the loss layer, in your case the "EuclideanLoss"
layer. The output of your net is the "bottom"
you fed the loss layer.
对于"SoftmaxWithLoss"
层(和"SigmoidCrossEntropy"
),您需要替换损耗层,因为损耗层在其中包括一个额外的层(出于计算原因).
For "SoftmaxWithLoss"
layer (and "SigmoidCrossEntropy"
) you need to replace the loss layer, since the loss layer includes an extra layer inside it (for computational reasons).
这篇关于部署Caffe回归模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!