use non-persistent buffer for anchors
Summary: fix
@@ -26,7 +26,8 @@ class BufferList(nn.Module):
def __init__(self, buffers):
super().__init__()
for i, buffer in enumerate(buffers):
- self.register_buffer(str(i), buffer)
+ # Use non-persistent buffer so the values are not saved in checkpoint
+ self.register_buffer(str(i), buffer, persistent=False)
def __len__(self):
return len(self._buffers)
