Skip to main content

Various Deep Learning Models (tensorflow)

Project description

Tensorflow Model Playground

  • Different tensorflow Deep Learning model & Helper Function.
  • Currently Included Generative Adversarial Networks , some helper function and Transformer.

Usage Example

Generative Adversarial Networks

  • Simple CycleGAN
from modelpg.GAN import build_generator , build_descriminator , composite_model,train_model
generator_1 = build_generator(image_shape=(256,256))
generator_2 = build_generator(image_shape=(256,256))

descriminator_1 = build_descriminator(image_shape=(256,256))
descriminator_2 = build_descriminator(image_shape=(256,256))

composite_1 = composite_model(generator_1,descriminator_1,generator_2,image_shape=(256,256))
composite_2 = composite_model(generator_2,descriminator_2,generator_1,image_shape=(256,256))

train_model(descriminator_1,descriminator_2,generator_1,generator_2,composite_1,composite_2,dataset,epochs=100)
  • After training use each generator to generate images.

Transformer

from modelpg.Transformer import Transformer
num_layers = 4
d_model = 512
dff = 4
num_heads = 8
dropout_rate = 0.5
tf = Transformer(num_layers=num_layers,
                num_heads=num_heads,
                d_model = d_model,
                forward_expansion=dff,
                inpt_vocab_size=2000,
                tar_vocab_size=2000,
                dropout=dropout_rate)

Train this transformer using custom training loop or by .fit() method. Note : .fit would take ((query , key),value) as parameter here X = (query,key) & Y = (value).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TensorPG-0.0.3.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

TensorPG-0.0.3-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file TensorPG-0.0.3.tar.gz.

File metadata

  • Download URL: TensorPG-0.0.3.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for TensorPG-0.0.3.tar.gz
Algorithm Hash digest
SHA256 12a87d6098be7d13cdbbe4dbde72e3b45171c3e6fc24068fd47eb764e9f763ad
MD5 7782e945973b97bdd02b2d568647edad
BLAKE2b-256 2abc220ac10b2866ce196093f809272adb1692a86132849470ce1e099d60fc6a

See more details on using hashes here.

File details

Details for the file TensorPG-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: TensorPG-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for TensorPG-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 aea31553a10f4d2a926edd3451854d12e2dd52f3b4c903bf192303f3686bbfc8
MD5 bc993bf01c09e15d7d8543655f72691f
BLAKE2b-256 97b087d1cd5c2b9fdb24ecfbb2cd276860b2f5625c2d22fe4ac75bdeaa7c4a23

See more details on using hashes here.

Supported by

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