Git Product home page Git Product logo

Comments (6)

frfrrfrrr avatar frfrrfrrr commented on July 25, 2024 2

Same thing for me.
And pydarknet.set_cuda_device(0) returns:
module 'pydarknet' has no attribute 'set_cuda_device'

from yolo3-4-py.

madhawav avatar madhawav commented on July 25, 2024 1

@dquig Thank you for showing the cause of issue. I will go through the setup script again and correct it.

from yolo3-4-py.

kartikpaigwar avatar kartikpaigwar commented on July 25, 2024 1

I am getting the same thing. Have you fixed that.
pydarknet.set_cuda_device(0) returns:
module 'pydarknet' has no attribute 'set_cuda_device'

from yolo3-4-py.

dquig avatar dquig commented on July 25, 2024

I was running into the same issue trying to install from source with a custom darknet installation. It looks like the GPU environment variables is ignored if DARKNET_HOME is also set. T

if "GPU" in os.environ:

if "GPU" in os.environ:
    if "DARKNET_HOME" in os.environ:
        logging.warning("GPU environment variable is skipped since DARKNET_HOME is specified")
    else:
        if int(os.environ["GPU"]) == 1:
            logging.info("Darknet will be compiled with GPU support")
            USE_GPU = True
        else:
            logging.info("Darknet will be compiled without GPU support")
            USE_GPU = False

This causes pydarknet to be compiled without the ability to set cuda device.

IF USE_GPU == 1:

IF USE_GPU == 1:
--
64 | void cuda_set_device(int n)

It looks to me like the USE_GPU variable should still be set in the case that DARKNE_HOME is also set.

from yolo3-4-py.

fspider avatar fspider commented on July 25, 2024

Hello. I am going to run several processes.. One on Gpu 1 and another one on GPU 2.
So i am going to use set_gpu_device() function.
But it is showing this error.

pydarknet.set_cuda_device(1)
AttributeError: module 'pydarknet' has no attribute 'set_cuda_device'

How can i do this?

from yolo3-4-py.

madhawav avatar madhawav commented on July 25, 2024

Fixed issue of ignoring GPU environment variable when custom DARKNET_HOME is set.
Refer #118

from yolo3-4-py.

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.