We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bd4c38 commit 6b7c873Copy full SHA for 6b7c873
src/TorchSharp/DataLoader.cs
@@ -344,7 +344,7 @@ public bool MoveNext()
344
if (this.currentDisposables is not null) {
345
using (var collate_scope = DisposeScopeManager.NewDisposeScope()) {
346
Current = collate_fn(items, device);
347
- currentDisposables = collate_scope.DisposablesView.ToList();
+ currentDisposables.AddRange(collate_scope.DisposablesView);
348
collate_scope.Detach(currentDisposables);
349
}
350
0 commit comments