Code Monkey home page Code Monkey logo

Comments (5)

patverga avatar patverga commented on August 19, 2024

First thing to check is that you've installed tensorflow with gpu support. The default tensorflow package is cpu only.
pip3 install --user tensorflow-gpu

from lisa.

SannyZhou avatar SannyZhou commented on August 19, 2024

The package is tensorflow-gpu 1.9.0. @patverga

from lisa.

strubell avatar strubell commented on August 19, 2024

Does tensorflow output a line like:

2019-01-22 12:22:22.434234: I
tensorflow/core/common_runtime/gpu/gpu_device.cc:1098] Created TensorFlow
device (/job:localhost/replica:0/task:0/device:GPU:0 with 11428 MB memory)
-> physical GPU (device: 0, name: GeForce GTX TITAN X, pci bus id:
0000:82:00.0, compute capability: 5.2)

If so, then it's using GPU. If not, then you likely have some kind of
configuration issue.

I would expect GPU usage to fluctuate a lot during evaluation, and in fact
for most of the time to be spent on CPU since the code calls the official
CoNLL evaluation scripts (perl). Currently I believe evaluation uses the
same batch size as training, but you could increase it depending on your
GPU's memory to make better use of the GPU.

The code currently doesn't have a "predict" mode, which simply outputs
predictions for sentences without evaluating. This may be more the
functionality you desire, and I'm happy to accept pull requests :)

from lisa.

SannyZhou avatar SannyZhou commented on August 19, 2024

Does tensorflow output a line like:

2019-01-22 12:22:22.434234: I
tensorflow/core/common_runtime/gpu/gpu_device.cc:1098] Created TensorFlow
device (/job:localhost/replica:0/task:0/device:GPU:0 with 11428 MB memory)
-> physical GPU (device: 0, name: GeForce GTX TITAN X, pci bus id:
0000:82:00.0, compute capability: 5.2)

If so, then it's using GPU. If not, then you likely have some kind of
configuration issue.

I would expect GPU usage to fluctuate a lot during evaluation, and in fact
for most of the time to be spent on CPU since the code calls the official
CoNLL evaluation scripts (perl). Currently I believe evaluation uses the
same batch size as training, but you could increase it depending on your
GPU's memory to make better use of the GPU.

The code currently doesn't have a "predict" mode, which simply outputs
predictions for sentences without evaluating. This may be more the
functionality you desire, and I'm happy to accept pull requests :)

Thanks for your patient answer. I suddenly found that I set the parameter of debug as 1, which caused the high frequency of evaluation for validation and the low GPU usage.

from lisa.

strubell avatar strubell commented on August 19, 2024

from lisa.

Related Issues (9)

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.