Let's Write An AI That Composes Shakespeare

Поделиться
HTML-код
  • Опубликовано: 19 ноя 2024

Комментарии • 37

  • @MachineLearningwithPhil
    @MachineLearningwithPhil  4 года назад

    This content is sponsored by my Udemy courses. Level up your skills by learning to turn papers into code. See the links in the description.

  • @BenjaSerra
    @BenjaSerra 4 года назад +1

    followed this video step by step, love it. Keep on keepin on!

  • @amazon_prime2831
    @amazon_prime2831 2 года назад +2

    I'm getting this error: AttributeError: 'NoneType' object has no attribute 'endswith' on the line with: model.load_weights(model.build(tf.TensorShape([1, None])))
    This is the full error:
    Traceback (most recent call last):
    File "shakespear.py", line 85, in
    model.load_weights(epochC)
    File "/home/zachary/.local/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 67, in error_handler
    raise e.with_traceback(filtered_tb) from None
    File "/home/zachary/.local/lib/python3.8/site-packages/keras/saving/saving_utils.py", line 322, in is_hdf5_filepath
    return (filepath.endswith('.h5') or filepath.endswith('.keras') or
    AttributeError: 'NoneType' object has no attribute 'endswith'
    I'm using ubuntu, thank you for your help.

  • @tiktoktiktik4820
    @tiktoktiktik4820 4 года назад

    You are hands down the best ML/AI youtuber. Keep up the good work. Best of luck for the future

  • @DanielWeikert
    @DanielWeikert 4 года назад

    Do you know why the padded batch in tf 2.x return [None] or [] as its tensorshape? When we pad in keras using pad_sequences we specify a predefined length which makes sense but how does this work in tf 2.x when there is no specified padding shape?

  • @wellsgrant12
    @wellsgrant12 3 года назад

    Great video! I am getting a problem however. After the program writes the created story, it outputs "Exception ignored in: " any idea what this might mean?

  • @nicolasleblanc5722
    @nicolasleblanc5722 3 года назад +1

    Great tutorial, thanks a lot!

  • @3d-illusions
    @3d-illusions 3 года назад

    I'm interested in writing an AI writing assistant. Any tips for libraries or tutorials I could check out?

  • @alexanderpohl1949
    @alexanderpohl1949 4 года назад

    Hi Phil, I was recently assigned a project on topic modeling (using latent dirichlent allocation). I was wondering, if you will cover topic modeling in the future in this series on nlp (?)
    I'm facing a problem, where I am trying to grid search for the optimal hyperparameters and the optimal model will always have the least amounts of topics I select in the grid search. This leads to the problem that the best hyperparameters will always only have 1 topic (in scikit-learn n_components:1). This pretty much defeats the point of finding clusters / topics, if there is only 1 cluster.
    I think, the dataset I provide the algorithm is just too small but I am not sure. Would be wonderful, if you could have a tip for me or mention it in an upcoming video (if you plan on covering topic modeling anyways).

  • @softerseltzer
    @softerseltzer 4 года назад +4

    The play is Coriolanus

  • @IndranilTiwary
    @IndranilTiwary 4 года назад

    Hey Phil. Can you please explain or guide how to make a smart compose feature like gmail. NGram Model.

  • @DanielWeikert
    @DanielWeikert 4 года назад

    Is tf.data.Dataset.from_tensor_slices equivalent to pytorch Dataset and dataset.batch equivalent to the DataLoader? Thanks

  • @3d-illusions
    @3d-illusions 3 года назад

    what sort of speed do you get on the 2080? I'm getting 190 seconds per epoch on a gtx 1070

    • @3d-illusions
      @3d-illusions 3 года назад

      just realised, it's running it on the cpu not the gpu. I guess that's because the 1070 doesn't have tensor cores, so it's reverting to the cpu (even though I installed the gpu version of tensorflow). I wondered why my front room was getting warm :D

    • @MachineLearningwithPhil
      @MachineLearningwithPhil  3 года назад

      No. This is a config issue. Make sure you only have tensor flow gpu. If you install the base package after the gpu package, it reverts to cpu.

    • @3d-illusions
      @3d-illusions 3 года назад

      @@MachineLearningwithPhil hmm, weird. I only installed the GPU version using:
      conda create -n tf-gpu tensorflow-gpu
      conda activate tf-gpu
      100% cpu usage, 31% gpu load.

    • @3d-illusions
      @3d-illusions 3 года назад

      @@MachineLearningwithPhil github.com/tensorflow/models/issues/1942

  • @JousefM
    @JousefM 4 года назад

    Comment for the Algorithm! Nice one Phil!

  • @generalsamvods5661
    @generalsamvods5661 3 года назад

    I know this is a old video but I really hope you see this what are you using to put the code in

  • @geo2073
    @geo2073 4 года назад

    Love it!

  • @CharlesDarwin1337
    @CharlesDarwin1337 3 года назад

    what keyboard are u using?

    • @MachineLearningwithPhil
      @MachineLearningwithPhil  3 года назад +1

      The cooler master storm. It's an old model from 2014 so they have probably updated since then.

    • @CharlesDarwin1337
      @CharlesDarwin1337 3 года назад +1

      @@MachineLearningwithPhil thanks!

  • @monstercolorfunco4391
    @monstercolorfunco4391 2 года назад

    Thaks another environment appears to be GPT3

  • @Diamond_Hanz
    @Diamond_Hanz 4 года назад +3

    Or better yet...did Shakespeare write Shakespeare?

  • @miguelangelquicenohincapie2768
    @miguelangelquicenohincapie2768 4 года назад +1

    Why dont you just use jupyter notebook?

    • @MachineLearningwithPhil
      @MachineLearningwithPhil  4 года назад +1

      Why would I? They're slower, more cumbersome, less portable, and the state persistence leads to some difficult to diagnose bugs.

    • @3d-illusions
      @3d-illusions 3 года назад

      @@MachineLearningwithPhil I'm just learning and using spyder with anaconda. It seems great, do you know of any drawbacks with it?

    • @MachineLearningwithPhil
      @MachineLearningwithPhil  3 года назад

      The persistent memory in the notebooks can lead to bugs. It's just another bit of software that runs in the background, and requires using a browser. It's inferior in every way IMO.

    • @3d-illusions
      @3d-illusions 3 года назад

      @@MachineLearningwithPhil thanks, what are you using?

    • @MachineLearningwithPhil
      @MachineLearningwithPhil  3 года назад +1

      Just the terminal and vim for text editing