Last active
December 3, 2017 00:06
-
-
Save rossng/41a75338e7067510874ffae37b015608 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Layer (layer : Vect ir Nat -> Vect or Nat -> Type) where | |
runLayer : Tensor ir i Double | |
-> layer i o | |
-> Tensor or o Double | |
data FullyConnected : (ir : Nat) -> (or : Nat) -> Vect ir Nat -> Vect or Nat -> Type where | |
MkFullyConnected : (ir = 1) | |
-> (or = 1) | |
-> (biases : Tensor 1 o Double) | |
-> (weights : Tensor 2 ((head o) :: i) Double) | |
-> FullyConnected 1 1 i o | |
Layer (FullyConnected 1 1) where | |
runLayer input (MkFullyConnected ir or biases weights) = biases |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment