Skip to content

Instantly share code, notes, and snippets.

View gist:9f85390eb5984757bd425016a61de08c
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:1365
ERROR: Unsatisfiable requirements detected for package Polynomials [f27b6e38]:
Polynomials [f27b6e38] log:
├─possible versions are: [0.5.0-0.5.3, 0.6.0-0.6.1, 0.7.0] or uninstalled
├─restricted to versions 0.6 by an explicit requirement, leaving only versions 0.6.0-0.6.1
└─restricted by compatibility requirements with RecipesBase [3cdcf5f2] to versions: [0.5.0-0.5.3, 0.7.0] or uninstalled — no versions left
└─RecipesBase [3cdcf5f2] log:
├─possible versions are: [0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 1.0.0] or uninstalled
└─restricted to versions 1 by IntervalArithmetic [d1acc4aa], leaving only versions 1.0.0
└─IntervalArithmetic [d1acc4aa] log:
View def.md
View nnlib_currays.md
using CuArrays, NNlib, Test

ACTIVATION_FUNCTIONS = [σ, logσ, hardσ, hardtanh, relu, leakyrelu, relu6, rrelu, 
                          elu, gelu, celu, swish, lisht, selu, trelu, softplus, 
                          softsign, logcosh, mish, tanhshrink, softshrink];

x = randn(Float32, (5, 5))
for f in filter(x -> x != rrelu, ACTIVATION_FUNCTIONS)
    @testset "$(f)" begin
View Dockerfile
ARG CUDA=10.0
ARG UBUNTU_VERSION=18.04
FROM nvidia/cuda:${CUDA}-cudnn7-devel-ubuntu${UBUNTU_VERSION}
ENV JULIA_PATH=/usr/local/julia
ENV PATH=$JULIA_PATH/bin:$PATH
ENV JULIA_TAR_ARCH=x86_64
ENV JULIA_DIR_ARCH=x64
@matsueushi
matsueushi / bce.ipynb
Last active Jan 26, 2020
(logit)binarycrossentropy
View bce.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@matsueushi
matsueushi / adapt.jl
Last active Jan 9, 2020
gpu, similar, cpu, adapt
View adapt.jl
using Adapt
using CuArrays
using Flux
using InteractiveUtils
function f1(x)
fill(1f0, size(x)) |> gpu
end
function f2(x)
View rollingwindow.jl
function rolling(fun::Function, x::AbstractArray{T}, window::Int) where {T <: Real}
[fun(view(x, i:i + window - 1)) for i = 1:length(x) - window + 1]
end
println(rolling(sum, [1, 2, 3, 4, 5], 2)) # [3, 5, 7, 9]
println(rolling(sum, [1, 2, 3, 4, 5], 3)) # [6, 9, 12]
println(rolling(prod, [1, 2, 3, 4, 5], 3)) # [6, 24, 60]
@matsueushi
matsueushi / gaussianrandomwalk.jl
Created Apr 4, 2019
GaussianRandomWalk for Mamba
View gaussianrandomwalk.jl
# GaussianRandomWalk for Mamba
# \begin{align*}
# Y_0 &= D,\\
# Y_{i+1} &= Y_i+\mu_i+\epsilon_i,\ \epsilon_i \sim \mbox{Normal}(0, \sigma)\\
# \end{align*}
# Reference:
# Create User-Defined Multivariate Distribution
# https://mambajl.readthedocs.io/en/latest/mcmc/distributions.html#user-defined-univariate-distributions
You can’t perform that action at this time.