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 3dfec6b commit 8758a87Copy full SHA for 8758a87
test/TorchSharpTest/TestDataLoader.cs
@@ -4,6 +4,7 @@
4
using System.Linq;
5
using TorchSharp.Modules;
6
using Xunit;
7
+using static TorchSharp.torch;
8
9
10
namespace TorchSharp
@@ -306,5 +307,17 @@ public void ConcatDatasetTest()
306
307
Assert.True(dataset2.Disposed);
308
Assert.True(dataset3.Disposed);
309
}
310
+
311
+ [Fact]
312
+ public void ConcatDatasetDataLoader()
313
+ {
314
+ using var dataset = torch.utils.data.ConcatDataset<IReadOnlyDictionary<string, Tensor>>(
315
+ new[] {
316
+ new TestDataset(),
317
318
+ });
319
+ var dataloader = torch.utils.data.DataLoader(dataset, 10, false);
320
+ Assert.Equal(2, dataloader.Count);
321
+ }
322
323
0 commit comments