A python package for a Keras 3 implementation of the neural process family: Conditional Neural Process, (Latent) Neural Process and Attentive Neural Process.
Project description
keras-neuralprocesses
Neural Processes written in Keras.
Based on Keras 3 (using TF backend right now - plans to support PyTorch/Jax in the future).
Installation
To install from PyPi:
pip install keras_neural_processes
To install from GitHub:
pip install git+https://github.com/sidchaini/keras-neural-processes
Quickstart
import keras
import keras_neural_processes as knp
model = knp.CNP()
history = model.train(
X_train=X_train,
y_train=y_train,
epochs=epochs,
optimizer=keras.optimizers.Adam(learning_rate=1e-4),
batch_size=64,
num_context_range=[10,20],
num_context_mode='each',
dataset_type="gp",
X_val=X_test, y_val=y_test,
plotcb=True,
pbar=True,
plot_every=plot_every,
)```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keras_neural_processes-0.0.1.tar.gz.
File metadata
- Download URL: keras_neural_processes-0.0.1.tar.gz
- Upload date:
- Size: 50.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e43e9d80813bee9b5bba16a7b3ed91fdad32156254569462f3013959550e4ec
|
|
| MD5 |
4e32696925c045cf10f96b76b10f7f57
|
|
| BLAKE2b-256 |
ef036cc9f40bce52c775ed546d0e2d4e4e7ed04f6c9350ce5ec1acb6b19f4018
|
File details
Details for the file keras_neural_processes-0.0.1-py3-none-any.whl.
File metadata
- Download URL: keras_neural_processes-0.0.1-py3-none-any.whl
- Upload date:
- Size: 38.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c2085aa27d8258143f17b2c600557ecd0e7bfbda3633c2c4bf3db9056482a5e
|
|
| MD5 |
cfb0eae3e263111c7bb0b6c33ecf4bd2
|
|
| BLAKE2b-256 |
284b088845a4d45cf8e6852e576581862b1779f2e290430da322a8747f37bfe5
|