Difference of total lines and line number #205
Replies: 2 comments
-
Hello, I'm taking the following from: https://dev.mrdbourke.com/tensorflow-deep-learning/09_SkimLit_nlp_milestone_project_2/#create-positional-embeddings
We do this because the majority of abstracts have 15 lines or less - though we could change this value to something else and experiment how it goes. The same goes for "total_lines". All samples with up to 20 lines get one hot encoded. This means if a sample has 21 lines, it gets all zeros. For example: # One hot encode total_lines=7 (the seventh index is a 1)
[0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
# One hot encode total_lines=21 (all zeros since the depth=20)
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] The same occurs for "line_number" but with |
Beta Was this translation helpful? Give feedback.
-
This is what i understand from the answer sir @mrdbourke , Does it mean that in line_number line by line it gets one hot encoded and in total_lines all the f=given number of lines get one hot encoded. |
Beta Was this translation helpful? Give feedback.
-
Hello SIR,
I got very confused between lone number and total lines in the skimlit project while using the positional embeddings we have given depth =15 for line_number and depth =20 for total_lines whats actually happening after doing this .We have one hot encoded them, does this mean that sample having 15 and 20 lines get one hot encoded
PLEASE HELP ME CLEARING THIS DOUBT SIR.
Beta Was this translation helpful? Give feedback.
All reactions