title
stringlengths 12
112
| published
stringlengths 19
23
| url
stringlengths 28
28
| video_id
stringlengths 11
11
| channel_id
stringclasses 5
values | id
stringlengths 16
31
| text
stringlengths 0
596
| start
float64 0
37.8k
| end
float64 2.18
37.8k
|
---|---|---|---|---|---|---|---|---|
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3311.32
|
for training and we will output the results of that training batch to the
| 3,311.32 | 3,329.48 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3318.56
|
outputs variable. Our model, the IDs, we need the attention mask.
| 3,318.56 | 3,341.28 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3329.48
|
We also want our start positions and end positions.
| 3,329.48 | 3,361.8 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3341.28
|
Now from our training batch we want to extract the loss.
| 3,341.28 | 3,383.52 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3372.2400000000002
|
And then we want to calculate loss for every parameter and this is for our
| 3,372.24 | 3,391.48 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3383.52
|
gradient update and then we use the step method here to actually update those
| 3,383.52 | 3,398.72 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3391.48
|
gradients. And then this final little bit here is purely for us to see this is our
| 3,391.48 | 3,405.64 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3398.72
|
progress bar. So we call the loop we set the description which is going to be our
| 3,398.72 | 3,420.04 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3405.64
|
epoch. And then it would probably be quite useful to also see the loss in there as
| 3,405.64 | 3,430.56 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3420.04
|
well. We will set that as a post fix so it will appear after the progress bar.
| 3,420.04 | 3,446.6 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3438.84
|
Okay and that should be everything. Okay so that looks pretty good. We have our
| 3,438.84 | 3,453.64 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3446.6
|
model training and as I said this will take a little bit of time. So I will let
| 3,446.6 | 3,466.72 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3453.64
|
that run. Okay so we have this non type error here and this is because within
| 3,453.64 | 3,471.24 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3466.72
|
our end positions we normally expect integers but we're also getting some
| 3,466.72 | 3,476.12 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3471.24
|
non values because the code that we used earlier where we're checking if end
| 3,471.24 | 3,482.16 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3476.12
|
position is non essentially wasn't good enough. So as a fix for that we'll just
| 3,476.12 | 3,487.56 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3482.16
|
go back and we'll add like a while loop which will keep checking if it's non and
| 3,482.16 | 3,497.6 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3487.56
|
every time it is non reduce the value that we are seeing by one. So go back up
| 3,487.56 | 3,502.48 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3497.6
|
here and this is where the problem is coming from. So we're just going to
| 3,497.6 | 3,514.92 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3502.48
|
change this to be a while loop and just initialize a essentially a counter here.
| 3,502.48 | 3,525.04 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3514.92
|
And we'll use this as our go back value and every time the end position is still
| 3,514.92 | 3,533.72 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3525.04
|
non we'll just add one to go back and this should work.
| 3,525.04 | 3,560.28 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3533.72
|
Just need to remember to rerun anything we need to rerun. Yeah. Okay and that
| 3,533.72 | 3,566.64 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3560.28
|
looks like it solved the issue. So great we can just leave that training for a
| 3,560.28 | 3,572.04 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3566.6400000000003
|
little while and I will see you when it's done.
| 3,566.64 | 3,580.52 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3572.6000000000004
|
Okay so the model is finished and we'll go ahead and just save it. So obviously
| 3,572.6 | 3,589.88 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3580.52
|
we'll need to do that whenever actually doing this on any other projects. So I'm
| 3,580.52 | 3,597.08 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3589.88
|
just going to call it the Silbert custom and it's super easy to save we just do
| 3,589.88 | 3,608.76 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3597.08
|
save pre-trained and the model path. Now as well as this we might also want to
| 3,597.08 | 3,614.76 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3608.76
|
save the tokenizer so we have everything in one place. So to do that we also just
| 3,608.76 | 3,627.12 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3614.76
|
use tokenizer and save pre-trained again. Okay so if we go back into our folder
| 3,614.76 | 3,633.16 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3627.1200000000003
|
here, receive models and we have this Silbert custom and then in here we have
| 3,627.12 | 3,639.32 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3633.1600000000003
|
all of the files we need to build our PyTorch model. It's a little bit different
| 3,633.16 | 3,644.6 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3639.32
|
if we're using TensorFlow but the actual saving process is practically the same.
| 3,639.32 | 3,651.84 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3644.6
|
So now we've finished training we want to switch it out of the training mode so
| 3,644.6 | 3,659.4 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3651.8399999999997
|
we use a model eval. I'm just get all this information about our model as well
| 3,651.84 | 3,664.68 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3659.4
|
we don't actually need any of that and just like before we want to create a
| 3,659.4 | 3,672.6 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3664.68
|
data loader. So for that I'm gonna call it val loader and it's exactly the same
| 3,664.68 | 3,676.6 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3672.6
|
code as before in fact it's probably better if we just copy and paste some of
| 3,672.6 | 3,687.24 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3676.6
|
this. At least the loop. So what we're gonna do here is take the same loop and
| 3,676.6 | 3,693.96 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3687.24
|
apply it as a validation run with our validation data. Just paste that there
| 3,687.24 | 3,701.16 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3693.96
|
we'll initialize this data loader this time of course with the validation set
| 3,693.96 | 3,712.8 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3701.16
|
we'll stick with the same batch size. Now this time we do want to keep a log of
| 3,701.16 | 3,719.04 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3712.7999999999997
|
accuracy so we will keep that there and we also don't need to run most for epochs
| 3,712.8 | 3,723.04 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3719.04
|
because we're not training this time we're just running through all the
| 3,719.04 | 3,730.44 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3723.04
|
batches within our loop of validation data. So this is now a validation loader and
| 3,723.04 | 3,734.72 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3730.44
|
we just loop through each of those batches so we don't need to do anything
| 3,730.44 | 3,741.08 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3734.7200000000003
|
with the gradients here and because we're not doing anything to gradients we
| 3,734.72 | 3,750.08 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3741.08
|
actually add this in to stop PyTorch from calculating any gradients. This
| 3,741.08 | 3,756.36 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3750.08
|
will obviously save us a bit of time when we're processing all of this. And we
| 3,750.08 | 3,763.68 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3756.36
|
put those in there. The outputs we do so want this but of course we don't need to
| 3,756.36 | 3,768.84 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3763.6800000000003
|
be putting in the start and end positions so we can remove those and
| 3,763.68 | 3,777.04 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3768.84
|
this time we want to pull out the start prediction and end prediction. So if we
| 3,768.84 | 3,784.24 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3777.04
|
have a look at what our outputs look like before you see we have this model
| 3,777.04 | 3,790.52 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3784.24
|
output and within here we're a few different tensors which each have a
| 3,784.24 | 3,801.4 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3790.52
|
accessible name. So the ones that we care about are startLogits and that
| 3,790.52 | 3,809.92 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3801.3999999999996
|
will give us the logits for our start position which is essentially like a set
| 3,801.4 | 3,816 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3809.92
|
of predictions where the highest value within that vector represents the token
| 3,809.92 | 3,827.92 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3816.0
|
ID. So we can do that for both. You'll see we get these tensors. Now we only want
| 3,816 | 3,833.44 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3827.92
|
the largest value in each one of these vectors here because that will give us
| 3,827.92 | 3,846.68 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3833.44
|
the input ID. So to get that we use the argmax function and if we just use it by
| 3,833.44 | 3,852.58 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3846.68
|
itself that will give us the maximum index within the whole thing. But we
| 3,846.68 | 3,857.8 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3852.58
|
don't want that we want one for every single vector or every row and to do
| 3,852.58 | 3,864.32 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3857.8
|
that we just set dim equal to 1 and there you go we get a full batch of
| 3,857.8 | 3,870.76 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3864.32
|
outputs. So these are our starting positions and then we also want to do
| 3,864.32 | 3,880.76 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3870.76
|
the same for our ending positions. So we just change start to end. So it's pretty
| 3,870.76 | 3,888.24 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3880.76
|
easy. Now obviously we want to be doing this within our loop because this is
| 3,880.76 | 3,896.72 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3888.2400000000002
|
only doing one batch and we need to do this for every single batch. So we're
| 3,888.24 | 3,912.8 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3896.72
|
just going to assign them to a variable and there we have our predictions and
| 3,896.72 | 3,919.12 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3912.7999999999997
|
all we need to do now is check for an exact match. So what I mean by exact
| 3,912.8 | 3,925.64 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3919.12
|
match is we want to see whether the start positions here which we can rename
| 3,919.12 | 3,933.68 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3925.64
|
to the true values whether these are equal to the predicted values down here
| 3,925.64 | 3,945.76 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3933.68
|
and to calculate that so let me just run this so we have one batch. That
| 3,933.68 | 3,950.88 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3945.7599999999998
|
shouldn't take too long to process and we can just write the code out. So to
| 3,945.76 | 3,960.68 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3950.88
|
check this we just use the double equal syntax here and this will just check for
| 3,950.88 | 3,968.2 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3960.6800000000003
|
matches between two arrays. So we have the start predictions and the start true
| 3,960.68 | 3,984.24 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3968.2
|
values so we'll check for those. Okay so if we just have a look at what we have
| 3,968.2 | 3,990.36 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3984.24
|
here we get this array of true or false. So these ones don't look particularly
| 3,984.24 | 3,997.16 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3990.3599999999997
|
good but that's fine we just want to calculate the accuracy here. So take the
| 3,990.36 | 4,014.08 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t3997.16
|
sum and we also want to divide that by the length. Okay so that will give us our
| 3,997.16 | 4,020.64 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4014.08
|
accuracy within the tensor and we just take it out using the item method but we
| 4,014.08 | 4,024.16 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4020.64
|
also just need to include brackets around this because at the moment we're
| 4,020.64 | 4,031.04 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4024.16
|
trying to take item of the length value. Okay and that gives us our very poor
| 4,024.16 | 4,037.36 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4031.04
|
accuracy on this final batch. So we can take that and within here we want to
| 4,031.04 | 4,047 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4037.3599999999997
|
append that to our accuracy list and then we also want to do that for the end
| 4,037.36 | 4,067.64 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4047.0
|
the prediction as well. And we'll just let that run through and then we can
| 4,047 | 4,073.56 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4067.64
|
calculate our accuracy from the end of that. And then we can have a quick look
| 4,067.64 | 4,081.32 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4073.56
|
at our accuracy here. We can see fortunately it's not as bad as it first
| 4,073.56 | 4,094.72 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4081.32
|
seemed. So we're getting a lot of 93%, 100%, 81% that's generally pretty good. So
| 4,081.32 | 4,101.8 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4094.72
|
of course if we want to get the overall accuracy all we do is sum that and
| 4,094.72 | 4,115.08 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4101.8
|
divide by the length. And we get 63.6% for an exact match accuracy. So what I
| 4,101.8 | 4,120.64 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4115.08
|
mean by exact match is say if we take a look at a few of these that do not match
| 4,115.08 | 4,129.16 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4120.64
|
so we have a 75% match on the fourth batch although that won't be particularly
| 4,120.64 | 4,135.6 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4129.16
|
useful because we can't see that batch right now. So let's just take the last
| 4,129.16 | 4,144.84 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4135.599999999999
|
batch because we have these values here. Now if we look at what start true is we
| 4,135.6 | 4,155.28 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4144.84
|
get these values. Then if we look at start pred we get this. So none of these
| 4,144.84 | 4,162.28 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4155.28
|
match but a couple of them do get pretty close. So these final four all of these
| 4,155.28 | 4,168.16 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4162.28
|
count as 0% on the exact match. But in reality if you look at what we
| 4,162.28 | 4,173.24 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4168.16
|
predicted for every single one of them it's predicting just one token
| 4,168.16 | 4,176.72 |
How to Build Custom Q&A Transformer Models in Python
|
2021-02-12 13:30:03 UTC
|
https://youtu.be/ZIRmXkHp0-c
|
ZIRmXkHp0-c
|
UCv83tO5cePwHMt1952IVVHw
|
ZIRmXkHp0-c-t4173.24
|
before so it's getting quite close but it's not an exact match so it scores
| 4,173.24 | 4,186.04 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.