When I pass the parameters into the function, I use self. iter_simp_min_sum_batch_scatter(wts.unsqueeze(0), wts.t().unsqueeze(0), wts.unsqueeze(0).clone().detach(), 5), so technically, only 1 input is detached from the computational graph right?
The parameters correspond to (m_alpha_beta, m_beta_alpha, weights, n_iter), so only weights should be non-learnable, m_alpha_beta and m_beta_alpha should still be part of the graph. Or do I have to explicitly copy it to another variable and detach it to prevent it from affecting the others?