NLP with tensorflow

Grade function codes removed as it is violation of Code of Conduct, please post only your output to expected output or the error you encounter. If mentor needs to see your code, they will ask you to send by personal DM

Vocabulary of labels looks like this: [None, ‘sport’, ‘business’, ‘politics’, ‘tech’, ‘entertainment’]

First ten labels: [‘tech’, ‘business’, ‘sport’, ‘sport’, ‘entertainment’, ‘politics’, ‘politics’, ‘sport’, ‘sport’, ‘entertainment’]

First ten label sequences: [4 2 1 1 5 3 3 1 1 5]

Expected Output:

Vocabulary of labels looks like this: [‘sport’, ‘business’, ‘politics’, ‘tech’, ‘entertainment’]

First ten labels: [‘tech’, ‘business’, ‘sport’, ‘sport’, ‘entertainment’, ‘politics’, ‘politics’, ‘sport’, ‘sport’, ‘entertainment’]

First ten label sequences: [3 1 0 0 4 2 2 0 0 4]
You should see that each encoded label corresponds to the index of its corresponding label in the vocabulary!|
can anyone tell what i am doing wrong?

hi @Saswata_stark

This is not your first post, so I hope by now you know no part of grade function codes are suppose to be posted as it is against community guidelines and also no links to assignment grade, sharing assignment notebook on public post is allowed. Kindly refrain from doing so. if a mentor wants to see your codes they will ask you to send the codes by DM.

Now comes to your issue, please refer post comment to resolve your issue.

Regards
DP

1 Like

I am extremely sorry i didnt realize, i hope to correct my mistake and refrain from this behaviour in future. Sorry for the trouble i have caused.

1 Like