Code Monkey home page Code Monkey logo

Comments (2)

kwakai3 avatar kwakai3 commented on September 27, 2024 9

I could fix the error by modification of cudnnBinarySpatialConvolution.lua as follows.

Lines 71 to 73:
Original
errcheck('cudnnSetFilterNdDescriptor', self.weightDesc[0],
'CUDNN_DATA_FLOAT', 4,
desc:data());

Modified
errcheck('cudnnSetFilterNdDescriptor', self.weightDesc[0],
'CUDNN_DATA_FLOAT', 'CUDNN_TENSOR_NCHW', 4,
desc:data());

from binarynet.

MinLiAmoy avatar MinLiAmoy commented on September 27, 2024

same error occurs when using "nn" library on CPU, but BinarySpatialConvolution.lua doesn't have such errcheck code. How to modify it?
the error is shown below:
Epoch 1
/home/ml/torch/install/bin/luajit: /home/ml/torch/install/share/lua/5.1/nn/Container.lua:67:
In 23 module of nn.Sequential:
/home/ml/torch/install/share/lua/5.1/nn/THNN.lua:110: bad argument #8 to 'v' (cannot convert 'struct THFloatTensor *' to 'int')
stack traceback:
[C]: in function 'v'
/home/ml/torch/install/share/lua/5.1/nn/THNN.lua:110: in function 'SpatialConvolutionMM_updateGradInput'
...CLA/work/BinaryNet-1/Models/BinarySpatialConvolution.lua:150: in function 'updateGradInput'
/home/ml/torch/install/share/lua/5.1/nn/Module.lua:31: in function </home/ml/torch/install/share/lua/5.1/nn/Module.lua:29>
[C]: in function 'xpcall'
/home/ml/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
/home/ml/torch/install/share/lua/5.1/nn/Sequential.lua:84: in function 'backward'
Main_BinaryNet_Cifar10.lua:227: in function 'opfunc'
./adaMax_binary_clip_shift.lua:38: in function 'adaMax_binary_clip_shift'
Main_BinaryNet_Cifar10.lua:231: in function 'Train'
Main_BinaryNet_Cifar10.lua:270: in main chunk
[C]: in function 'dofile'
...e/ml/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d50

WARNING: If you see a stack trace below, it doesn't point to the place where this error occurred. Please use only the one above.
stack traceback:
[C]: in function 'error'
/home/ml/torch/install/share/lua/5.1/nn/Container.lua:67: in function 'rethrowErrors'
/home/ml/torch/install/share/lua/5.1/nn/Sequential.lua:84: in function 'backward'
Main_BinaryNet_Cifar10.lua:227: in function 'opfunc'
./adaMax_binary_clip_shift.lua:38: in function 'adaMax_binary_clip_shift'
Main_BinaryNet_Cifar10.lua:231: in function 'Train'
Main_BinaryNet_Cifar10.lua:270: in main chunk
[C]: in function 'dofile'
...e/ml/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d50

from binarynet.

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.