[<ShapeCheck>]
type NeuralStyles(C: Int, H: Int, W: Int) =
inherit Model()
let instance_norm (channels: Int, h, w) =
model {
let! shift = Weight.uniform (Shape [| channels; h; w |], 0.0)
and! scale = Weight.uniform (Shape [| channels; h; w |], 1.0)
return (fun input ->
This file contains hidden or 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
namespace System | |
open System | |
///<summary>Represents a character as a UTF-16 code unit.</summary> | |
type Char = | |
///<summary>Converts the specified Unicode code point into a UTF-16 encoded string.</summary> | |
///<param name="utf32">A 21-bit Unicode code point.</param> |
This file contains hidden or 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
namespace FSComp | |
type internal SR = | |
class | |
private new : unit -> SR | |
static member | |
ArgumentsInSigAndImplMismatch : a0:System.String * a1:System.String -> | |
int * string | |
static member | |
CallerMemberNameIsOverriden : a0:System.String -> int * string | |
static member |
This file contains hidden or 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
open System | |
type T() = | |
member this.Item | |
with get ([<ParamArray>] indices: int[]) = "_" | |
and set ([<ParamArray>] indices: int[]) (value: string) = () | |
let t = T() | |
// Works correctly | |
printfn "%A" t.[2, 1, 0] |
Some examples related to my tweet rant https://twitter.com/dsymetweets/status/1294276915260522496
In project programming this hit me this week with a bug:
This file contains hidden or 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
class='parameter'>recordType</span></dt><dd><p>The type of record to construct.</p></dd><dt><span class='parameter'>bindingFlags</span></dt><dd><p>Optional binding flags.</p></dd></dl><p class='returns'><p>Returns: A function to construct records of the given type.</p><table class='inner-list exception-list'><tr><td><a href=\"https://docs.microsoft.com/dotnet/api/system.argumentexception\">ArgumentException</a></td><td>Thrown when the input type is not a record type.</td></tr></table>" | |
}, | |
{ | |
"uri": "https://fsharp.github.io/fsharp-core-api-docs/reference/fsharp-reflection-fsharpvalue.html#PreComputeRecordConstructorInfo", | |
"title": "FSharpValue.PreComputeRecordConstructorInfo", | |
"content": "FSharpValue.PreComputeRecordConstructorInfo \nPreComputeRecordConstructorInfo \n<p class='summary'>Get a ConstructorInfo for a record type</p><dl><dt><span class='parameter'>recordType</span></dt><dd><p>The record type.</p></dd><dt><span class='parameter'>bindingFlags</span></dt><dd><p>Optional |
This file contains hidden or 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
Topics | |
1. tokenization | |
2. parsing | |
3. checking and elaboration (i.e. producing TypedTree) | |
- $" " plain | |
- $"..." as FormattableString |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
TryDownloadDotnetFrameworkSdk -- Test-IsAdmin = 'True' | |
pre-dl snPathX86Exists : True - 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\sn.exe' | |
set WindowsSDK_ExecutablePath_x86=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools | |
set WindowsSDK_ExecutablePath_x64=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64 | |
VisualFSharp.sln: | |
Build started 23/07/2020 16:13:52. | |
1>Project "C:\Users\dsyme\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.20364.3\tools\Build.proj" on node 1 (default targets). | |
1>Project "C:\Users\dsyme\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.20364.3\tools\Build.proj" (1) is building "C:\Users\dsyme\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.20364.3\tools\Tools.proj" (2) on node 1 (Restore target(s)). | |
2>_GetAllRestoreProjectPathItems: | |
Determining projects to restore... |