Solved by WakemeUpwhen in post #5 
              
              
                Thank you to point that out for me. I will modify my code shortly. But it still doesn’t explain why the loss is not changing at all. Any ideas? 
The modified code now is 
def loop_stack(loss, acc):
    if loss == None:
        print(list(map(lambda x: str(x)[1:-1].split(" ")[0], acc)))
        retur…