部署 caffe 回归模型 [英] Deploy caffe regression model

查看:24
本文介绍了部署 caffe 回归模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 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.在欧几里得损失的情况下,这应该是什么?

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆