A neural network library built on top of TensorFlow for quickly building deep learning models.
Project description
A neural network library built on top of TensorFlow for quickly building deep learning models.
Installation
pip install nn
Example
import nn
# Create the model
@nn.model
def model(inputs):
# Define the network architecture (layers, number of units, activations)
hidden = nn.Dense(units=64, activation='relu')(inputs)
outputs = nn.Dense(units=10)(hidden)
# Configure the learning process (loss, optimizer, evaluation metrics)
return dict(outputs=outputs,
loss='softmax_cross_entropy',
optimizer=('GradientDescent', 0.001),
metrics=['accuracy'])
# Train the model using training data:
model.train(x_train, y_train, epochs=30, batch_size=128)
# Evaluate the model performance on test or validation data:
loss_and_metrics = model.evaluate(x_test, y_test)
# Use the model to make predictions for new data:
predictions = model.predict(x)
Documentation
See documentation.
License
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
nn-0.0.5.tar.gz
(5.9 kB
view details)
File details
Details for the file nn-0.0.5.tar.gz
.
File metadata
- Download URL: nn-0.0.5.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d527b020a92cd5f98ceb13e0883df5a66be56b63c268af1eab6ab789071c45a |
|
MD5 | bbfb0cc3d65a9e7693a6a20f1dfc25f8 |
|
BLAKE2b-256 | 483c69a5af7df847f13bb603ee53e409cf2752ef09bbf4ce2bc375e84734b447 |