Neural Filter
Functions
neuralfilter.generate(x, force=False)
- x: Array with resolution $(H, W, C)$
The dimension $C$ is recommended as 1. - force: If you want to force this operation when the dimension $C$ is higher than 1, set 'force' as True.
neuralfilter.batch_generate(x, force=False)
- The batch processing mode of 'generate'.
- x: Array with resolution $(N, H, W, C)$
The dimension $C$ is recommended as 1. - force: If you want to force this operation when the dimension $C$ is higher than 1, set 'force' as True.
batch_generate(x, force=False)
Usage
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
import neuralfilter
(x_tr, y_tr), (x_te, y_te) = tf.keras.datasets.mnist.load_data()
idx = 1
a = neuralfilter.generate(np.expand_dims(x_tr[idx], axis=-1))
plt.figure(figsize=(9, 3), dpi=100)
plt.subplot(1, 3, 1)
plt.imshow(x_tr[idx], cmap='gray')
plt.xticks([], [])
plt.yticks([], [])
plt.subplot(1, 3, 2)
plt.imshow(a, cmap='jet')
plt.xticks([], [])
plt.yticks([], [])
plt.subplot(1, 3, 3)
plt.imshow(x_tr[idx], cmap='gray')
plt.imshow(a, cmap='jet', alpha=0.5)
plt.xticks([], [])
plt.yticks([], [])
plt.tight_layout()
plt.savefig('sample.png')
plt.show()
Release files for neuralfilter 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| neuralfilter-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Release files / neuralfilter-0.1.9-py3-none-any.whl
| Download URL | neuralfilter-0.1.9-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c2a1b58959ec6944024bafb633382032001a69b0455aefc8ab30022267741ae
|
|
BLAKE2b-256 checksum How to use checksums |
3b6c9ce607d0e0d4fa7c7977527d572192c2c47798ef75a4f0bd94bdbf7c0f4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.12
|