Skip to content

Commit 7899d41

Browse files
committed
Merge pull request #13 from it-depends/master
Add new, x15 faster F# version.
2 parents 6614a18 + 8ab8f03 commit 7899d41

File tree

18 files changed

+21737
-0
lines changed

18 files changed

+21737
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.sln.docstates
8+
9+
# Build results
10+
[Dd]ebug/
11+
[Dd]ebugPublic/
12+
[Rr]elease/
13+
x64/
14+
build/
15+
bld/
16+
[Bb]in/
17+
[Oo]bj/
18+
19+
# Roslyn cache directories
20+
*.ide/
21+
22+
# MSTest test Results
23+
[Tt]est[Rr]esult*/
24+
[Bb]uild[Ll]og.*
25+
26+
#NUNIT
27+
*.VisualState.xml
28+
TestResult.xml
29+
30+
# Build Results of an ATL Project
31+
[Dd]ebugPS/
32+
[Rr]eleasePS/
33+
dlldata.c
34+
35+
*_i.c
36+
*_p.c
37+
*_i.h
38+
*.ilk
39+
*.meta
40+
*.obj
41+
*.pch
42+
*.pdb
43+
*.pgc
44+
*.pgd
45+
*.rsp
46+
*.sbr
47+
*.tlb
48+
*.tli
49+
*.tlh
50+
*.tmp
51+
*.tmp_proj
52+
*.log
53+
*.vspscc
54+
*.vssscc
55+
.builds
56+
*.pidb
57+
*.svclog
58+
*.scc
59+
60+
# Chutzpah Test files
61+
_Chutzpah*
62+
63+
# Visual C++ cache files
64+
ipch/
65+
*.aps
66+
*.ncb
67+
*.opensdf
68+
*.sdf
69+
*.cachefile
70+
71+
# Visual Studio profiler
72+
*.psess
73+
*.vsp
74+
*.vspx
75+
76+
# TFS 2012 Local Workspace
77+
$tf/
78+
79+
# Guidance Automation Toolkit
80+
*.gpState
81+
82+
# ReSharper is a .NET coding add-in
83+
_ReSharper*/
84+
*.[Rr]e[Ss]harper
85+
*.DotSettings.user
86+
87+
# JustCode is a .NET coding addin-in
88+
.JustCode
89+
90+
# TeamCity is a build add-in
91+
_TeamCity*
92+
93+
# DotCover is a Code Coverage Tool
94+
*.dotCover
95+
96+
# NCrunch
97+
_NCrunch_*
98+
.*crunch*.local.xml
99+
100+
# MightyMoose
101+
*.mm.*
102+
AutoTest.Net/
103+
104+
# Web workbench (sass)
105+
.sass-cache/
106+
107+
# Installshield output folder
108+
[Ee]xpress/
109+
110+
# DocProject is a documentation generator add-in
111+
DocProject/buildhelp/
112+
DocProject/Help/*.HxT
113+
DocProject/Help/*.HxC
114+
DocProject/Help/*.hhc
115+
DocProject/Help/*.hhk
116+
DocProject/Help/*.hhp
117+
DocProject/Help/Html2
118+
DocProject/Help/html
119+
120+
# Click-Once directory
121+
publish/
122+
123+
# Publish Web Output
124+
*.[Pp]ublish.xml
125+
*.azurePubxml
126+
## TODO: Comment the next line if you want to checkin your
127+
## web deploy settings but do note that will include unencrypted
128+
## passwords
129+
#*.pubxml
130+
131+
# NuGet Packages Directory
132+
packages/*
133+
## TODO: If the tool you use requires repositories.config
134+
## uncomment the next line
135+
#!packages/repositories.config
136+
137+
# Enable "build/" folder in the NuGet Packages folder since
138+
# NuGet packages use it for MSBuild targets.
139+
# This line needs to be after the ignore of the build folder
140+
# (and the packages folder if the line above has been uncommented)
141+
!packages/build/
142+
143+
# Windows Azure Build Output
144+
csx/
145+
*.build.csdef
146+
147+
# Windows Store app package directory
148+
AppPackages/
149+
150+
# Others
151+
sql/
152+
*.Cache
153+
ClientBin/
154+
[Ss]tyle[Cc]op.*
155+
~$*
156+
*~
157+
*.dbmdl
158+
*.dbproj.schemaview
159+
*.pfx
160+
*.publishsettings
161+
node_modules/
162+
163+
# RIA/Silverlight projects
164+
Generated_Code/
165+
166+
# Backup & report files from converting an old project file
167+
# to a newer Visual Studio version. Backup files are not needed,
168+
# because we have git ;-)
169+
_UpgradeReport_Files/
170+
Backup*/
171+
UpgradeLog*.XML
172+
UpgradeLog*.htm
173+
174+
# SQL Server files
175+
*.mdf
176+
*.ldf
177+
178+
# Business Intelligence projects
179+
*.rdl.data
180+
*.bim.layout
181+
*.bim_*.settings
182+
183+
# Microsoft Fakes
184+
FakesAssemblies/
185+
186+
# LightSwitch generated files
187+
GeneratedArtifacts/
188+
_Pvt_Extensions/
189+
ModelManifest.xml
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module Activation
2+
open System
3+
4+
type Activation =
5+
{CalcValue : float -> float
6+
CalcDerivative : float -> float
7+
GetRandomWeight : unit -> float}
8+
9+
let rnd = new Random()
10+
let public sigmoidActivation =
11+
{CalcValue = (fun x -> 1. / (1. + exp -x))
12+
CalcDerivative = (fun x -> x * (1. - x))
13+
GetRandomWeight = (fun () -> rnd.NextDouble() * 2. - 1.)}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
5+
</startup>
6+
</configuration>
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>188b56b9-ee84-44a6-b8bc-34d743d4be3f</ProjectGuid>
9+
<OutputType>Exe</OutputType>
10+
<RootNamespace>FSharp_Neural_Network</RootNamespace>
11+
<AssemblyName>FSharp_Neural_Network</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<TargetFSharpCoreVersion>4.3.1.0</TargetFSharpCoreVersion>
15+
<Name>FSharp-Neural-Network</Name>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<Tailcalls>false</Tailcalls>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<WarningLevel>3</WarningLevel>
25+
<PlatformTarget>AnyCPU</PlatformTarget>
26+
<DocumentationFile>bin\Debug\FSharp_Neural_Network.XML</DocumentationFile>
27+
<Prefer32Bit>true</Prefer32Bit>
28+
</PropertyGroup>
29+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30+
<DebugType>pdbonly</DebugType>
31+
<Optimize>true</Optimize>
32+
<Tailcalls>true</Tailcalls>
33+
<OutputPath>bin\Release\</OutputPath>
34+
<DefineConstants>TRACE</DefineConstants>
35+
<WarningLevel>3</WarningLevel>
36+
<PlatformTarget>AnyCPU</PlatformTarget>
37+
<DocumentationFile>bin\Release\FSharp_Neural_Network.XML</DocumentationFile>
38+
<Prefer32Bit>true</Prefer32Bit>
39+
</PropertyGroup>
40+
<ItemGroup>
41+
<Reference Include="mscorlib" />
42+
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
43+
<Private>True</Private>
44+
</Reference>
45+
<Reference Include="System" />
46+
<Reference Include="System.Core" />
47+
<Reference Include="System.Numerics" />
48+
</ItemGroup>
49+
<ItemGroup>
50+
<None Include="App.config" />
51+
<Compile Include="TrainingInfo.fs" />
52+
<Compile Include="Sample.fs" />
53+
<Compile Include="Activation.fs" />
54+
<Compile Include="Neuron.fs" />
55+
<Compile Include="Layer.fs" />
56+
<Compile Include="Network.fs" />
57+
<Compile Include="Trainer.fs" />
58+
<Compile Include="LogicGateCases.fs" />
59+
<Compile Include="LogicGates.fs" />
60+
<Compile Include="MnistSamples.fs" />
61+
<Compile Include="Mnist.fs" />
62+
<Compile Include="Program.fs" />
63+
</ItemGroup>
64+
<PropertyGroup>
65+
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion>
66+
</PropertyGroup>
67+
<Choose>
68+
<When Condition="'$(VisualStudioVersion)' == '11.0'">
69+
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')">
70+
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
71+
</PropertyGroup>
72+
</When>
73+
<Otherwise>
74+
<PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')">
75+
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
76+
</PropertyGroup>
77+
</Otherwise>
78+
</Choose>
79+
<Import Project="$(FSharpTargetsPath)" />
80+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
81+
Other similar extension points exist, see Microsoft.Common.targets.
82+
<Target Name="BeforeBuild">
83+
</Target>
84+
<Target Name="AfterBuild">
85+
</Target>
86+
-->
87+
</Project>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2013
4+
VisualStudioVersion = 12.0.31101.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp-Neural-Network", "FSharp-Neural-Network.fsproj", "{188B56B9-EE84-44A6-B8BC-34D743D4BE3F}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{188B56B9-EE84-44A6-B8BC-34D743D4BE3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{188B56B9-EE84-44A6-B8BC-34D743D4BE3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{188B56B9-EE84-44A6-B8BC-34D743D4BE3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{188B56B9-EE84-44A6-B8BC-34D743D4BE3F}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal

0 commit comments

Comments
 (0)