https://github.com/dpasca/dpasca-pytorch-examples
Random testbed/scratchpad for simple experiments with LibTorch
https://github.com/dpasca/dpasca-pytorch-examples
Last synced: about 14 hours ago
JSON representation
Random testbed/scratchpad for simple experiments with LibTorch
- Host: GitHub
- URL: https://github.com/dpasca/dpasca-pytorch-examples
- Owner: dpasca
- License: mit
- Created: 2023-07-23T13:28:10.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-08-09T08:18:37.000Z (almost 3 years ago)
- Last Synced: 2023-08-09T09:50:44.994Z (almost 3 years ago)
- Language: Jupyter Notebook
- Size: 2.64 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dpasca-pytorch-examples
## Overview
This is just a random testbed/scratchpad for simple experiments with LibTorch and PyTorch.
## Setup (C++)
It's regularly only tested on macOS, but it should work on Linux and probably Windows.
Get LibTorch [here](https://pytorch.org/get-started/locally/). Select `LibTorch` or `Source` if you want to build from source.
The CMake build is currently looking for `../libtorch` or `../pytorch-install` (relative to the root of this repo). Change as necessary.
## Build and Run (C++)
```bash
./build.sh
./_build/example*
```
## "screenshots"
```
1.1100000 |
1.0000000 | ***** ***** ****
0.8900000 |* * * * * ** *
0.7800000 | * * * * * * *
0.6700000 | * * * * * *
0.5600000 | * * * * *
0.4500000 | * * * * * *
0.3400000 | * * * * * * *
0.2300000 | * * * * *
0.1200000 | * ** ** ** ** **
0.0100000 | ** ** *
-0.1000000 |--------------------------------------------------------------------------
## Test Predictions
1.0916607 |
0.9902501 | **** **** *****
0.8888394 |** * * ** * * *
0.7874287 | * * * *
0.6860180 | * * * * *
0.5846074 | * * * * * * *
0.4831967 | * * * * *
0.3817860 | * * * *
0.2803754 | ** * * ** * * *
0.1789647 | ** *** *** ** ** **
0.0775540 | * * **
-0.0238566 |--------------------------------------------------------------------------
## Train Loss
0.3133923 |
0.2825171 |
0.2516420 |
0.2207669 |
0.1898918 |*
0.1590166 |
0.1281415 | *
0.0972664 | *
0.0663913 | * *** ***
0.0355161 | *** ** * ************************** ******************************
0.0046410 | **
-0.0262341 |--------------------------------------------------------------------------
## Test Loss
0.1901521 |
0.1715822 |
0.1530123 |*
0.1344424 | *
0.1158725 |
0.0973026 | *
0.0787328 | *
0.0601629 | ** ** * *
0.0415930 | * ** * *** ******* * ** *** **** * * * *
0.0230231 | * *** * *** * * **** * * ****** *************
0.0044532 | *
-0.0141167 |--------------------------------------------------------------------------
Epoch [2120/10000], Train Loss: 0.0184644, Test Loss: 0.013449
```