Giter VIP home page Giter VIP logo

caffe-stn's Introduction

caffe-stn

主要是为了记录stn移植到最新caffe中的过程

参考的caffe实现 https://github.com/happynear/SpatialTransformerLayer 因为时间比较久,所以不适用于新版的caffe

另外,移植过程参考了 https://blog.csdn.net/kuaitoukid/article/details/51035028 同时记录了一些自己的理解

1.首先,编译一个全新的caffe-master。 第一个链接中下载的有3个文件夹:examples、include和src

2.将STN/include/caffe中的.hpp(除filler.hpp)复制到 caffe-master/include/caffe/layers/ 中; 将.hpp中的 #include "caffe/neuron_layers.hpp" 改为 #include "caffe/layers/loss_layer.hpp";

3.将STN/include/caffe/filler.hpp中修改的部分加入到caffe-master/include/caffe/filler.hpp 中

4.将STN/src/caffe/layers/ 中的文件复制到 caffe-master/src/caffe/layers/ 中;

loc_loss_layer.cpp: #include "caffe/vision_layers.hpp" -> //#include "caffe/vision_layers.hpp" #include "caffe/loc_loss_layer.hpp" -> #include "caffe/layers/loc_loss_layer.hpp"

power_file_layer.cpp: #include "caffe/power_file_layer.hpp" -> #include "caffe/layers/power_file_layer.hpp"

st_layer.cpp: #include "caffe/st_layer.hpp" -> #include "caffe/layers/st_layer.hpp"

st_loss_layer.cpp: #include "caffe/vision_layers.hpp" -> //#include "caffe/vision_layers.hpp" #include "caffe/st_loss_layer.hpp" -> #include "caffe/layers/st_loss_layer.hpp"

.cu 和 .cpp 做相同的修改

5.将STN/src/caffe/proto/caffe.proto 中修改的部分加入到caffe-master/src/caffe/proto/caffe.proto 中

5.重新编译即可

caffe-stn's People

Contributors

kaijungao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.