fix: declared type instantiation bug

This commit is contained in:
Shunsuke Shibayama 2024-02-07 01:58:39 +09:00
parent 9a031ad514
commit 53172d5132
2 changed files with 26 additions and 25 deletions

View file

@ -1,13 +1,13 @@
# {Tensor!;} = pyimport "torch"
{Tensor!;} = pyimport "torch"
{Parameter;} = pyimport "torch/nn/parameter"
.Module: ClassType
.Module <: InheritableType
.Module|<: GenericCallable|.
__call__: |M <: .Module|(
self: M,
input: Obj #Tensor!(T, _),
) -> Obj #Tensor!(T, _)
__call__: |T|(
self: .Module,
input: Tensor!(T, _),
) -> Tensor!(T, _)
.Module.
parameters: (self: Ref(.Module), recurse := Bool) -> Iterator Parameter
named_parameters: (self: Ref(.Module), prefix := Str, recurse := Bool, remove_duplicate := Bool) -> Iterator((Str, Parameter))