Giter Site home page Giter Site logo

Simple linear nn about clnn HOT 7 CLOSED

hughperkins avatar hughperkins commented on August 24, 2024
Simple linear nn

from clnn.

Comments (7)

umerkhalid avatar umerkhalid commented on August 24, 2024 2

about above comment:
its resolved - the script is updated :)

from clnn.

hughperkins avatar hughperkins commented on August 24, 2024

You'd probably best provide a complete script, so I can just copy and paste. But anyway, seems your Sequential needs running :cl() against it, to convert it to cl form?

from clnn.

cbasavaraj avatar cbasavaraj commented on August 24, 2024

Thanks Hugh. In fact, I figured out what was wrong.
I had this line
dtype = torch.Tensor():cl():type()
to get the cl() datatype, and then was executing
model = nn.Sequential():type(dtype)
but before defining the rest of the model, and not after!

from clnn.

cbasavaraj avatar cbasavaraj commented on August 24, 2024

I have another question though, can you please comment?

From everything I can see (Soumith's benchmarks, your discussion with PavelMiha in another issue, and my own experiments today), training on clnn seems to be no better than just doing it on nn. For example, a forward + backward pass in PavelMiha's network is 3x slower on clnn, and now I'm trying Szagoruyko's vgg+bn, which seems again ~2x slower.

I'm on Mac OS X with OpenCL device: ATI Radeon HD 6770M. I have 16 GB RAM and a 2.4Ghz Intel Core i7 CPU. Does my CPU have much better specs than my GPU, or is there really no benefit from running on clnn? I have tried different batch sizes (from 2 to 128 ... 512), but no parallelisation seems to happen.

I would really appreciate your thoughts. Thanks.

from clnn.

hughperkins avatar hughperkins commented on August 24, 2024

Well... an i7 is a good cpu. But yeah, on your hardware, it looks like you might as well train on cpu, rather than using gpu.

On my own laptop, gpu is quite a lot faster than my cpu, but generally speaking, I wouldnt actually train on my laptop as such: I'd just code on my laptop, and then transfer to some faster machine for the actual training task.

from clnn.

umerkhalid avatar umerkhalid commented on August 24, 2024

Hi,
I am just a newbie to LUA/Torch and was trying to execute : recurrent-visual-attention.lua. However, I am getting the same above error. can you help me if I find any fix ?

from clnn.

hughperkins avatar hughperkins commented on August 24, 2024

Awesome!

from clnn.

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.