Skip to content

Instantly share code, notes, and snippets.

@GreenEric
GreenEric / flux_vae.jl
Created June 5, 2021 23:58 — forked from Alexander-Barth/flux_vae.jl
convolutional varitional autoencoder in Flux.jl
# adapted from
# Keras_code_sample_for_Google_IO_2021
# Modern Keras design patterns | Session
# https://www.youtube.com/watch?v=FCz9m4T0DI0
# code: https://goo.gle/3t0rSpo
# by Martin Gorner, François Chollet
using Flux
using MLDatasets
using Random
@GreenEric
GreenEric / Learn-Julia-zh-cn.jl
Created September 22, 2020 02:48 — forked from inkydragon/Learn-Julia-zh-cn.jl
Learn Julia in Y minutes 社区翻译版。讨论帖:http://discourse.juliacn.com/t/topic/611
# 单行注释由「#」号开始
#= 以「#=」开头,用「=#」结尾就可以得到多行注释
多行注释可以嵌套。
=#
# VSC 代码高亮 patch'
####################################################
## 1. 原始类型与操作符
####################################################
@GreenEric
GreenEric / eigenvectors_from_eigenvaluies.R
Created November 17, 2019 02:40 — forked from suensummit/eigenvectors_from_eigenvaluies.R
A demo R script of [the paper EIGENVECTORS FROM EIGENVALUES](https://arxiv.org/pdf/1908.03795.pdf), modified from [Yu-Chen Shu](https://www.facebook.com/yuchen.shu/posts/10157876738839228) rewritten in R.
# Generate random matrix with dim = N
N <- 3
A <- matrix(runif(N*N), N, N, byrow=TRUE)
A <- A+t(A)
# Setting up eigenvalues lambda, true eigenvector V and derived eigenvector U
ev <- eigen(A)
(lambda <- ev$values)
(V <- ev$vectors)
U <- matrix(0L, N, N)