Generating Poetic Texts with Recurrent Neural Networks in Python

  Рет қаралды 275,364

NeuralNine

NeuralNine

Күн бұрын

Пікірлер: 93
@ananthramvijayaraj4554
@ananthramvijayaraj4554 3 жыл бұрын
Bro, I'm surprised that such nice videos have very little views. Really love the work and just want to tell you to keep up the grind!!
@dave_roul
@dave_roul 10 ай бұрын
More than the coding itself I liked the way you explains the concept. Hope to see more😊
@TesterRight
@TesterRight Ай бұрын
Thank you for the invaluable video. I'm a novice in Python for AI, and I have been trying to find a good project to work on so I can gain hands-on experience. I came across this video, which is a gem. TBH, I love the way you simplify the complexity, making the video engaging and easy to understand. Keep going sir!
@ahmetyusuf4278
@ahmetyusuf4278 5 ай бұрын
For all the newcommers in AI, quick tip: "lr" from the line “model.compile(loss=’categorical_crossentropy’, optimizer=RMSprop(lr=0.01))” has been chnaged to learning_rate in the newer versions. Enjoy!
@no-sb1ld
@no-sb1ld 3 ай бұрын
Thx
@amogusissus7075
@amogusissus7075 Ай бұрын
Can tensorflow-cpu also work?
@ahmetyusuf4278
@ahmetyusuf4278 Ай бұрын
@@amogusissus7075 I’m sorry no clue about that one 😅
@amogusissus7075
@amogusissus7075 29 күн бұрын
@@ahmetyusuf4278 Alright, thanks
@matthewweitzner8956
@matthewweitzner8956 3 жыл бұрын
Great tutorial! The website did not connect properly for me, but I then switched it out with some of my own writing that I converted to a .txt file. Wasn't as polished, but then again I'm not as prolific a writer as Shakespeare, so it had less training data. If you're considering starting the video, I would highly recommend. Also, afterwards you can edit the function so that you can input your own starting text if you want.
@RehaERMETin
@RehaERMETin 6 ай бұрын
Just so people know in more recent versions of TensorFlow/Keras, the lr argument has been replaced with learning_rate
@lynx-me2ew
@lynx-me2ew 3 жыл бұрын
def sample(preds, temperature=1.0): preds = np.asarray(preds).astype('float64') preds = np.log(preds) / temperature exp_preds = np.exp(preds) preds = exp_preds / np.sum(exp_preds) probas = np.random.multinomial(1, preds, 1) return np.argmax(probas)
@lynx-me2ew
@lynx-me2ew 3 жыл бұрын
Here you go...
@molnarlacko0119
@molnarlacko0119 2 жыл бұрын
@@lynx-me2ew ty
@SoulFrmTitanic
@SoulFrmTitanic Жыл бұрын
i saw you for the first time 8 years ago Rn, I'm 20...
@sakari.niittymaa
@sakari.niittymaa 2 жыл бұрын
This is so good tutorial and excellent teacher! Thank you for your videos. +1 sub 👍
@mishahappy1990
@mishahappy1990 3 жыл бұрын
Really cool video. you deserve a lot of views
@michaelmcwhirter
@michaelmcwhirter 8 ай бұрын
You're a good teacher 👍
@pragyavijay8556
@pragyavijay8556 17 күн бұрын
Loved it!
@mohamedaminelahlal266
@mohamedaminelahlal266 4 жыл бұрын
Can you upload more python for networking and "ethical hacking"? Continue your videos are awesome
@jory_a5218
@jory_a5218 Жыл бұрын
Thank u ❤ i do my project in univerfity from your code
@raphaelmgonja8428
@raphaelmgonja8428 Жыл бұрын
i countered this problem from you code on chatbot ValueError Traceback (most recent call last) Cell In[168], line 21 19 # Shuffle and convert to a NumPy array after the loop 20 random.shuffle(training) ---> 21 training = np.array(training) 23 train_x = list(training[:, 0]) 24 train_y = list(training[:, 1]) ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (12, 2) + inhomogeneous part.
@Memories-Lens
@Memories-Lens Жыл бұрын
is there any other specific thing do we have to learn other than python for these projects?
@Memories-Lens
@Memories-Lens Жыл бұрын
man you are my savior , ly
@Yukiehana
@Yukiehana 2 күн бұрын
Hey, Im on Python 3.12, model.save("textgenerator.model") doesnt work, have to use textgenerator.keras, is that fine?
@mohorbanerjee5457
@mohorbanerjee5457 Жыл бұрын
Thanks for the amazing tutorial! But when I tried out with the exact same code, even for moderate temperatures like 0.6 and 0.8 I am getting very haphazardly generated results most of which doesn't really make any sense....may I know how do I obtain the refined results as were shown in the video for 0.6 and 0.8?
@techandtalks6224
@techandtalks6224 2 жыл бұрын
bro this line x[i, t, char_to_index[character]] = 1 is producing blunt, and rice ap thomas with a valian' error
@chrisstone2332
@chrisstone2332 2 жыл бұрын
same error, not sure why! problem with the txt file?
@molla4097
@molla4097 Жыл бұрын
yes @@chrisstone2332
@sargamyadav1069
@sargamyadav1069 3 жыл бұрын
Nice tutorial 😀. Could you please cover text generation for dialogue systems if possible?
@aneeskhann3735
@aneeskhann3735 9 ай бұрын
can someone name me the tool or framework used in this video to build the project
@eldranoson1243
@eldranoson1243 7 ай бұрын
How would you be able to make it create more senseful text? Putting in all of the shakespear text instead of just a part of it?
@navatej777
@navatej777 5 ай бұрын
Man ! Where does he actually code ?
@haithem4178
@haithem4178 5 ай бұрын
can i start this playlist directly without any backhround of some other things? advise me plz!
@univ0602
@univ0602 4 ай бұрын
You must have some basics in IA before to start this playlist... He has a playlist very interesting where he explains everything to know about IA basics
@haithem4178
@haithem4178 4 ай бұрын
@@univ0602 oh thank lad can you tell me the name of the playlist too?
@RobertLogic
@RobertLogic 10 ай бұрын
I just did this, I had to swap some things around to make it work though. How hard would it be to query this model like a bot? Is there something more specific to this that I can look up?
@veroxsity2336
@veroxsity2336 2 жыл бұрын
tensorflow is not working on any version for me is there a fix to this
@Narumi-201
@Narumi-201 Жыл бұрын
check your python version tensorflow doesn't support the new version of python I got python 3.8.6 and it worked for me
@faizsyed_music
@faizsyed_music 11 ай бұрын
Hey I've had this exact problem for a while. Don't know if you got it solved, but here's my steps: 1) I did "pip-install-tensorflow" in the terminal 2) once it was installed, the first import line is the same: "import tensorflow as tf" 3) But after this, any other module you import from tensorflow has to be imported in this format: "from tensorflow.python.keras" instead of just "tensorflow.keras" for example. Let me know if it works for you.
@jamesgraymane3911
@jamesgraymane3911 Жыл бұрын
M1 macos if u can directly import keras ,keras are not in tensorflow
@fazlehadiazmat7g803
@fazlehadiazmat7g803 Жыл бұрын
what is this text editor
@Narumi-201
@Narumi-201 Жыл бұрын
pycharm
@Spacesparx-h7q
@Spacesparx-h7q 6 ай бұрын
I am following you for an a month your videos are great but could you make tutorial for sense analysis modal 😊
@davidhovsepian-id1cv
@davidhovsepian-id1cv Жыл бұрын
this is great!
@pushpanb1714
@pushpanb1714 2 жыл бұрын
Hello I am getting error for this line x = np.zeros(len(sentences),SEQ_LENGTH,len(characters),dtype=np.bool) below is the error argument for zeros() given by name ('dtype') and position (position 1)
@bryanjesuscastrocoello2791
@bryanjesuscastrocoello2791 2 жыл бұрын
same here did you find any solution?
@soundstranquility459
@soundstranquility459 Жыл бұрын
I got this error too. You can fix it by changing the x and y to x = np.zeros((len(sentences) * SEQ_LENGTH * len(characters)), dtype=bool) y = np.zeros((len(sentences) * len(characters)), dtype=bool)
@lololoololdudusoejdhdjswkk347
@lololoololdudusoejdhdjswkk347 Жыл бұрын
@@soundstranquility459 I get this error: "numpy.core._exceptions.MemoryError: Unable to allocate 1.01 TiB for an array with shape (166654, 40, 166654) and data type bool"
@soundstranquility459
@soundstranquility459 Жыл бұрын
@@lololoololdudusoejdhdjswkk347 Yes, sorry I just took another look at the API. you need to add an additional brackets to the original, since they updated the function. It should look like x = np.zeros((len(sentences), SEQ_LENGTH, len(characters)), dtype=bool) y = np.zeros((len(sentences), len(characters)), dtype=bool) the first parameter entry in the function is an n-tuple which determines the shape of the array, So for x, we are creating a 3-d array with sides of length (len(sentences), SEQ_LENGTH and len(characters), then specifying type boolean.
@thecritiquer9407
@thecritiquer9407 5 ай бұрын
which IDE is he using?
@arvis_1498
@arvis_1498 4 жыл бұрын
Hey, nice tutorial, i do get ValueError: Input 0 of layer sequential not compatible with the layer on the predictions = model.predict
@vitocorleone1991
@vitocorleone1991 3 жыл бұрын
Great job!
@Sencerylmz
@Sencerylmz Жыл бұрын
ı know python but ı don't anything about AI. Can ı learn AI through make these project?
@antoniorivolta
@antoniorivolta 4 жыл бұрын
How can I import my own file in the code?
@NeuralNine
@NeuralNine 4 жыл бұрын
Instead of downloading it you can directly load it with Python :)
@antoniorivolta
@antoniorivolta 4 жыл бұрын
Thanks!
@AhmedAfeef_.77
@AhmedAfeef_.77 Ай бұрын
Source code?
@riyacatherine3217
@riyacatherine3217 Жыл бұрын
What platform of python are we using in this video?Is it IDE,or pycharm or something else?
@pesk8801
@pesk8801 Жыл бұрын
he uses pycharm its inside an anaconda environment aswell
@harishreddy9814
@harishreddy9814 Жыл бұрын
Can you please share the github link for "generating Poetic text using recurrent Neural Networks".
@shashwatbalodhi4042
@shashwatbalodhi4042 Жыл бұрын
@NeuralNine , Can you pls update it to the latest version of python as i wrote the exact same code but getting an error. By the way really loved the way you explain.
@onlyshorts6837
@onlyshorts6837 Жыл бұрын
can you mention python version , cuz the version 3.11 doesnt support tensorflow.keras.
@dodo5037_
@dodo5037_ Жыл бұрын
I don't think 3.10 supports it either
@faizsyed_music
@faizsyed_music 11 ай бұрын
Hey I've had this exact problem for a while. Don't know if you got it solved, but here's my steps: 1) I did "pip-install-tensorflow" in the terminal 2) once it was installed, the first import line is the same: "import tensorflow as tf" 3) But after this, any other module you import from tensorflow has to be imported in this format: "from tensorflow.python.keras" instead of just "tensorflow.keras" for example. Let me know if it works for you.
@vijaysamant2864
@vijaysamant2864 Жыл бұрын
I tried it and I am being bombarded with "and".
@aimeritedonald6689
@aimeritedonald6689 4 жыл бұрын
very cool !!
@KaZaDuum
@KaZaDuum 2 жыл бұрын
Great video. I am getting this error. x[0, t, char_to_index[character]] = 1 IndexError: index 40 is out of bounds for axis 1 with size 40
@zainrab8629
@zainrab8629 Жыл бұрын
its i instead of 0 i think
@2wheelson2strokes
@2wheelson2strokes 3 ай бұрын
Hey I am new to here i don’t know where to start can any one help me
@bahookygeggie3704
@bahookygeggie3704 4 жыл бұрын
yo for some reason theirs error coming up here x = np.zeros((len(senteces), SEQ_LENGTH, len(characters)), dtpye=np.bool) y = np.zeros((len(senteces), len(characters)), dtpye=np.bool) saying SyntaxError: invalid syntax
@baudys_dev
@baudys_dev 4 жыл бұрын
intead of 'dtpye' write 'dtype'
@bahookygeggie3704
@bahookygeggie3704 4 жыл бұрын
@@baudys_dev fuck of course
@Damion-nj8ou
@Damion-nj8ou Жыл бұрын
looks like spelling error on sentences and dtype. oops, two years ago.
@homataha5626
@homataha5626 8 ай бұрын
I wish the background was white
@ingilizanahtar644
@ingilizanahtar644 3 жыл бұрын
harika
@BettyWilliams-v1q
@BettyWilliams-v1q 4 ай бұрын
Joan Burgs
@vijaysamant2864
@vijaysamant2864 Жыл бұрын
1:59
@IRAKOMEYEJOHNSONN
@IRAKOMEYEJOHNSONN 3 ай бұрын
yeap
@RobertPayne-v7q
@RobertPayne-v7q 4 ай бұрын
Mosciski Row
@niteshanthony2324
@niteshanthony2324 Жыл бұрын
If you declare with your mouth, “Jesus is Lord,” and believe in your heart that God raised him from the dead, you will be saved. 10 For it is with your heart that you believe and are justified, and it is with your mouth that you profess your faith and are saved.❤😊🎉
@algebra9707
@algebra9707 8 ай бұрын
. This is a coding channel not a Gospels preacher
@ProfShibe
@ProfShibe 7 ай бұрын
U need machine learning to fix your brain
@Homejest
@Homejest 7 ай бұрын
@VitalyEpifanov
@VitalyEpifanov 6 ай бұрын
@@ProfShibelmaooo
@tinyflyingdragons9432
@tinyflyingdragons9432 6 ай бұрын
Fuck off I'm Jewish let us learn coding
@fire6930
@fire6930 Жыл бұрын
wtf
@yubinsolii7007
@yubinsolii7007 Ай бұрын
ModuleNotFoundError. I'm I alone?
How I'd learn ML in 2025 (if I could start over)
16:24
Boris Meinardus
Рет қаралды 230 М.
But what is a neural network? | Deep learning chapter 1
18:40
3Blue1Brown
Рет қаралды 18 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Code With Me: Automating My Life With Python and AI
13:33
Tiff In Tech
Рет қаралды 80 М.
Simple Sentiment Text Analysis in Python
16:11
NeuralNine
Рет қаралды 86 М.
How I Would Learn Python FAST (if I could start over)
12:19
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Рет қаралды 5 МЛН
You're Not Behind: Become AI-Native in 2025
10:11
Jeff Su
Рет қаралды 471 М.
Large Language Models explained briefly
7:58
3Blue1Brown
Рет қаралды 1,4 МЛН
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 4,7 МЛН
Why Does Diffusion Work Better than Auto-Regression?
20:18
Algorithmic Simplicity
Рет қаралды 451 М.
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН