https://github.com/ymtoo/nnutils.jl
https://github.com/ymtoo/nnutils.jl
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/ymtoo/nnutils.jl
- Owner: ymtoo
- Created: 2021-04-15T08:48:22.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-08-07T09:26:35.000Z (almost 4 years ago)
- Last Synced: 2025-01-26T02:44:39.570Z (over 1 year ago)
- Language: Julia
- Size: 40 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NNUtils
This package provides neural net utilities:
- standard networks
- [x] mobilenets
- [ ] resnet
- neural network blocks
- [x] DepthwiseSeparableConv
- [x] BottleneckResidual
- [x] ResnetResidualv1
- [x] ResnetResidualv2
- neural network layers
- [x] Sinc Conv
- saliency maps
- [x] Gradient
- [x] SmoothGradient
based on [Flux.jl](https://github.com/FluxML/Flux.jl).
## Installation
```julia
using Pkg; pkg"add https://github.com/ymtoo/NNUtils.jl.git"
```
## Usage
### SincConv
```julia-repl
julia> using Flux, NNUtils
julia> fs = 9600f0
9600.0f0
julia> model = SincConv(fs, (200, 1), 1=>8, identity)
SincConv(9600.0, (200, 1), 1=>8)
julia> params(model) |> length
2
julia> params(model)[1] |> size
(1, 8)
julia> params(model)[2] |> size
(1, 8)
julia> x = randn(Float32, 4800, 1, 1, 16)
4800×1×1×16 Array{Float32, 4}:
[:, :, 1, 1] =
1.3832613
0.42255098
⋮
0.3134887
[:, :, 1, 2] =
2.0712132
0.13467419
⋮
julia> model(x)
4601×1×8×16 Array{Float32, 4}:
[:, :, 1, 1] =
-3498.0605
-17983.041
20055.25
-1296.112
⋮
1844.9044
10672.3125
-12256.136
[:, :, 2, 1] =
521.0923
8794.186
4179.6655
-4084.1067
⋮
```