Skip to content

Instantly share code, notes, and snippets.

View gist:a3a0f573b7d6ebb1face0e7698fb9fb3
namespace FSComp
type internal SR =
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
View gist:93d07b2cecde3d7470c1a8628a06669b
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  ->
View gist:81a5f51ecc18261b226abad83e6a0ed7
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]
View gist:1b28a65cddf82aae10ac87eacf73943a
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=\"\">ArgumentException</a></td><td>Thrown when the input type is not a record type.</td></tr></table>"
"uri": "",
"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
View gist:dc86bf86de81b83b75557d4944db43c2
1. tokenization
2. parsing
3. checking and elaboration (i.e. producing TypedTree)
- $" " plain
- $"..." as FormattableString
View gist:b487c1aeccb7dab7ffa2e9fe7932f4eb


Fyro Models

An Fyro model is an F# definition of the form:

let model (param1, .... paramN) = <distribution-expression>
View gist:dc915304b432be45d4b5e23d9a64cecf
This file has been truncated, but you can view the full file.
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
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)).
View gist:19ffe7f268b39c34b927f2f06e936270
KernelBase.dll!00007ffc3943a308() Unknown
vcruntime140d.dll!00007ffbd2fdb1f0() Unknown
torch_cpu.dll!defaultErrorHandlerFunction(const char * msg, void * data) Line 27 C++
torch_cpu.dll!_THError(const char * file, const int line, const char * fmt, ...) Line 54 C++
[External Code]
torch_cpu.dll!c10::KernelFunction::callUnboxed<at::Tensor,at::Tensor const &,at::Tensor const &>(const c10::OperatorHandle & opHandle, const at::Tensor & <args_0>, const at::Tensor & <args_1>) Line 66 C++
torch_cpu.dll!c10::Dispatcher::callUnboxedWithDispatchKey<at::Tensor,at::Tensor const &,at::Tensor const &>(const c10::OperatorHandle & op, c10::DispatchKey dispatchKey, const at::Tensor & <args_0>, const at::Tensor & <args_1>) Line 221 C++
torch_cpu.dll!c10::Dispatcher::callUnboxed<at::Tensor,at::Tensor const &,at::Tensor const &>(const c10::OperatorHandle & op, const at::Tensor & <args_0>, const at::Tensor & <args_1>) Line 229 C++
torch_cpu.dll!c10::OperatorHandle::callUnboxed<at::Tensor,at::Tensor const &,at::T