Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sharanry
sharanry / normalised_flows_demo.ipynb
Created July 20, 2019 20:55
Normalised Flows Demo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sharanry
sharanry / nf_abstractions.jl
Last active July 9, 2019 22:04
Norm Flows
using Flux, Flux.Tracker
using Flux.Tracker: grad, update!
using Distributions
using StatsFuns
using MLToolkit
using LinearAlgebra
using Random
abstract type Flow end
@sharanry
sharanry / dataset.png
Last active July 9, 2019 18:31
MLE Estimate of Planar Flows
dataset.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
using Flux, Flux.Tracker
using Flux.Tracker: grad, update!
using LinearAlgebra
using Distributions
function functional(i)
u, w, b = uₖ[i], wₖ[i],bₖ[i]
f(z) = z + u*tanh.(transpose(w)*z + b)
end
dtanh(z) = 1-tanh.(z).^2
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.