Hello,
My Os is window 7. I hope the three figures could explain my confusion. As is show in fig 1, “Process finished with exit code 0”. Just after I execute the backward(), I find the code can’t terminate, although code has finished! (fig 2). And the code can be run perfectly in python console(fig 3). So how to terminate automatically even if I call the backward() function. That’ the point! Again, thanks a lot for your time. It really very kind of you!!!

figure.jpg2048×1534 466 KB