[Python] python3 torch waning removal

Discussão em 'Python' iniciado por Stack, Agosto 13, 2025.

  1. Stack

    Stack Membro Participativo

    I have a python script the uses torch and easyocr. When I run it I get in the terminal my output but also I see two warnings:

    CUDA not available - defaulting to CPU. Note: This module is much faster with a GPU.
    [W NNPACK.cpp:79] Could not initialize NNPACK! Reason: Unsupported hardware.


    Is there a way to add something in my python code to suppress those two warnings? Thanks.

    I tried this below but it did not work:

    #!/usr/bin/env python3
    # -*- coding: utf-8 -*-
    import cv2
    import numpy as np
    import easyocr
    import sys
    import requests
    import os

    os.environ["CUDA_VISIBLE_DEVICES"]=""


    Thanks.

    Continue reading...

Compartilhe esta Página