Code Monkey home page Code Monkey logo

Comments (5)

adriangb avatar adriangb commented on September 13, 2024

SciKeras isn't doing anything special with CPU cores or GPUs. That depends on how you configure TensorFlow. We just call TensorFlow for the actual training.

from scikeras.

maxrpunkt avatar maxrpunkt commented on September 13, 2024

Many thanks for the answer. I just did "pip install scikeras tensorflow-cpu" - no other special configuration of tensorflow-cpu.

from scikeras.

adriangb avatar adriangb commented on September 13, 2024

If you run the model out of SciKeras what do you see?

from scikeras.

maxrpunkt avatar maxrpunkt commented on September 13, 2024

2023-03-13 18:36:31.033240: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0.
2023-03-13 18:36:31.050409: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
...
2023-03-13 18:36:38.694386: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'Placeholder/_11' with dtype float and shape [704198]
[[{{node Placeholder/_11}}]]
2023-03-13 18:36:38.694517: I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'Placeholder/_11' with dtype float and shape [704198]
[[{{node Placeholder/_11}}]]

After this, the training starts.
In the meantime I found the tensorflow version 2.11.0 of Intel (https://www.intel.com/content/www/us/en/developer/articles/guide/optimization-for-tensorflow-installation-guide.html). I installed this in my Python 3.10 environment and voila it uses all CPU cores.
However, interestingly the standard version of tensorflow-cpu installed in my Python 3.11 environment which makes use of only one CPU core is much faster producing the same results :)

from scikeras.

smith558 avatar smith558 commented on September 13, 2024

@maxrpunkt This may be expected behaviour, not related to SciKeras. A lot of TensorFlow CPU routines use a single core only.

from scikeras.

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.