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!
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.
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!
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.
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?
@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.
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?
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)
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)
@@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"
@@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.
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
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.
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.
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
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.❤😊🎉
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!!
More than the coding itself I liked the way you explains the concept. Hope to see more😊
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!
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.
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!
Thx
Can tensorflow-cpu also work?
@@amogusissus7075 I’m sorry no clue about that one 😅
@@ahmetyusuf4278 Alright, thanks
Just so people know in more recent versions of TensorFlow/Keras, the lr argument has been replaced with learning_rate
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)
Here you go...
@@lynx-me2ew ty
Really cool video. you deserve a lot of views
i saw you for the first time 8 years ago
Rn, I'm 20...
Can you upload more python for networking and "ethical hacking"? Continue your videos are awesome
This is so good tutorial and excellent teacher! Thank you for your videos. +1 sub 👍
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.
You're a good teacher 👍
Thank u ❤ i do my project in univerfity from your code
Loved it!
is there any other specific thing do we have to learn other than python for these projects?
Hey, Im on Python 3.12, model.save("textgenerator.model") doesnt work, have to use textgenerator.keras, is that fine?
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?
Nice tutorial 😀. Could you please cover text generation for dialogue systems if possible?
I am following you for an a month your videos are great but could you make tutorial for sense analysis modal 😊
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?
man you are my savior , ly
bro this line x[i, t, char_to_index[character]] = 1 is producing blunt,
and rice ap thomas with a valian' error
same error, not sure why! problem with the txt file?
yes
@@chrisstone2332
Great job!
@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.
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?
can someone name me the tool or framework used in this video to build the project
Hey, nice tutorial, i do get ValueError: Input 0 of layer sequential not compatible with the layer on the predictions = model.predict
Man ! Where does he actually code ?
M1 macos if u can directly import keras ,keras are not in tensorflow
this is great!
Can you please share the github link for "generating Poetic text using recurrent Neural Networks".
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)
same here did you find any solution?
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)
@@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"
@@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.
What platform of python are we using in this video?Is it IDE,or pycharm or something else?
he uses pycharm its inside an anaconda environment aswell
ı know python but ı don't anything about AI. Can ı learn AI through make these project?
can i start this playlist directly without any backhround of some other things? advise me plz!
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
@@univ0602 oh thank lad can you tell me the name of the playlist too?
tensorflow is not working on any version for me is there a fix to this
check your python version tensorflow doesn't support the new version of python
I got python 3.8.6 and it worked for me
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.
I tried it and I am being bombarded with "and".
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
its i instead of 0 i think
can you mention python version , cuz the version 3.11 doesnt support tensorflow.keras.
I don't think 3.10 supports it either
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.
very cool !!
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
intead of 'dtpye' write 'dtype'
@@baudys_dev fuck of course
looks like spelling error on sentences and dtype.
oops, two years ago.
How can I import my own file in the code?
Instead of downloading it you can directly load it with Python :)
Thanks!
what is this text editor
pycharm
which IDE is he using?
I wish the background was white
Hey I am new to here i don’t know where to start can any one help me
Source code?
Joan Burgs
harika
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.❤😊🎉
. This is a coding channel not a Gospels preacher
U need machine learning to fix your brain
❎
@@ProfShibelmaooo
Fuck off I'm Jewish let us learn coding
Mosciski Row
yeap
1:59
wtf
ModuleNotFoundError.
I'm I alone?