use nnlib for activations

This commit is contained in:
Mike J Innes 2017-08-21 17:53:04 +01:00
parent 3e0f45046c
commit ef681f16ea
3 changed files with 5 additions and 9 deletions

View File

@ -2,3 +2,4 @@ julia 0.6.0
DataFlow 0.2.1 0.3-
Juno
MacroTools 0.3.3
NNlib

View File

@ -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!

View File

@ -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