Skip to content

Commit

Permalink
Prepare for initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Mar 22, 2022
1 parent 8e1cff4 commit 1fed731
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 3 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- 1.7
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
with:
coverage: false
7 changes: 6 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ExplicitFluxLayers"
uuid = "aafdbc67-5cd5-409a-82a0-ebc47ac8091e"
authors = ["Avik Pal <avikpal@iitk.ac.in> and contributors"]
authors = ["Avik Pal <avikpal@mit.edu> and contributors"]
version = "0.1.0"

[deps]
Expand All @@ -13,6 +13,11 @@ Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
CUDA = "3"
ChainRulesCore = "1"
Flux = "0.12"
NNlib = "0.8"
Setfield = "0.8"
julia = "1"

[extras]
Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ExplicitFluxLayers

Flux by default relies on storing parameters and states in its model structs. `AbstractExplicitLayers` is an initial prototype
Flux by default relies on storing parameters and states in its model structs. `ExplicitFluxLayers` is an initial prototype
to make Flux explicit-parameter first.

An `AbstractExplicitLayer` is simply the minimal set of fixed attributes required to define a layer, i.e. an `AbstractExplicitLayer` is
Expand Down Expand Up @@ -34,6 +34,12 @@ None of these attributes of BatchNorm change over time. Next each layer needs to
Additionally each AbstractExplicitLayer must return a Tuple of length 2 with the first element being the computed result and the
second element being the new state.

## Installation

```julia
] add ExplicitFluxLayers
```

## Usage

```julia
Expand Down Expand Up @@ -83,7 +89,7 @@ ps, st = ExplicitFluxLayers.setup(MersenneTwister(0), model)
ExplicitFluxLayers.apply(model, x, ps, st)
```

## Currently Implemented Explicit Layers (none of these are exported)
## Implemented Layers

These layers have the same API as their Flux counterparts.

Expand All @@ -95,3 +101,10 @@ These layers have the same API as their Flux counterparts.
* `Parallel`
* `SkipConnection`
* `MaxPool`, `MeanPool`
* `ReshapeLayer`, `SelectDim`, `FlattenLayer`, `NoOpLayer`, `WrappedFunction`

## TODOs

- [ ] Support Recurrent Neural Networks
- [ ] Add wider support for Flux Layers
- [ ] Port tests over from Flux

2 comments on commit 1fed731

@avik-pal
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/57154

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.0 -m "<description of version>" 1fed7317f5e80dd1a7c19eed23c8bd51d164b6e7
git push origin v0.1.0

Please sign in to comment.