Giter VIP home page Giter VIP logo

Comments (4)

piergiaj avatar piergiaj commented on August 16, 2024

It should. You will have to make some modifications to the vgg and googlenet proto files to collect the switch variables from the pooling layers and you will have to create the proto file for the DeconvNet, just like the example for AlexNet. After that, it should work.

from caffe-deconvnet.

shi69 avatar shi69 commented on August 16, 2024

Thanks for the work, and it works well on AlexNet. So then I replaced the vgg proto file with the following for pooling layer 1 (numbers changed based on layer #). However python will die unexpectedly when I load the modified vgg model (not yet try the inverse net)...Am I doing something wrong here?

...
...
layer {
name: "pool1"
type: "PoolingSwitches"
bottom: "conv1_2"
top: "poolswitches1"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "slice1"
type: "SliceHalf"
bottom: "poolswitches1"
top: "pool1"
top: "switches1"
slice_param {
axis: 0
}
}
...
...

from caffe-deconvnet.

piergiaj avatar piergiaj commented on August 16, 2024

I'm not sure, it looks correct to me. However, it is worth noting that the PoolingSwitches layer and the SliceHalf layer are actually not needed to perform this. I recently discovered that Caffe's Pooling layer will output the switch values when given two tops. All that is really needed is the UnPooling layer. For example:

layer {
  name: "pool"
  type: "Pooling"
  bottom: "conv1"
  top: "pool1"
  top: "switch1"
  pooling_param {
    pool: MAX
    kernel_size: 2
    stride: 2
  }
}


layer {
  name: "unpool1"
  type: "UnPooling"
  bottom: "pool1"
  bottom: "switch1"
  top: "unpool1"
  pooling_param {
    pool: MAX
    kernel_size: 2
    stride: 2
  }
}

I have some updated versions of this code, that I will be pushing soon.

from caffe-deconvnet.

mollyStark avatar mollyStark commented on August 16, 2024

@piergiaj @sunbaigui Hi,I tried to use this for googlenet, but I noticed that googlenet use avg pool rather than max pool, is the switch pool uppooling method fit for the avg pool layer?

from caffe-deconvnet.

Related Issues (14)

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.