https://github.com/rodrigogiraoserrao/annapl
Artificial Neural Networks framework written in APL.
https://github.com/rodrigogiraoserrao/annapl
ai apl artificial-intelligence framework machine-learning ml neural-network neural-networks
Last synced: about 2 months ago
JSON representation
Artificial Neural Networks framework written in APL.
- Host: GitHub
- URL: https://github.com/rodrigogiraoserrao/annapl
- Owner: rodrigogiraoserrao
- License: apache-2.0
- Created: 2021-01-13T12:33:42.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-08T10:39:42.000Z (11 months ago)
- Last Synced: 2025-02-08T07:12:16.577Z (3 months ago)
- Topics: ai, apl, artificial-intelligence, framework, machine-learning, ml, neural-network, neural-networks
- Language: APL
- Homepage:
- Size: 12.8 MB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ANNAPL
Artificial Neural Networks in APL.
## How To Use
Clone this repository to a directory, say `c:\tmp`, then fire up your interpreter and create a link with the
folder as a namespace```
]create ANNAPL c:\tmp\ANNAPL
Linked: #.ANNAPL ←→ c:\tmp\ANNAPL
```After the link is successfully created, go ahead and run one of the examples:
```
ANNAPL.examples.corner ⍬
```## Examples
Take a look at the [examples](./examples) to see
how to use the networks.
In particular, the [corner.aplf](./examples/corner.aplf)
is a simple tradfn with a couple of lines exhibiting
how to do the simplest things.## Components Available
To build a neural network you will need:
- an array of layers;
- each of which needs an activation function; and
- a shape.
- a loss function; and
- a learning rate.Use `Layer` to build layers and `Net` to build a network.
Use `_FeedForward` to feed inputs to the network
and use `_Train` to train the network on inputs and
expected targets.### Activation Functions
Here are the activation functions implemented
in [`ActivationFns`](ActivationFns.apln):- `Id` – identity function
- `ReLU` – rectified linear unit
- `LeakyReLU` – leaky rectified linear unit (parametrised)
- `ELU` – exponential linear unit
- `Sigmoid`
- `Tanh` – Hyperbolic tangent
- `ArcTan` – Arc Tangent### Loss Functions
Here are the loss functions implemented
in [`LossFns`](LossFns.apln):- `BCELoss` – binary cross entropy loss
- `CrossEntropyLoss`
- `L1Loss`
- `MSELoss` – mean squared error loss