I am trying to train layer by layer. In a stage I would like to freeze the final layer alone . When i tried to freeze it I encounter an error saying . How do i solve this problem ? any idea ?
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn