GithubHelp home page GithubHelp logo

Comments (2)

jordanott avatar jordanott commented on May 27, 2024

My initial finding is that this error results from your input dimension being equal to 1.
I'm trying to fix it but haven't quite cracked it yet. A short term fix is to pad your input with an additional input which you could always set to zero.

from fkb.

lkampoli avatar lkampoli commented on May 27, 2024

Hello, I see, thanks a lot for help!
As a little follow up, I would like to ask you an expert opinion.

I'm, let's say, investing some time to interface my scikit or tensorflow/keras networks with fortran or c/c++ main code solvers. The main hope is to be able to use the trained network to predict something which could be directly injected in the fortran or C/C++ solvers. Nevertheless, after a long literature review and hands-on experience I have the feeling that nobody does this because it will be hardly competitive with pure python/tensorflow applications.
This is particularly true when the prediction is done inside some intensive loop (many times), for example, since the communication cost becomes considerable even if the prediction time is much less than the computation without ML/NN.
And I see that even by using other approaches like CFFI, Cython, SWIG, Babel, f2py and so on, will not satisfactorily fix the issue.

Clearly, the situation may be different if the prediction is done just once outside of the computationally intensive parts.

What do you think about it? Am I right?

Thank you,
Lorenzo

from fkb.

Related Issues (19)

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.