Skip to main content

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)

Table of built distributions (wheels) for neuralfilter 0.1.9
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.9 This release

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page