I wrote an autograd function to create a custom grad that is of a different shape than the original parameter. However, I get an error like
Function CustomBackward returned an invalid gradient at index 1 - got [1024, 256] but expected shape compatible with [1024, 2048].
Since I’m doing this to mainly save memory is there a way I can disable this check? This gradient is not required for other gradient computations (since it is for the the weight) and I want to manually control how I accumulate these gradients.