strip down non-obvious exports
This commit is contained in:
parent
eafba7a55f
commit
4685d2e672
@ -1,5 +1,3 @@
|
|||||||
export onehot, onecold, chunk, partition, batches, sequences
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
onehot('b', ['a', 'b', 'c', 'd']) => [false, true, false, false]
|
onehot('b', ['a', 'b', 'c', 'd']) => [false, true, false, false]
|
||||||
|
|
||||||
@ -27,8 +25,6 @@ onecold(y::AbstractMatrix, l...) =
|
|||||||
using Iterators
|
using Iterators
|
||||||
import Iterators: Partition, partition
|
import Iterators: Partition, partition
|
||||||
|
|
||||||
export partition
|
|
||||||
|
|
||||||
Base.length(l::Partition) = length(l.xs) ÷ l.step
|
Base.length(l::Partition) = length(l.xs) ÷ l.step
|
||||||
|
|
||||||
_partition(r::UnitRange, step::Integer) = (step*(i-1)+1:step*i for i in 1:(r.stop÷step))
|
_partition(r::UnitRange, step::Integer) = (step*(i-1)+1:step*i for i in 1:(r.stop÷step))
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export σ, relu, softmax, flatten
|
export σ, relu, softmax
|
||||||
|
|
||||||
# Sigmoid
|
# Sigmoid
|
||||||
σ(x) = 1 ./ (1 + exp.(-x))
|
σ(x) = 1 ./ (1 + exp.(-x))
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
export mse, logloss
|
|
||||||
|
|
||||||
mse(ŷ, y) = sumabs2(ŷ .- y)/2
|
mse(ŷ, y) = sumabs2(ŷ .- y)/2
|
||||||
|
|
||||||
back!(::typeof(mse), Δ, ŷ, y) = Δ .* (ŷ .- y)
|
back!(::typeof(mse), Δ, ŷ, y) = Δ .* (ŷ .- y)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export Conv2D, MaxPool, AvgPool, Reshape
|
export Conv2D
|
||||||
|
|
||||||
struct Conv2D <: Model
|
struct Conv2D <: Model
|
||||||
filter::Param{Array{Float64,4}} # [height, width, inchans, outchans]
|
filter::Param{Array{Float64,4}} # [height, width, inchans, outchans]
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
export Model, back!, update!, param
|
|
||||||
|
|
||||||
# Basic model API
|
# Basic model API
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -93,8 +91,6 @@ Base.copy!(p::Param, xs) = copy!(p.x, xs)
|
|||||||
|
|
||||||
# Anonymous models
|
# Anonymous models
|
||||||
|
|
||||||
export Capacitor
|
|
||||||
|
|
||||||
struct Capacitor <: Model
|
struct Capacitor <: Model
|
||||||
graph::IVertex{Any}
|
graph::IVertex{Any}
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
export AArray, unsqueeze
|
|
||||||
|
|
||||||
call(f, xs...) = f(xs...)
|
call(f, xs...) = f(xs...)
|
||||||
|
|
||||||
# Arrays
|
# Arrays
|
||||||
|
Loading…
Reference in New Issue
Block a user