Added support for Float64 for DepthwiseConv

DepthwiseConv was giving errors for Float64. This fixes the issue.
This commit is contained in:
Manjunath Bhat 2019-03-01 15:04:05 +05:30 committed by GitHub
parent d6cf116a74
commit 704be49483
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,6 +165,12 @@ function Base.show(io::IO, l::DepthwiseConv)
print(io, ")")
end
(a::DepthwiseConv{<:Any,<:Any,W})(x::AbstractArray{T}) where {T <: Union{Float32,Float64}, W <: AbstractArray{T}} =
invoke(a, Tuple{AbstractArray}, x)
(a::DepthwiseConv{<:Any,<:Any,W})(x::AbstractArray{<:Real}) where {T <: Union{Float32,Float64}, W <: AbstractArray{T}} =
a(T.(x))
"""
MaxPool(k)