Solved by ra_schoonhoven in post #3 
              
              
                Solved 
It turns out my check function was off by one. When you use getattr() to grab the weights, updating them with weights = ... will update the model weights. Not entirely sure why setattr(...) throws this error though.