I tried it and it still shows the error message. The thing is that the error occurs before fake is defined. Specifically, it occurs when trying to predict the noise vector ,  fake = model[0](noise). When running normal training this does not occur.