Dúvida ao executar o código gato_cachorro.py

Home Fóruns Fórum Deep Learning com Python de A a Z: O Curso Completo Dúvida ao executar o código gato_cachorro.py

Visualizando 6 posts - 1 até 6 (de 6 do total)
  • Autor
    Posts
  • #28034
    Antonio
    Participante

      Quando executo o código gato_cachorro.py o resultado está sendo esse: O que pode estar ocorrendo?

      Found 4014 images belonging to 2 classes.
      Found 1000 images belonging to 2 classes.
      62/62 [==============================] – 56s 708ms/step – loss: 0.9867 – accuracy: 0.5621 – val_loss: 0.7165 – val_accuracy: 0.5600
      WARNING:tensorflow:11 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x000000FE1C238F70> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/guide/function#controlling_retracing and https://www.tensorflow.org/api_docs/python/tf/function for more details.

      #28035
      Fábio Spak
      Participante

        Olá Antonio, qual versão do tensorflow você esta utilizando?

        #28045
        Antonio
        Participante

          Boa tarde Fábio, tensorflow  versão 2.4.1

          #28046
          Antonio
          Participante

            Boa tarde, Fábio.

            Rodei esse comando e tive essa saída:

            import tensorflow
            tensorflow.version

            Out[2]: <module ‘tensorflow._api.v2.version’ from ‘C:\\Users\\Antonio\\anaconda3\\lib\\site-packages\\tensorflow\\_api\\v2\\version\\__init__.py’>

            Seria assim que eu vejo a versão?

            #28047
            Antonio
            Participante

              Boa tarde, Fábio.

              Pesquisando aqui na WEB encontrei um comando que consegui verificar a versão do Tensorflow:

              import tensorflow as tf
              tf.__version__

               

              import tensorflow as tf
              tf.__version__
              Out[13]: ‘2.4.1’

              A versão é 2.4.1 mesmo

              #28050
              Fábio Spak
              Participante

                Olá Antônio, houve alguma outra mensagem de erro? Mensagens de warning servem informar que algumas configurações poderiam ser diferentes ou que precisam de ajustes ou ainda que uma biblioteca vai ser atualizada. Em si, não interrompem a execução do código.

                Se estiver com algum outro erro, consegue postar um print?

                Fabio

              Visualizando 6 posts - 1 até 6 (de 6 do total)
              • Você deve fazer login para responder a este tópico.