ngphuoc
ngphuoc
This supports multiple GPUs training by automatically splitting data along the batch dimension and sending the splits to multiple GPUs in the forward pass. In the backward pass, gradients from...
The Base.Threads.@spawn macro is introduced in julia 1.3 to support [multithreading](https://julialang.org/blog/2019/07/multithreading). Will Knet support this in the near future? ```julia using Knet import Base.Threads.@spawn x = KnetArray(randn(3,3)) xs = fill(x,...
I implemented a naive layer normalization with "manual" LSTM and it run extremely slow, 10 times slower than using the cudnn `RNN` interface (no layer normalization feature). Could we implement...
I intended to use this feature when translating code from pytorch and realized that Knet hasn't got it. "The padding argument effectively adds dilation * (kernel_size - 1) - padding...
I would like to experiment with writing a kernel for KnetArray. I am trying to create an identity matrix. The code is as follows ([link](https://stackoverflow.com/questions/15997888/creating-identity-matrix-with-cuda)): ```C __global__ void initIdentityGPU(int **devMatrix,...
This is for Spatial Transformer Network. references: https://arxiv.org/abs/1506.02025 https://docs.nvidia.com/deeplearning/sdk/cudnn-developer-guide/index.html#cudnnSpatialTfGridGeneratorBackward https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/cudnn/GridSampler.cpp
```julia using AutoGrad, Knet u = [rand(2,3), rand(2)] v = [rand(1,2), rand(1)] m = Dict(:u=>u, :v=>v) x,y = rand(3,4),rand(1,4) pred(m,x) = foldl((x,w)->w[1]*x .+ w[2], x, [m[:u],m[:v]]) loss(m,x,y) = mean(abs2, pred(m,x)-y)...
I modified the housing example to use CuArray as shown below. The forward pass is OK but in the backward pass it causes `ERROR: MethodError: no method matching next(::AutoGrad.Rec{CuArray{Float32,2}}, ::Tuple{Base.OneTo{Int64},Int64})...
It would be helpful to have an option to allow this type of indentation. For example: ```julia a_quite_long_function_definition(with, a, number, of, variables) = condition_1 ? value_1 : condition_2 ? value_2...
```julia julia> ex = :(f(x,y) = x+y) |> striplines; julia> for i=1:10 global ex = @> ex longdef shortdef end julia> ex :(f(x, y) = begin begin begin begin begin...