fix(stack): use stack build and exec instead of manual stack ghc
refactor: rename from Lib to Sibe
This commit is contained in:
parent
4397f5203a
commit
23851a85f5
35
LICENSE
35
LICENSE
@ -1,35 +1,3 @@
|
||||
<<<<<<< HEAD
|
||||
Copyright Author name here (c) 2016
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
|
||||
* Neither the name of Author name here nor the names of other
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
=======
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
@ -684,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
{project} Copyright (C) {year} {fullname}
|
||||
Sibe Copyright (C) 2016 Mahdi Dibaiee
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
@ -704,4 +672,3 @@ may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
>>>>>>> ba301efb2909d359ae56cc0bce3710ccf10b139f
|
||||
|
BIN
app/Main.hi
BIN
app/Main.hi
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
module Main where
|
||||
|
||||
import Lib
|
||||
import Sibe
|
||||
import Numeric.LinearAlgebra
|
||||
import Data.List
|
||||
import Debug.Trace
|
||||
|
BIN
app/Main.o
BIN
app/Main.o
Binary file not shown.
BIN
examples/xor
BIN
examples/xor
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
module Main where
|
||||
import Lib
|
||||
import Sibe
|
||||
import Numeric.LinearAlgebra
|
||||
import Data.List
|
||||
import Debug.Trace
|
||||
@ -21,12 +21,11 @@ module Main where
|
||||
|
||||
updated_network = session inputs network labels learning_rate (iterations, epochs)
|
||||
results = map (`forward` updated_network) inputs
|
||||
rounded = map (map round) $ map toList results
|
||||
in sequence [putStrLn "",
|
||||
putStrLn $ "inputs: " ++ show inputs,
|
||||
rounded = map (map round . toList) results
|
||||
in sequence [putStrLn $ "inputs: " ++ show inputs,
|
||||
putStrLn $ "labels: " ++ show labels,
|
||||
putStrLn $ "learning rate: " ++ show learning_rate,
|
||||
putStrLn $ "iterations/epochs: " ++ show (iterations, epochs),
|
||||
putStrLn $ "...",
|
||||
putStrLn "...",
|
||||
putStrLn $ "rounded result: " ++ show rounded,
|
||||
putStrLn $ "actual result: " ++ show results]
|
||||
|
23
sibe.cabal
23
sibe.cabal
@ -1,22 +1,24 @@
|
||||
name: sibe
|
||||
version: 0.1.0.0
|
||||
synopsis: Initial project template from stack
|
||||
description: Please see README.md
|
||||
homepage: https://github.com/githubuser/sibe#readme
|
||||
license: BSD3
|
||||
description: Haskell Machine Learning
|
||||
homepage: https://github.com/mdibaiee/sibe
|
||||
license: GPL-3
|
||||
license-file: LICENSE
|
||||
author: Author name here
|
||||
maintainer: example@example.com
|
||||
copyright: 2016 Author name here
|
||||
category: Web
|
||||
author: Mahdi Dibaiee
|
||||
maintainer: mdibaiee@aol.com
|
||||
copyright: 2016 Mahdi Dibaiee
|
||||
category: Web, Machine Learning, Data Science
|
||||
build-type: Simple
|
||||
-- extra-source-files:
|
||||
cabal-version: >=1.10
|
||||
|
||||
library
|
||||
hs-source-dirs: src
|
||||
exposed-modules: Lib
|
||||
exposed-modules: Sibe
|
||||
build-depends: base >= 4.7 && < 5
|
||||
, hmatrix
|
||||
, random
|
||||
default-language: Haskell2010
|
||||
|
||||
executable sibe-exe
|
||||
@ -25,6 +27,7 @@ executable sibe-exe
|
||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N
|
||||
build-depends: base
|
||||
, sibe
|
||||
, hmatrix
|
||||
default-language: Haskell2010
|
||||
|
||||
executable example-xor
|
||||
@ -33,6 +36,7 @@ executable example-xor
|
||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N
|
||||
build-depends: base
|
||||
, sibe
|
||||
, hmatrix
|
||||
default-language: Haskell2010
|
||||
|
||||
test-suite sibe-test
|
||||
@ -41,9 +45,10 @@ test-suite sibe-test
|
||||
main-is: Spec.hs
|
||||
build-depends: base
|
||||
, sibe
|
||||
, hmatrix
|
||||
ghc-options: -threaded -rtsopts -with-rtsopts=-N
|
||||
default-language: Haskell2010
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
location: https://github.com/githubuser/sibe
|
||||
location: https://github.com/mdibaiee/sibe
|
||||
|
@ -3,7 +3,7 @@
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
|
||||
module Lib
|
||||
module Sibe
|
||||
(Network(..),
|
||||
Layer,
|
||||
Input,
|
||||
@ -15,7 +15,6 @@ module Lib
|
||||
shuffle,
|
||||
) where
|
||||
import Numeric.LinearAlgebra
|
||||
import Control.Monad.Random
|
||||
import System.Random
|
||||
import Debug.Trace
|
||||
import Data.List (foldl', sortBy)
|
@ -41,7 +41,7 @@ packages:
|
||||
commit: 42a88fbcb6bd1d2c4dc18fae5e962bd34fb316a1
|
||||
subdirs:
|
||||
- packages/base
|
||||
#- '.'
|
||||
- '.'
|
||||
|
||||
# Dependency packages to be pulled from upstream that are not in the resolver
|
||||
# (e.g., acme-missiles-0.3)
|
||||
|
10
test/Spec.hs
10
test/Spec.hs
@ -1,2 +1,8 @@
|
||||
main :: IO ()
|
||||
main = putStrLn "Test suite not yet implemented"
|
||||
module Main where
|
||||
import System.Exit (exitFailure)
|
||||
|
||||
import Sibe
|
||||
|
||||
main = do
|
||||
putStrLn "Hey"
|
||||
exitFailure
|
||||
|
Loading…
Reference in New Issue
Block a user