dvgodoy / PyTorchStepByStep

Official repository of my book: "Deep Learning with PyTorch Step-by-Step: A Beginner's Guide"
https://pytorchstepbystep.com
MIT License
843 stars 316 forks source link

is it really random, code says yes, results says may not much so... #50

Open jdgh000 opened 1 month ago

jdgh000 commented 1 month ago

I totally got it that code has no training at all in starting example of enc-dec example around pages ch9 p227-p233 where two corners were fed into enc-dec model and final corner of output of two corner is displayed. I see example input is starting from lower left going CCW. Final corner in the example is obviously [1,-1]. But the predicted final output is I am also seeing tensor([[[ 0.3105, -0.5263]]], grad_fn=) while it is not close to 1,-1 but it at least got the coordinate panes right (+, -), wondering how did it so, by pure luck??

jdgh000 commented 1 month ago

Alright, printing full last two corners got following, 3rd corner also +, - signifying random nature. WIll be interesting to read the output once trained. Can close this issue or open a while is fine just to bring up interesting points.

['hidden_seq'] : <class 'torch.Tensor'> torch.Size([1, 2, 2]) tensor([[[ 0.0832, -0.0356], [ 0.3105, -0.5263]]], grad_fn=)