Using .data always messes up autograd because it doesn’t track history. Since you are modifying Variables that requires grad in-place, something like below will always not work:
feat[2, 1] = fc(feat[2, 1])

because the original feat is definitely needed to calculate gradient. But the following should work:
featc = feat.clone()
featc[2, 1] = fc(feat[2, 1])

then use featc in the following computation.