Giter Club home page Giter Club logo

Comments (9)

LYC-vio avatar LYC-vio commented on May 30, 2024

I've found that this problem (has no field named "ceil_mode") could be solved by changing the "ceil_mode: false" line to "round_mode: FLOOR" in the prototxt file to fit the new version of Caffe. The new version of Caffe use round_mode: CEIL/FLOOR to choose which mode to use (default CEIL).

I have tested this modification on Densenet161 and it didn't seem to affect the performance.

Hope this can help.

from densenet-caffe.

mrgransky avatar mrgransky commented on May 30, 2024

Tnx for the update, now I get the following error:

Cannot copy param 0 weights from layer 'conv1'; shape mismatch.  Source param shape is 96 3 7 7 (14112); target param shape is 64 3 7 7 (9408). To learn this layer's parameters from scratch rather than copying from a saved net, rename the layer.
*** Check failure stack trace: ***
Aborted (core dumped)

It seems conv1 should be renamed to something cuz I found similar issue ppl solved this new problem here, but how do we fix it for DenseNet161?

Did u encounter the same problem?

from densenet-caffe.

LYC-vio avatar LYC-vio commented on May 30, 2024

Sorry, I didn't encounter this problem. Maybe you can check whether your .caffemodel file matches the .prototxt file correctly... I mean, the conv1 layer of DenseNet_121 and DenseNet_169 is 64 3 7 while the conv1 layer of DenseNet_161 is 96 3 7, maybe you have mismatched DenseNet_169.caffemodel to DenseNet_161.prototxt or something like that I guess?

from densenet-caffe.

mrgransky avatar mrgransky commented on May 30, 2024

Oohh! yes, u're absolutely right!
I had mistakenly had different weight.caffemodel and deploy.prototxt files! now it works flawless with modification u suggested: replace ceil_mode: false in deploy.prototxt to round_mode: FLOOR.
Cheers,

from densenet-caffe.

LYC-vio avatar LYC-vio commented on May 30, 2024

Congrats! Happy to hear that!

from densenet-caffe.

mrgransky avatar mrgransky commented on May 30, 2024

In another PC in which caffe-gpu is installed via anaconda, I get error for both ceil_mode: false and round_mode: FLOOR though!

deploy.prototxt with ceil_mode: false:

[libprotobuf ERROR google/protobuf/text_format.cc:307] Error parsing text-format caffe.NetParameter: 54:14: Message type "caffe.PoolingParameter" has no field named "ceil_mode".
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0517 18:27:14.369987 16944 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: MODELS/DenseNet161/ImageNet/deploy.prototxt
*** Check failure stack trace: ***
Aborted

deploy.prototxt with round_mode: FLOOR:

[libprotobuf ERROR google/protobuf/text_format.cc:307] Error parsing text-format caffe.NetParameter: 54:15: Message type "caffe.PoolingParameter" has no field named "round_mode".
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0517 18:32:19.467856 17462 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: MODELS/DenseNet161/ImageNet/deploy.prototxt
*** Check failure stack trace: ***
Aborted

This is my python specification and caffe version:

Python 2.7.17 |Anaconda, Inc.| (default, Oct 21 2019, 19:04:46) 
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import caffe
>>> caffe.__version__
'1.0.0'

I also noticed #32 is an open issue regarding this but is there any workaround for anaconda version of caffe?

from densenet-caffe.

LYC-vio avatar LYC-vio commented on May 30, 2024

I don't have any idea about this error message... A possible solution is to check those corresponding lines mentioned by https://github.com/BVLC/caffe/pull/3057/files (see also #1) in caffe-gpu from anaconda to see what params are actually used and modify the .prototxt file.

from densenet-caffe.

LYC-vio avatar LYC-vio commented on May 30, 2024

Alternatively, you can install another caffe from source code and use sys.path.insert to specify which caffe to use.
eg:

import sys
sys.path.insert(0,"path/to/your/caffe/python")
import caffe

from densenet-caffe.

mrgransky avatar mrgransky commented on May 30, 2024

@LYC-vio I'm afraid installing caffe from source is an option cuz this a univ GPU clusters and we do not get sudo prriviledge for package installation/manipulation!

from densenet-caffe.

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.