# 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
```python
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
```python
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).**
Raw data
{
"_id": null,
"home_page": "https://github.com/Shivam-21-11/Tf-Model-Packages",
"name": "TensorPG",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "Machine Learning,Computer Vision,Generative adversarial networks,Deep Learning,Transformer,NLP",
"author": "Shivam Singh",
"author_email": "Shivamsingh2111@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/2a/bc/220ac10b2866ce196093f809272adb1692a86132849470ce1e099d60fc6a/TensorPG-0.0.3.tar.gz",
"platform": null,
"description": "# Tensorflow Model Playground\r\n\r\n- Different tensorflow Deep Learning model & Helper Function.\r\n- Currently Included Generative Adversarial Networks , some helper function and Transformer.\r\n\r\n## Usage Example\r\n### Generative Adversarial Networks\r\n* Simple CycleGAN\r\n\r\n```python\r\nfrom modelpg.GAN import build_generator , build_descriminator , composite_model,train_model\r\ngenerator_1 = build_generator(image_shape=(256,256))\r\ngenerator_2 = build_generator(image_shape=(256,256))\r\n\r\ndescriminator_1 = build_descriminator(image_shape=(256,256))\r\ndescriminator_2 = build_descriminator(image_shape=(256,256))\r\n\r\ncomposite_1 = composite_model(generator_1,descriminator_1,generator_2,image_shape=(256,256))\r\ncomposite_2 = composite_model(generator_2,descriminator_2,generator_1,image_shape=(256,256))\r\n\r\ntrain_model(descriminator_1,descriminator_2,generator_1,generator_2,composite_1,composite_2,dataset,epochs=100)\r\n```\r\n\r\n- After training use each generator to generate images.\r\n\r\n\r\n### Transformer\r\n```python\r\nfrom modelpg.Transformer import Transformer\r\nnum_layers = 4\r\nd_model = 512\r\ndff = 4\r\nnum_heads = 8\r\ndropout_rate = 0.5\r\ntf = Transformer(num_layers=num_layers,\r\n num_heads=num_heads,\r\n d_model = d_model,\r\n forward_expansion=dff,\r\n inpt_vocab_size=2000,\r\n tar_vocab_size=2000,\r\n dropout=dropout_rate)\r\n```\r\nTrain this transformer using custom training loop or by `.fit()` method.\r\n**Note : `.fit` would take ((query , key),value) as parameter here X = (query,key) & Y = (value).**\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Various Deep Learning Models (tensorflow)",
"version": "0.0.3",
"split_keywords": [
"machine learning",
"computer vision",
"generative adversarial networks",
"deep learning",
"transformer",
"nlp"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "97b087d1cd5c2b9fdb24ecfbb2cd276860b2f5625c2d22fe4ac75bdeaa7c4a23",
"md5": "bc993bf01c09e15d7d8543655f72691f",
"sha256": "aea31553a10f4d2a926edd3451854d12e2dd52f3b4c903bf192303f3686bbfc8"
},
"downloads": -1,
"filename": "TensorPG-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bc993bf01c09e15d7d8543655f72691f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9092,
"upload_time": "2023-02-11T06:13:28",
"upload_time_iso_8601": "2023-02-11T06:13:28.983959Z",
"url": "https://files.pythonhosted.org/packages/97/b0/87d1cd5c2b9fdb24ecfbb2cd276860b2f5625c2d22fe4ac75bdeaa7c4a23/TensorPG-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2abc220ac10b2866ce196093f809272adb1692a86132849470ce1e099d60fc6a",
"md5": "7782e945973b97bdd02b2d568647edad",
"sha256": "12a87d6098be7d13cdbbe4dbde72e3b45171c3e6fc24068fd47eb764e9f763ad"
},
"downloads": -1,
"filename": "TensorPG-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "7782e945973b97bdd02b2d568647edad",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7987,
"upload_time": "2023-02-11T06:13:30",
"upload_time_iso_8601": "2023-02-11T06:13:30.848935Z",
"url": "https://files.pythonhosted.org/packages/2a/bc/220ac10b2866ce196093f809272adb1692a86132849470ce1e099d60fc6a/TensorPG-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-02-11 06:13:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "Shivam-21-11",
"github_project": "Tf-Model-Packages",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "tensorpg"
}