I’m having a technical question. Let’s consider the following example where I want to select for only the top 10 values from the last dimension. The example works as intended but I am worried that I might break the computation graph since I’m creating a new tensor in line 2. Can anyone confirm if this is the right approach, or how I could verify it?
 topk, indices = torch.topk(support, 10)
 support = torch.zeros([B, N, N], device=self.device).scatter_(2, indices, topk)