Datasets:
Download BIN_BUCKET/engine.py from ysn-rfd/text-dataset-tiny-code-script-py-format: direct link, hf CLI and curl.
- Browser
- Download file 811 Bytes
-
https://huggingface.co/datasets/ysn-rfd/text-dataset-tiny-code-script-py-format/resolve/c0d79f54bdb8bdc19d0b40b05bdbcd4d8a23e5ef/BIN_BUCKET/engine.py
- Command line
-
hf download hf://datasets/ysn-rfd/text-dataset-tiny-code-script-py-format@c0d79f54bdb8bdc19d0b40b05bdbcd4d8a23e5ef/BIN_BUCKET/engine.py
-
curl -L -o engine.py https://huggingface.co/datasets/ysn-rfd/text-dataset-tiny-code-script-py-format/resolve/c0d79f54bdb8bdc19d0b40b05bdbcd4d8a23e5ef/BIN_BUCKET/engine.py
811 Bytes
| """ | |
| ENGINE | |
| ===== | |
| Neural Network NN or (nn) engine, tensor calc neural network | |
| Engine NN | |
| ==== | |
| """ | |
| class nn(): | |
| def nnp(self, x, y, z, n_layer): | |
| #--------------------- | |
| x = x | |
| y = y | |
| z = z | |
| n_layer = n_layer | |
| #----------------------- | |
| if x == 0: | |
| x = 1 | |
| else: | |
| pass | |
| if y == 0: | |
| y = 1 | |
| else: | |
| pass | |
| if z == 0: | |
| z = 1 | |
| else: | |
| pass | |
| if n_layer == 0: | |
| print('L_ERR, Set To 1') | |
| n_layer = 1 | |
| else: | |
| pass | |
| #---------------------- | |
| dim = x*y*z | |
| g_layer = dim*n_layer | |
| #---------------------- | |
| return g_layer | |