From bfe1f8eeeece5349cdfcb632b2414d187dc7bb79 Mon Sep 17 00:00:00 2001 From: Mike J Innes Date: Fri, 18 Aug 2017 00:48:49 +0100 Subject: [PATCH] shouldn't do this --- src/Flux.jl | 1 - src/ops.jl | 18 ------------------ 2 files changed, 19 deletions(-) delete mode 100644 src/ops.jl diff --git a/src/Flux.jl b/src/Flux.jl index ac3b86d3..794f3e4e 100644 --- a/src/Flux.jl +++ b/src/Flux.jl @@ -23,7 +23,6 @@ include("core.jl") import .FluxCore: back!, update!, graph include("utils.jl") -include("ops.jl") include("params.jl") include("compiler/code.jl") diff --git a/src/ops.jl b/src/ops.jl deleted file mode 100644 index e9cb75b1..00000000 --- a/src/ops.jl +++ /dev/null @@ -1,18 +0,0 @@ -export reshape, tile, fill, cast, solve, triangular_solve, randu, randn, - expand_dims - -import Base: reshape, fill, randn - -reshape(x::AbstractArray, dims::AbstractArray) = reshape(x,tuple(dims...)) -tile(x::AbstractArray, mult::AbstractArray) = repeat(x,outer=tuple(mult...)) -fill{T}(x::T, dims::AbstractArray) = fill(x,tuple(dims...)) -cast{T}(x::AbstractArray, ::Type{T}) = convert(Array{T},x) -solve(A::AbstractArray, b::AbstractArray) = A\b -triangular_solve(A::AbstractArray, b::AbstractArray) = A\b -randu(x::AbstractArray) = rand(tuple(x...)) -randn(x::AbstractArray) = randn(tuple(x...)) - -function expand_dims(x,dim) - s = [size(x)...] - reshape(x,tuple(vcat(s[1:dim-1],1,s[dim:end])...)) -end