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 tensorflow
and run:
pip install nn
It is recommended to use a virtual environment.
Getting Started
import nn
# Define the network (layers, number of units, activations) as a function:
def network(inputs):
hidden = nn.Dense(units=64, activation='relu')(inputs)
outputs = nn.Dense(units=10)(hidden)
return outputs
# Create a model by configuring its learning process (loss, optimizer, evaluation metrics):
model = nn.Model(network,
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)
# or call the model directly
predictions = model(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.3.tar.gz
(3.4 kB
view details)
File details
Details for the file nn-0.0.3.tar.gz
.
File metadata
- Download URL: nn-0.0.3.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59ab2643c3ab6c783ae27260cc2f22ffa54c81537f3a8ce68d3aaa29abb6c1e6 |
|
MD5 | 409bef6e2f2e6cefef6537337d7e84fd |
|
BLAKE2b-256 | 1d4366b683f66df1147edbba049ec987ca0653aa0b7850c29ff0030c71ec45bd |