Code Monkey home page Code Monkey logo

Comments (3)

tqchen avatar tqchen commented on August 15, 2024

mshadow can switch to double precision, by changing the definition of real_t. https://github.com/tqchen/mshadow/blob/master/mshadow/tensor_base.h#L54

The reason why single precision is default.

from mshadow.

tqchen avatar tqchen commented on August 15, 2024

I would love to hear more about your experience in working with MPI:)

The IStream interface https://github.com/tqchen/mshadow/blob/master/mshadow/tensor_io.h#L18 could be helpful. In principle, if it is socket connection, you can implement a SocketStream to support Read and Write, then mshadow's SaveBinary/LoadBinary can automatically take that and do read/write over sockets.

I have little experience with MPI, so I am not sure if this idea can be used there as well

from mshadow.

huashiyiqike avatar huashiyiqike commented on August 15, 2024

I have set real_t, the problem is the input in Map has to be truncated to float(cannot be real_t now), even the inner can return a double by changing expf to exp, as follows:

struct sigmoid {
            MSHADOW_XINLINE static real_t Map(float a){
                return 1.0 / (1.0 + exp(-a));
            }
    };

otherwise:
./mshadow/mshadow/cuda/tensor_gpu-inl.cuh(59): error: expression preceding parentheses of apparent call must have (pointer-to-) function type

Thank you for your advice, MPI is my course project, I will put much effort into it, just haven't started yet.

from mshadow.

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.