mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-01 21:21:10 +00:00
15 lines
491 B
Python
15 lines
491 B
Python
dataset = pyimport "torch/utils/data/dataset"
|
|
{Tensor!;} = pyimport "torch"
|
|
|
|
.VisionDataset: ClassType
|
|
.VisionDataset <: dataset.Dataset
|
|
.VisionDataset|<: Indexable(Nat, (Tensor!(Float, _), Tensor!(Float, _)))|.
|
|
__getitem__: (index: Nat) -> (Tensor!(Float, _), Tensor!(Float, _))
|
|
.VisionDataset.
|
|
__call__: (
|
|
root: Str,
|
|
train := Bool,
|
|
download := Bool,
|
|
transform := GenericCallable,
|
|
target_transform := GenericCallable,
|
|
) -> .VisionDataset
|