Introduction to character level CNN in text classification with PyTorch Implementation

  Рет қаралды 27,588

Ahmed Besbes

Ahmed Besbes

Күн бұрын

Пікірлер: 34
@chaeheumpark1987
@chaeheumpark1987 5 жыл бұрын
6:58 Is there something else that contributes to the output shape (1,1,136) other than the kernel size and input size?? Please correct me if I am wrong but to my understanding the output shape should be (1,1,138). Thx for the great tutorial !! Saved a lot of hassle
@tejanmehndiratta
@tejanmehndiratta 5 жыл бұрын
yes it should be 138
@AhmedBesbes
@AhmedBesbes 4 жыл бұрын
yes it is (1,1, 138) indeed. thanks for pointing the mistake :)
@gohjiayi5521
@gohjiayi5521 3 жыл бұрын
Very helpful video, thank you for sharing!
@sehlikhouloud4301
@sehlikhouloud4301 6 жыл бұрын
Thanks for sharing !
@daksh6752
@daksh6752 6 жыл бұрын
Great video, subscribed!
@AhmedBesbes
@AhmedBesbes 6 жыл бұрын
Thanks! Stay tuned for more content.
@bawadhruv1
@bawadhruv1 5 жыл бұрын
Hi Ahmed, whenever i try to run train.py i am always encounted with 'tuple' object has no attribute 'cuda' kindly help please
@fabianmeyer506
@fabianmeyer506 4 жыл бұрын
Great Video :)
@theDrewDag
@theDrewDag 5 жыл бұрын
Content is perfect. One problem? Too few videos. The community needs your knowledge to be shared more!!
@AhmedBesbes
@AhmedBesbes 5 жыл бұрын
Thanks a lot, I usually tend to publish more things on my blog since it takes less time to produce you can have a look at my articles here: ahmedbesbes.com/ Point of inquiry though. Is there a specific topic you'd like to see covered in a video?
@julianwittek7663
@julianwittek7663 3 жыл бұрын
The shape of the kernel that you presented at 5:28 confused me a little bit. It looks like your kernel is of the shape (1, 3), but it is actually of the shape (70, 3). 1D convolution does not necessarily mean that our kernel is one-dimensional. Otherwise the result of the convolution would be the same for texts of the same length.
@AhmedBesbes
@AhmedBesbes 3 жыл бұрын
yes you're right, this a mistake I've meaning to fix in the video. thank you!
@lacmedical7370
@lacmedical7370 6 жыл бұрын
trop fort !
@John-jd2tu
@John-jd2tu 6 жыл бұрын
Thanks for sharing! Is it possible sharing the training data also?
@AhmedBesbes
@AhmedBesbes 6 жыл бұрын
Xu Jiahua sorry, due to privacy reasons I cannot share the dataset. However, you could build one very easily by scraping text reviews that have a number of stars (or a rating) associated to them. The rating will in fact allow you to define the labels.
@ysupriyadi123
@ysupriyadi123 5 жыл бұрын
​@@AhmedBesbes Can you give some example of train data?
@abdulhameedalshemary1223
@abdulhameedalshemary1223 5 жыл бұрын
Hi Ahmed, thanks for sharing My question is that you said scalar product bw kernel and input data(after encoding) the values of the kernel how do we get them. is it random as in class MLP.
@kumarshwetaketu1165
@kumarshwetaketu1165 4 жыл бұрын
Is there any alternative to one hot embedding of characters?
@AhmedBesbes
@AhmedBesbes 4 жыл бұрын
You can learn a dense embedding but this adds an additional layer to your network and eventually more training time. you can also look into Elmo character embeddings
@danishmuzafar5572
@danishmuzafar5572 4 жыл бұрын
sir plz help i have project Depression detection using emotion artificial Intelligence with the help of deep learning
@AhmedBesbes
@AhmedBesbes 4 жыл бұрын
Hello! Given a labeled dataset, you can apply this model for a classification problem :)
@souravbarik8470
@souravbarik8470 4 жыл бұрын
Why does character level embedding performs badly compared to word-level embedding using CNN for text classification?
@AhmedBesbes
@AhmedBesbes 4 жыл бұрын
it actually depends on the type of data you're working with. Whenever I work with user-generated content (with typos and abbreviations for example) character-based models proved to be quite efficient
@valerysalov8208
@valerysalov8208 4 жыл бұрын
but bert performers better right?
@AhmedBesbes
@AhmedBesbes 4 жыл бұрын
I've done this video way before Bert was released. There are however great advantages in character-based CNNs; they are lightweight and can be surprisingly good to pick on things like typos or abbreviations
@lordnaive
@lordnaive 6 жыл бұрын
hi ahmed, how to refactor files properly?
@AhmedBesbes
@AhmedBesbes 6 жыл бұрын
What do you mean?
@lordnaive
@lordnaive 6 жыл бұрын
@@AhmedBesbes I see many. People put different functions in different python files. How to decide which functionalities go where? For example. vid2vid by NVIDIA
@AhmedBesbes
@AhmedBesbes 6 жыл бұрын
@@lordnaive I usually put functions that can be used across many python files in a utility script that I call utils.py
@lordnaive
@lordnaive 6 жыл бұрын
@@AhmedBesbes alright
@RiyaSadrani
@RiyaSadrani 4 жыл бұрын
Hello ! very helpful video ! subscribed ! Instead of classification, I have a regression problem where the input is string. Can you guide ? I will just ping you the same in linked in. It will be great if you can help.
@AhmedBesbes
@AhmedBesbes 4 жыл бұрын
If you need to build a regressor instead of a classifier, you'll have to change the ouptut layer and the loss (use MSE for example instead of logloss)
@ravibhatnagar9732
@ravibhatnagar9732 3 жыл бұрын
Jayuibhatnagar
Convolution in NLP
19:05
CodeEmporium
Рет қаралды 6 М.
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
Word Embeddings
14:28
macheads101
Рет қаралды 158 М.
torch.nn.Embedding explained (+ Character-level language model)
20:47
mildlyoverfitted
Рет қаралды 36 М.
Neural Networks Part 8: Image Classification with Convolutional Neural Networks (CNNs)
15:24
Why Does Diffusion Work Better than Auto-Regression?
20:18
Algorithmic Simplicity
Рет қаралды 433 М.
Convolutional Neural Network from Scratch | Mathematics & Python Code
33:23
The Independent Code
Рет қаралды 197 М.
[part 2] Convolutional Neural Networks and NLP: Text classification
18:28
How Convolutional Neural Networks work
26:14
Brandon Rohrer
Рет қаралды 968 М.
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН