Skip to main content

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

# 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)

Documentation

See documentation.

License

MIT

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.4.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file nn-0.0.4.tar.gz.

File metadata

  • Download URL: nn-0.0.4.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nn-0.0.4.tar.gz
Algorithm Hash digest
SHA256 f5d4323349c332535677317586821beff6f1fa89ecbd92198735e480462af766
MD5 d56682681b5170691e2f7b7e6bf79379
BLAKE2b-256 8a85e4799e7384316bd700e2148ed79c931eaada7b25ffd2b2aff21a297275f8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page