Windows Service with Python 3.5 and pyinstaller
- Python 3.5.x
- Visual C++ Build Tools 2015
- PyInstaller 3.2
| """ | |
| Create train, valid, test iterators for CIFAR-10 [1]. | |
| Easily extended to MNIST, CIFAR-100 and Imagenet. | |
| [1]: https://discuss.pytorch.org/t/feedback-on-pytorch-for-kaggle-competitions/2252/4 | |
| """ | |
| import torch | |
| import numpy as np |
| class SyncAsyncDecoratorFactory: | |
| """ | |
| Factory creates decorator which can wrap either a coroutine or function. | |
| To return something from wrapper use self._return | |
| If you need to modify args or kwargs, you can yield them from wrapper | |
| """ | |
| def __new__(cls, *args, **kwargs): | |
| instance = super().__new__(cls) | |
| # This is for using decorator without parameters | |
| if len(args) == 1 and not kwargs and (inspect.iscoroutinefunction(args[0]) or inspect.isfunction(args[0])): |
| import torch | |
| import torch.nn as nn | |
| import numpy as np | |
| import torch.optim as optim | |
| from torch.autograd import Variable | |
| # (1, 0) => target labels 0+2 | |
| # (0, 1) => target labels 1 | |
| # (1, 1) => target labels 3 | |
| train = [] |
Windows Service with Python 3.5 and pyinstaller
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
GNU Octave is a high-level interpreted language, primarily intended for numerical computations.
(via GNU Octave)
Hint: I also mad an octave docset for Dash: https://github.com/obstschale/octave-docset