type signatures

This commit is contained in:
Dhairya Gandhi 2020-02-26 22:36:25 +05:30
parent cd931793ef
commit cf82393ae8
1 changed files with 4 additions and 4 deletions

View File

@ -60,8 +60,8 @@ function Conv(w::AbstractArray{T,N}, b::Union{Zeros, AbstractVector{T}}, σ = id
return Conv(σ, w, b, stride, pad, dilation) return Conv(σ, w, b, stride, pad, dilation)
end end
function Conv(;weight::AbstractArray, bias::Union{Zeros, AbstractVector{T}}, activation = identity, function Conv(;weight::AbstractArray{T,N}, bias::Union{Zeros, AbstractVector{T}},
stride = 1, pad = 0, dilation = 1) where {T,N} activation = identity, stride = 1, pad = 0, dilation = 1) where {T,N}
Conv(weight, bias, activation, stride = stride, pad = pad, dilation = dilation) Conv(weight, bias, activation, stride = stride, pad = pad, dilation = dilation)
end end
@ -268,7 +268,7 @@ function DepthwiseConv(w::AbstractArray{T,N}, b::Union{Zeros, AbstractVector{T}}
return DepthwiseConv(σ, w, b, stride, pad, dilation) return DepthwiseConv(σ, w, b, stride, pad, dilation)
end end
function DepthwiseConv(;weight::AbstractArray, bias::Union{Zeros, AbstractVector{T}}, function DepthwiseConv(;weight::AbstractArray{T,N}, bias::Union{Zeros, AbstractVector{T}},
activation = identity, stride = 1, pad = 0, dilation = 1) where {T,N} activation = identity, stride = 1, pad = 0, dilation = 1) where {T,N}
DepthwiseConv(weight, bias, activation, stride = stride, pad = pad, dilation = dilation) DepthwiseConv(weight, bias, activation, stride = stride, pad = pad, dilation = dilation)
end end
@ -379,7 +379,7 @@ function CrossCor(w::AbstractArray{T,N}, b::Union{Zeros, AbstractVector{T}}, σ
return CrossCor(σ, w, b, stride, pad, dilation) return CrossCor(σ, w, b, stride, pad, dilation)
end end
function CrossCor(;weight::AbstractArray, bias::Union{Zeros, AbstractVector{T}}, function CrossCor(;weight::AbstractArray{T,N}, bias::Union{Zeros, AbstractVector{T}},
activation = identity, stride = 1, pad = 0, dilation = 1) where {T,N} activation = identity, stride = 1, pad = 0, dilation = 1) where {T,N}
CrossCor(weight, bias, activation, stride = stride, pad = pad, dilation = dilation) CrossCor(weight, bias, activation, stride = stride, pad = pad, dilation = dilation)
end end