Code Monkey home page Code Monkey logo

torch's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

torch's Issues

Binary file incompatibility?

Hi, thank you for great work. It runs faster than original torch on Xeon.

However, I'm having one trouble while trying to load trained .t7 files. These .t7 files are trained on GPGPU torch but converted for CPU. Original torch on CPU (without GPGPU) works well with these .t7 files. However, Intel torch shows following error message.

$ th ...
| loading model file...
/home/.../torch/inteltorch/install/bin/lua: .../torch/inteltorch/install/share/lua/5.2/torch/
File.lua:301: Failed to load function from bytecode: binary string: not a precompiled chunk
stack traceback:
        [C]: in function 'error'
        .../torch/inteltorch/install/share/lua/5.2/torch/File.lua:301: in function 'readObject'
        .../torch/inteltorch/install/share/lua/5.2/torch/File.lua:369: in function 'readObject'

Any idea? Thanks.

lua <-> torch dependency error

When installing the MKL branch intel/torch implementation, I am subsequently unable to install nn lua rock:

luarock install nn

Here's the error that I get:

Cloning into 'nn'...
/tmp/luarocks_nn-scm-1-7871/nn/lib/THNN/generic/Abs.c: In function 'THNN_FloatAbs_updateGradInput':
/tmp/luarocks_nn-scm-1-7871/nn/lib/THNN/init.c:31:5: error: unknown type name 'ptrdiff_t'
     ptrdiff_t n1 = THTensor_(nElement)(I1);     \
     ^
/tmp/luarocks_nn-scm-1-7871/nn/lib/THNN/generic/Abs.c:20:3: note: in expansion of macro 'THNN_CHECK_NELEMENT'
   THNN_CHECK_NELEMENT(input, gradOutput);
   ^
/tmp/luarocks_nn-scm-1-7871/nn/lib/THNN/init.c:32:5: error: unknown type name 'ptrdiff_t'
     ptrdiff_t n2 = THTensor_(nElement)(I2);                                 \
     ^

The solution, according to multiple sources, and presented around the same time as code here was first pushed, is to upgrade to the latest torch, with explanation being a broken dependency between torch and this lua rock.

When is the next drop of intel/torch expected?

Intalling the latest MKL version

Following up on this instruction:

Be sure you have installed the lastest MKL version: parallel_studio_xe_2017.

I can't find a free download link - I do see that Parallel Studio is a commercial product.

Indexing Failure BUG

I've found a bug in the index function which corrupts the data whenever it is not indexing a Tensor across the 1st dimension.

-- Create random data and random slice indices
x = torch.rand(2000,20000)+3
ind = torch.randperm(x:size(2))[{{1,10}}]:long()

-- Slice x along dimension 2 using the supplied indices in ind
sx = x:index(2,ind)

print("Original Range: " .. x:min() .. "," .. x:max())
print("Slice Range: " .. sx:min() .. "," .. sx:max())

The original range should report 3,4 while the sliced range reports an invalid range of 0,~4 (the upper and lower can vary due to randomness, but it should never be lower than 3).

This indicates that the internal data is invalid when using the index function. It certainly has something to do with the size of the matrix itself since you get perfectly fine copies of Tensor sizes of [200,10]:

x = torch.rand(200,10)+3
ind = torch.LongTensor{1,2,3,4,5,6,7,8,9,10} -- Select all indices in order
sx = x:index(2,ind)
print("Matching: ".. x:eq(sx):sum() .. "/" .. x:nElement())

This produces Matching: 2000/2000, however the critical point seems to be when the first dimension is OVER 720.

A matrix of size [720,10] with the above test produces Matching: 7200/7200, however with a matrix of size [721,10] it produces Matching: 129/7210 which is absolutely not correct.

I'd really appreciate any insights into this error.

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.