GithubHelp home page GithubHelp logo

Run error about cmd HOT 5 CLOSED

jindongwang avatar jindongwang commented on July 24, 2024
Run error

from cmd.

Comments (5)

wzell avatar wzell commented on July 24, 2024

Hallo jindongwang,
nice to see Your interest in our project!

Unfortunately our code only supports the theano backend and not tensorflow. However, theano is only used in the file domain_regularizer.py. One simple fix would be to use the keras backend functionality, wherever theano is used (indicated by 'T.'), forcing it to use tensorflow. I.e. using

K.cast(i+2,'int32')

instead of

T.cast(i+2,'int32')

and

K.square(r - x2)

instead of

T.sqr(r - x2)

I have tested this solution with python 2.7 and keras 1.1.0. More details on the requirements can be found in requirements.txt. Downgrading keras works well if you are using pip with

pip install keras==1.1 --no-dependencies

and python 3.5 should work.

If You have futher problems I would be happy to help.

from cmd.

jindongwang avatar jindongwang commented on July 24, 2024

Thank you @wzell for your kind reply!
I tried your way and replaced all "T.x" with "K.x" under Keras 1.1, but it still did not work. Here's some of the error msg:
qq 20170707162640

from cmd.

wzell avatar wzell commented on July 24, 2024

I think this has something to do with the change of the keras backend from theano to tensorflow, see e.g.
keras-team/keras#3945.
The change in the json file should help.

from cmd.

jindongwang avatar jindongwang commented on July 24, 2024

from cmd.

wzell avatar wzell commented on July 24, 2024

Yes, this works. See exp_office.py for an example.

from cmd.

Related Issues (4)

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.