Skip to content

Commit

Permalink
Require DiffSharp 0.7.5 for better performance
Browse files Browse the repository at this point in the history
  • Loading branch information
gbaydin committed Dec 6, 2015
1 parent 825cbf2 commit a754513
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
7 changes: 4 additions & 3 deletions docs/input/Optimization.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ open RProvider
open RProvider.graphics
open RProvider.grDevices

// Create a new plot window
R.plot_new (namedParams [ ])

let t = trajectory (whist.[4].[0])
Expand Down Expand Up @@ -157,7 +156,7 @@ As another example, let's optimize the Beale function
$$$
f(\mathbf{x}) = (1.5 - x_1 + x_1 x_2)^2 + (2.25 - x_1 + x_1 x_2^2)^2 + (2.625 - x_1 + x_1 x_2^3)^2
starting from $\mathbf{x} = (1, 1.5)$, using RMSProp.
starting from $\mathbf{x} = (1, 1.5)$, using RMSProp. The optimum is at $(3, 0.5)$
*)

let beale (x:DV) = (1.5f - x.[0] + (x.[0] * x.[1])) ** 2.f
Expand Down Expand Up @@ -216,6 +215,8 @@ open RProvider
open RProvider.graphics
open RProvider.grDevices

R.plot_new (namedParams [ ])

let ll = lhist |> Array.map (float32>>float)

namedParams[
Expand Down Expand Up @@ -366,4 +367,4 @@ type GradientClipping =
(**
Finally, looking at the [API reference](reference/index.html) and the [source code](https://github.com/hypelib/Hype/blob/master/src/Hype/Optimize.fs) of the optimization module can give you a better idea of the optimization algorithms currently implemented.
*)
*)
6 changes: 3 additions & 3 deletions src/Hype/AssemblyInfo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ open System.Runtime.InteropServices
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [<assembly: AssemblyVersion("1.0.*")>]
[<assembly: AssemblyVersion("0.1.0")>]
[<assembly: AssemblyInformationalVersion("0.1.0")>]
[<assembly: AssemblyFileVersion("0.1.0.*")>]
[<assembly: AssemblyVersion("0.1.1")>]
[<assembly: AssemblyInformationalVersion("0.1.1")>]
[<assembly: AssemblyFileVersion("0.1.1.*")>]

do
()
7 changes: 4 additions & 3 deletions src/Hype/Hype.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@
</ItemGroup>
<ItemGroup>
<Reference Include="DiffSharp">
<HintPath>..\..\packages\DiffSharp.0.7.4\lib\net46\DiffSharp.dll</HintPath>
<HintPath>..\..\packages\DiffSharp.0.7.5\lib\net46\DiffSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="DiffSharp" />
<Reference Include="mscorlib" />
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
Expand All @@ -79,12 +80,12 @@
<Reference Include="System.Drawing" />
<Reference Include="System.Numerics" />
</ItemGroup>
<Import Project="..\..\packages\DiffSharp.0.7.4\build\DiffSharp.targets" Condition="Exists('..\..\packages\DiffSharp.0.7.4\build\DiffSharp.targets')" />
<Import Project="..\..\packages\DiffSharp.0.7.5\build\DiffSharp.targets" Condition="Exists('..\..\packages\DiffSharp.0.7.5\build\DiffSharp.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\DiffSharp.0.7.4\build\DiffSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\DiffSharp.0.7.4\build\DiffSharp.targets'))" />
<Error Condition="!Exists('..\..\packages\DiffSharp.0.7.5\build\DiffSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\DiffSharp.0.7.5\build\DiffSharp.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
2 changes: 1 addition & 1 deletion src/Hype/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DiffSharp" version="0.7.4" targetFramework="net46" />
<package id="DiffSharp" version="0.7.5" targetFramework="net46" />
<package id="DynamicInterop" version="0.7.4" targetFramework="net46" />
<package id="FSharp.Compiler.Service" version="0.0.90" targetFramework="net46" />
<package id="FSharp.Formatting" version="2.11.0" targetFramework="net46" />
Expand Down

0 comments on commit a754513

Please sign in to comment.