File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,23 @@ public static partial class data
14
14
/// <summary>
15
15
/// Map-style data set
16
16
/// </summary>
17
- public abstract class Dataset : Dataset < Dictionary < string , torch . Tensor > >
17
+ public abstract class Dataset : Dataset < Dictionary < string , Tensor > > ,
18
+ IDataset < IReadOnlyDictionary < string , Tensor > >
18
19
{
20
+ // Due to covariation, it should naturally be IDataset<IReadOnlyDictionary<string, Tensor>>.
21
+ // However FSharp.Examples will break down without this.
22
+ IReadOnlyDictionary < string , Tensor > IDataset < IReadOnlyDictionary < string , Tensor > > . this [ long index ] => this [ index ] ;
19
23
}
20
24
21
25
/// <summary>
22
26
/// Iterable-style data sets
23
27
/// </summary>
24
- public abstract class IterableDataset : Dataset < IList < Tensor > >
28
+ public abstract class IterableDataset : Dataset < IList < Tensor > > ,
29
+ IDataset < IEnumerable < Tensor > >
25
30
{
31
+ // Due to covariation, it should naturally be IDataset<IEnumerable<Tensor>>.
32
+ // However FSharp.Examples will break down without this.
33
+ IEnumerable < Tensor > IDataset < IEnumerable < Tensor > > . this [ long index ] => this [ index ] ;
26
34
}
27
35
28
36
/// <summary>
You can’t perform that action at this time.
0 commit comments