Toutes mes réponses sur les forums

Vous lisez 2 fils de discussion
  • Auteur
    Réponses
    • #26955

      zo zo
      Participant
      Inscrit

      voilà la solution !

      Pièces jointes:
    • #26949

      zo zo
      Participant
      Inscrit

      merci beaucoup ! et ensuite, est-ce que je remplace le checkpoint_path que j’ai par celui-ci dans mes lignes de codes : checkpoint_path = « C:\\Windows\\System32\\checkpoint\\run1 » ?

      Pièces jointes:
    • #26946

      zo zo
      Participant
      Inscrit

      Je n’utilise pas de finetune, j’ai donc fait ça, me reste-il à entrer cette suite de commandes ci-contre ?

      import gpt_2_simple as gpt2
      import tensorflow as tf
      import os

      model_name = ‘124M’
      checkpoint_path = os.path.join(‘C:\\’, ‘Users’, ‘Enzo.Pasquier’, ‘models’, ‘checkpoint’)

      gpt2.download_gpt2(model_name=model_name)

      tf.compat.v1.reset_default_graph()
      config = tf.compat.v1.ConfigProto()
      config.gpu_options.allow_growth = True
      sess = tf.compat.v1.Session(config=config)
      sess = gpt2.start_tf_sess()

      checkpoint_dir = checkpoint_path
      gpt2.load_gpt2(sess, checkpoint_dir=checkpoint_dir)

      text = gpt2.generate(sess, length=100, temperature=0.7, prefix= »Il était une fois »)

      print(text)

      Pièces jointes:
Vous lisez 2 fils de discussion