GithubHelp home page GithubHelp logo

Comments (5)

mnikitin avatar mnikitin commented on May 23, 2024 3

@gxstudy Your deploy fc layer should look like:

layer {
  name: "fc9"
  type: "InnerProduct"
  bottom: "fc8"
  top: "fc9"
  inner_product_param {
    num_output: 2
    bias_term: false
  }
}

from largemargin_softmax_loss.

mnikitin avatar mnikitin commented on May 23, 2024 2

You should export LargeMarginInnerProduct weights into new InnerProduct layer without bias term.

from largemargin_softmax_loss.

cocowf avatar cocowf commented on May 23, 2024

the same question :the deploy.prototxt of LargeMargin_Softmax_Loss?
How to edit deploy.prototxt

from largemargin_softmax_loss.

gxstudy avatar gxstudy commented on May 23, 2024

May I ask how to export LargeMarginInnerProduct weights into new InnerProduct layer without bias term in deploy file?

Base on my understanding, when I train the network, I use:

layer {
  name: "fc9"
  type: "LargeMarginInnerProduct"
  bottom: "fc8"
  bottom: "label"
  top: "fc9"
  top: "lambda"
  param {
    name: "fc9"
    lr_mult: 10
  }
  largemargin_inner_product_param {
    num_output: 2
    type: SINGLE
    base: 0
    type: QUADRUPLE 
    base: 1000
    gamma: 0.000025
    power: 35
    iteration: 0
    lambda_min: 0
    weight_filler {
      type: "msra"
    }
  }
  include {
    phase: TRAIN
  }
}

In the deploy, I put:

layer {
  name: "fc9"
  type: "InnerProduct"
  bottom: "fc8"
  top: "fc9"
  param {
    lr_mult: 10
    decay_mult: 1
  }
  inner_product_param {
    num_output: 2
  }
}

Then I got an error when using python interface to test,
Check failed: target_blobs.size() == source_layer.blobs_size() (2 vs. 1) Incompatible number of blobs for layer fc9 *** Check failure stack trace: ***
I guess either because in LargeMarginInnerProduct I have two bottom or two top. Could you please let me know where I am wrong? Thanks a lot. @mnikitin @wy1iu @ydwen

from largemargin_softmax_loss.

gxstudy avatar gxstudy commented on May 23, 2024

Thank you so much, it works. @mnikitin

from largemargin_softmax_loss.

Related Issues (20)

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.