Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/identxxy/tinn
Taichi implementation of tiny-cuda-nn
https://github.com/identxxy/tinn
Last synced: about 2 months ago
JSON representation
Taichi implementation of tiny-cuda-nn
- Host: GitHub
- URL: https://github.com/identxxy/tinn
- Owner: identxxy
- Created: 2022-11-28T13:19:20.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T23:19:38.000Z (about 2 years ago)
- Last Synced: 2024-07-08T11:33:00.219Z (6 months ago)
- Language: Python
- Size: 2.53 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
- awesome-taichi - tinn - A Taichi implementation of the tiny-cuda-nn. (Applications / **Machine Learning**)
README
# tinn
A library to create a large number of micro-scale neural networks using [Taichi](https://docs.taichi-lang.org/) language.
Framework is inspired by [tiny-cuda-nn](https://github.com/NVlabs/tiny-cuda-nn).
## Feature
The **parrallelization** is among **all the networks**, rather than the matrix computation inside one NN, between layers.
All the matrix computation between nerual network layers are **unrolled** by Taichi at compile time, executing in all parrallel threads,
which means the maxtrix size cannot be too large.
When the matrix size exceed 32, e.g. for a 6-input 6-output layer, which means 36 matrix elements (>32), Taichi will give out a compile warning.## Demo
Network config is located at `data/*.json`
### MLP learn an image
```
python mlp_learn_an_image.py
```For simplication, settings are located at the head of `mlp_learn_an_image.py`.
#### Control
|key/mouse| visualied field | description |
|-|-|-|
`` | - |train all NN |
click LMB | - | train the NN at cursor postion|
`t` | train_batch | random xy coord [0, 1)|
`i` | inference_batch | meshgrid xy coord [0, 1) |
`g` | train_target | sampled pixel from reference |
`r` | reference_img | ground truth GT|
`l` | inference_loss | inference loss to GT |
`p` | - | print profiler info |
||||