use nnlib for activations
This commit is contained in:
parent
3e0f45046c
commit
ef681f16ea
@ -5,10 +5,13 @@ module Flux
|
||||
using Juno
|
||||
using Lazy: @forward
|
||||
|
||||
export Chain, Linear, σ, softmax
|
||||
export Chain, Linear
|
||||
|
||||
# Zero Flux Given
|
||||
|
||||
using NNlib
|
||||
export σ, relu, softmax
|
||||
|
||||
include("Tracker/Tracker.jl")
|
||||
using .Tracker
|
||||
export track, back!
|
||||
|
@ -1,11 +1,3 @@
|
||||
# Activation Functions
|
||||
|
||||
σ(x) = 1 / (1 + exp(-x))
|
||||
|
||||
relu(x) = max(0, x)
|
||||
|
||||
softmax(xs) = exp.(xs) ./ sum(exp.(xs), 2)
|
||||
|
||||
# Cost functions
|
||||
|
||||
mse(ŷ, y) = sumabs2(ŷ .- y)/2
|
||||
|
Loading…
Reference in New Issue
Block a user