'Pytorch RuntimeError: The size of tensor a (4) must match the size of tensor b (3)

first of all I have to say I am an absolute rookie in coding, but this don't takes away my deepest interest in it. Now I am sort of started and I started with something I can use pretty good. Some rotoscope code which I followed the tutorial on this links:

Short version - https://youtu.be/bXR67IWwsus

longer version - < https://youtu.be/rTH5lMPp4Qw>

So I've been trying and trying but still didn’t come to the point I actually made it rotoscope… I feel like I am almost there but now I am with ( another ) runtime error which I don’t understand It seems like everything is set right until I want to start

The error:
Pytorch RuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton dimension 0

I've searched on the web but the things I came across didn't fix my problem yet

  1. Before I started
  2. after I started the rotomaker

[1]:[before I started ] https://i.stack.imgur.com/KEeHF.jpg [2]:[after I ran it ] https://i.stack.imgur.com/J9EfM.jpg

I should have made decent screen shots of my actual pc having it but I forgot. After many hours struggling I decided to take a little break before my brains explode.

Hope someone can help me!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source