mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 04:24:43 +00:00
add external files
This commit is contained in:
parent
7823243dbe
commit
92aa3ea078
122 changed files with 1087 additions and 0 deletions
1
crates/erg_compiler/lib/external/torch.d/utils.d/__init__.d.er
vendored
Normal file
1
crates/erg_compiler/lib/external/torch.d/utils.d/__init__.d.er
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.data = pyimport "./data"
|
9
crates/erg_compiler/lib/external/torch.d/utils.d/data.d/__init__.d.er
vendored
Normal file
9
crates/erg_compiler/lib/external/torch.d/utils.d/data.d/__init__.d.er
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
{.DataLoader;} = pyimport "./dataloader"
|
||||
{.Dataset;} = pyimport "./dataset"
|
||||
{
|
||||
.Sampler;
|
||||
.SequentialSampler;
|
||||
.RandomSampler;
|
||||
.SubsetRandomSampler;
|
||||
.WeightedRandomSampler;
|
||||
} = pyimport "./sampler"
|
25
crates/erg_compiler/lib/external/torch.d/utils.d/data.d/dataloader.d.er
vendored
Normal file
25
crates/erg_compiler/lib/external/torch.d/utils.d/data.d/dataloader.d.er
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
torch = pyimport "torch"
|
||||
dataset = pyimport "./dataset"
|
||||
{Sampler;} = pyimport "./sampler"
|
||||
|
||||
.DataLoader: ClassType
|
||||
.DataLoader <: Iterable((torch.Tensor!(_, _), torch.Tensor!(_, _)))
|
||||
.DataLoader.
|
||||
__call__: (
|
||||
dataset: dataset.Dataset,
|
||||
batch_size := Nat,
|
||||
shuffle := Bool,
|
||||
sampler := Sampler,
|
||||
batch_sampler := Sampler,
|
||||
num_workers := Nat,
|
||||
collate_fn := Obj,
|
||||
pin_memory := Bool,
|
||||
drop_last := Bool,
|
||||
timeout := Float,
|
||||
worker_init_fn := Obj,
|
||||
multiprocessing_context := Obj,
|
||||
generator := Obj,
|
||||
prefetch_factor := Nat,
|
||||
persistent_workers := Bool,
|
||||
pin_memory_device := Str,
|
||||
) -> .DataLoader
|
1
crates/erg_compiler/lib/external/torch.d/utils.d/data.d/dataset.d.er
vendored
Normal file
1
crates/erg_compiler/lib/external/torch.d/utils.d/data.d/dataset.d.er
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.Dataset: ClassType
|
13
crates/erg_compiler/lib/external/torch.d/utils.d/data.d/sampler.d.er
vendored
Normal file
13
crates/erg_compiler/lib/external/torch.d/utils.d/data.d/sampler.d.er
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
.Sampler: ClassType
|
||||
|
||||
.RandomSampler: ClassType
|
||||
.RandomSampler <: .Sampler
|
||||
|
||||
.SequentialSampler: ClassType
|
||||
.SequentialSampler <: .Sampler
|
||||
|
||||
.SubsetRandomSampler: ClassType
|
||||
.SubsetRandomSampler <: .Sampler
|
||||
|
||||
.WeightedRandomSampler: ClassType
|
||||
.WeightedRandomSampler <: .Sampler
|
Loading…
Add table
Add a link
Reference in a new issue