feat: add torch type declaration

This commit is contained in:
Shunsuke Shibayama 2023-12-09 12:05:07 +09:00
parent 480c9e4f83
commit 1aa61cd6a6
24 changed files with 84 additions and 0 deletions

View file

@ -0,0 +1,23 @@
vision = pyimport "./vision"
.MNIST: ClassType
.MNIST <: vision.VisionDataset
.MNIST.
__call__: (
root: Str,
train := Bool,
download := Bool,
transform := GenericCallable,
target_transform := GenericCallable,
) -> .MNIST
.FashionMNIST: ClassType
.FashionMNIST <: .MNIST
.FashionMNIST.
__call__: (
root: Str,
train := Bool,
download := Bool,
transform := GenericCallable,
target_transform := GenericCallable,
) -> .FashionMNIST

View file

@ -0,0 +1,9 @@
.VisionDataset: ClassType
.VisionDataset.
__call__: (
root: Str,
train := Bool,
download := Bool,
transform := GenericCallable,
target_transform := GenericCallable,
) -> .VisionDataset

View file

@ -0,0 +1,3 @@
.ToTensor: ClassType
.ToTensor.
__call__: () -> .ToTensor