Giter Site home page Giter Site logo

how to build this about tripletloss HOT 9 CLOSED

GuitarZhang avatar GuitarZhang commented on June 26, 2024
how to build this

from tripletloss.

Comments (9)

luhaofang avatar luhaofang commented on June 26, 2024

Hi,
Firstly you should makesure your caffe is built for Python layers. If not open "Makefile.config" in caffe root and uncomment the line “WITH_PYTHON_LAYER := 1”.Rebuild caffe.

Go to tripletloss root path. Add tripletloss root path to train.py.

Change the configs in config.py then caffe can create the network.

Note :Training a network you should read the code first.

from tripletloss.

GuitarZhang avatar GuitarZhang commented on June 26, 2024

When I run train.py , an error occurred, " No module named tripletloss.datalayer"。
You said "Add tripletloss root path to train.py", I only changed pathes in main function, is it right?

from tripletloss.

GuitarZhang avatar GuitarZhang commented on June 26, 2024

" No module named tripletloss.datalayer"这个错误解决了,把module设置为datalayer就好了。
出现了另外一个问题,“AttributeError: 'DataLayer' object has no attribute 'param_str_'”,我查了caffe的源码也没有找到这个param_str_,这是哪里错了呢?

from tripletloss.

luhaofang avatar luhaofang commented on June 26, 2024

你的python路径没有找到,这几个datalayer都是python写的,需要添加工程的根路径到你的python中

from tripletloss.

GuitarZhang avatar GuitarZhang commented on June 26, 2024

不知道楼主的比对结果是多少呢?我看tripletselectlayer里面是把if an > ap:记下来了,应该是ap>an吧?

from tripletloss.

luhaofang avatar luhaofang commented on June 26, 2024

semi-hard的筛选请参见paper的内容。
个人感觉这里应该有一些trick,似乎可以通过设置区间参数来调整样本的筛选,本人也做了些调整,但目前并未发现选择 an > ap + beta 区间,对结果产生的差异性表现

from tripletloss.

GuitarZhang avatar GuitarZhang commented on June 26, 2024

恩,恩论文中看到了。tripletselectlayer这一层需要backward吗?总感觉不backward,loss像传不到前面似的。

from tripletloss.

GuitarZhang avatar GuitarZhang commented on June 26, 2024

我运行的时候所有的都显示not need backward computation,不知哪里出了问题?
tripletloss does not need backward computation.
I0504 18:03:40.812458 66083 net.cpp:228] triplet_select does not need backward computation.
I0504 18:03:40.812466 66083 net.cpp:228] norm2 does not need backward computation.
I0504 18:03:40.812474 66083 net.cpp:228] drop8 does not need backward computation.
I0504 18:03:40.812482 66083 net.cpp:228] relu8 does not need backward computation.
I0504 18:03:40.812489 66083 net.cpp:228] fc9 does not need backward computation.
I0504 18:03:40.812497 66083 net.cpp:228] drop7 does not need backward computation.
I0504 18:03:40.812505 66083 net.cpp:228] relu7 does not need backward computation.
I0504 18:03:40.812512 66083 net.cpp:228] fc7 does not need backward computation.
I0504 18:03:40.812520 66083 net.cpp:228] drop6 does not need backward computation.
I0504 18:03:40.812528 66083 net.cpp:228] relu6 does not need backward computation.
I0504 18:03:40.812536 66083 net.cpp:228] fc6 does not need backward computation.
I0504 18:03:40.812544 66083 net.cpp:228] pool5 does not need backward computation.
I0504 18:03:40.812557 66083 net.cpp:228] relu5_3 does not need backward computation.
I0504 18:03:40.812566 66083 net.cpp:228] conv5_3 does not need backward computation.
I0504 18:03:40.812573 66083 net.cpp:228] relu5_2 does not need backward computation.
I0504 18:03:40.812582 66083 net.cpp:228] conv5_2 does not need backward computation.
I0504 18:03:40.812590 66083 net.cpp:228] relu5_1 does not need backward computation.
I0504 18:03:40.812597 66083 net.cpp:228] conv5_1 does not need backward computation.
I0504 18:03:40.812605 66083 net.cpp:228] pool4 does not need backward computation.
I0504 18:03:40.812613 66083 net.cpp:228] relu4_3 does not need backward computation.
I0504 18:03:40.812621 66083 net.cpp:228] conv4_3 does not need backward computation.
I0504 18:03:40.812629 66083 net.cpp:228] relu4_2 does not need backward computation.
I0504 18:03:40.812638 66083 net.cpp:228] conv4_2 does not need backward computation.
I0504 18:03:40.812662 66083 net.cpp:228] relu4_1 does not need backward computation.
I0504 18:03:40.812672 66083 net.cpp:228] conv4_1 does not need backward computation.
I0504 18:03:40.812680 66083 net.cpp:228] pool3 does not need backward computation.
I0504 18:03:40.812688 66083 net.cpp:228] relu3_3 does not need backward computation

from tripletloss.

louielu1027 avatar louielu1027 commented on June 26, 2024

@GuitarZhang 您好,我也遇到了您的问题,AttributeError: 'DataLayer' object has no attribute 'param_str_;请问您如何解决这个问题的?具体过程有吗?

from tripletloss.

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.