I think here the problem really is that this tensor requires gradient but is no parameter. If you try it requires gradient set to False, there should be no problems regarding combined_feature_map and the graph tracing. However, I remember you’ve set requires gradient to True a while ago to solve another issue.