{"id":21257608,"url":"https://github.com/johnolafenwa/torchfusion","last_synced_at":"2025-04-05T09:07:01.194Z","repository":{"id":62584973,"uuid":"136805886","full_name":"johnolafenwa/TorchFusion","owner":"johnolafenwa","description":"A modern deep learning framework built to accelerate research and development of AI systems","archived":false,"fork":false,"pushed_at":"2022-10-30T18:07:11.000Z","size":1094,"stargazers_count":258,"open_issues_count":2,"forks_count":43,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-29T08:07:00.797Z","etag":null,"topics":["convolutional-neural-networks","deep-learning","gan","machine-learning","neural-network","python","pytorch","visualization"],"latest_commit_sha":null,"homepage":"https://torchfusion.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnolafenwa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-10T12:12:36.000Z","updated_at":"2025-02-28T05:18:02.000Z","dependencies_parsed_at":"2022-11-03T21:47:10.717Z","dependency_job_id":null,"html_url":"https://github.com/johnolafenwa/TorchFusion","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnolafenwa%2FTorchFusion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnolafenwa%2FTorchFusion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnolafenwa%2FTorchFusion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnolafenwa%2FTorchFusion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnolafenwa","download_url":"https://codeload.github.com/johnolafenwa/TorchFusion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312077,"owners_count":20918344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["convolutional-neural-networks","deep-learning","gan","machine-learning","neural-network","python","pytorch","visualization"],"created_at":"2024-11-21T04:04:48.428Z","updated_at":"2025-04-05T09:07:01.164Z","avatar_url":"https://github.com/johnolafenwa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TorchFusion \n\nA modern deep learning framework built to accelerate research and development of AI systems.\n\nBased on PyTorch and fully compatible with pure PyTorch and other pytorch packages, \u003cb\u003eTorchFusion\u003c/b\u003e provides a comprehensive extensible training framework\nwith trainers that you can easily use to train, evaluate and run inference with your PyTorch models, A GAN framework that greatly simplifies the process of\nexperimenting with Generative Adversarial Networks [Goodfellow et al. 2014](https://arxiv.org/1406.2661), with concrete implementations of a number of GAN algorithms, and a number of high level network layers and utilities to help you be more productive in your work.\n\n\u003cp\u003eThe framework is highly extensible, so you can easily create your own custom trainers for specific purposes.\u003c/p\u003e\n\n# New in 2.0\n\n  * Improved Trainer Framework \n  * Support for multiple Inputs and Outputs\n  * New utilities for loading images, one-hot encoding and more.\n  * New Gan Framework with multiple layers of abstraction and implementation of \nHinge GANs, GANs with divergence loss, Wasserstein GANs and Relativistic GANs.\n  * New GAN Applications with support for spectral normalization, conditional batch normalization, self attention, projection gans and resnet generators and discriminators\n  * A wider range of Initializers\n  * Enhanced summary function that not only provides you details about number of parameters, layers, input and output sizes\n    but also provides the number of Flops(Multiply-Adds) for every Linear and Convolution layer in your network.\n    Now, you can know the exact computational cost of any CNN architecure with just a single function!!!\n  * Visdom and Tensorboard Support\n  * Live metrics and loss visualizations, with option to save them permanently\n  * Support for persisting logs permanently\n  * Easy to use callbacks\n\n\n\u003cb\u003eNote: This version of torchfusion is well tested and research-ready, the core framework is now complete, Future releases of TorchFusion will include more specialized functions that will cut across multiple domains of deep learning\n\u003c/b\u003e\n\nAn \u003cb\u003eAI Commons\u003c/b\u003e project [https://aicommons.science](https://aicommons.science)\nDeveloped and Maintained by [John Olafenwa](https://twitter.com/johnolafenwa) and [Moses Olafenwa](https://twitter.com/OlafenwaMoses), brothers, creators of [ImageAI](https://github.com/OlafenwaMoses/ImageAI ), Authors of [Introduction to Deep Computer Vision](https://john.specpal.science/deepvision) and Co-Founders of [AICommons Global Limited](https://aicommons.science)\n\n# Tutorials and Documentation\nVisit [torchfusion.readthedocs.io](https://torchfusion.readthedocs.io) for comprehensive tutorials and examples on how to use Torchfusion\n\n\u003chr\u003e\n\n# Installing TorchFusion\n\u003cpre\u003e pip3 install --upgrade torchfusion \u003c/pre\u003e\n\n\n# Installing Pytorch\nVisit [Pytorch.org](https://pytorch.org) for instructions on installing pytorch.\n\n\u003cbr\u003e\u003cbr\u003e\n\u003ch1\u003eMNIST in Five Minutes\u003c/h1\u003e\n\n\u003cpre\u003e\nfrom torchfusion.layers import *\nfrom torchfusion.datasets import *\nfrom torchfusion.metrics import *\nimport torch.nn as nn\nimport torch.cuda as cuda\nfrom torch.optim import Adam\nfrom torchfusion.learners import StandardLearner\n\n#load dataset\ntrain_loader = mnist_loader(size=28,batch_size=64)\ntest_loader = mnist_loader(size=28,train=False,batch_size=64)\n\n#define model\nmodel = nn.Sequential(\n    Flatten(),\n    Linear(784,100),\n    Swish(),\n    Linear(100,100),\n    Swish(),\n    Linear(100,100),\n    Swish(),\n    Linear(100,10)\n)\n\n#move to GPU if available\nif cuda.is_available():\n    model = model.cuda()\n\n#Setup optimizer and loss function\noptimizer = Adam(model.parameters())\nloss_fn = nn.CrossEntropyLoss()\n\n#Define metrics\ntrain_metrics = [Accuracy()]\ntest_metrics = [Accuracy()]\n\n#Initiate Learner\nlearner = StandardLearner(model)\n\nif __name__ == \"__main__\":\n\t\n    #Print summary of the model\n    print(learner.summary((1,28,28)))\n\n    #initiate training\n    learner.train(train_loader,train_metrics=train_metrics,optimizer=optimizer,loss_fn=loss_fn,test_loader=test_loader,test_metrics=test_metrics,num_epochs=30,batch_log=False)\n\n\n\u003c/pre\u003e\n\n\n\u003cbr\u003e\u003cbr\u003e\n\u003ch1\u003eGAN in Five Minutes\u003c/h1\u003e\n\n\u003cpre\u003e\nfrom torchfusion.gan.learners import *\nfrom torchfusion.gan.applications import StandardGenerator,StandardProjectionDiscriminator\nfrom torch.optim import Adam\nfrom torchfusion.datasets import fashionmnist_loader\nimport torch.cuda as cuda\nimport torch.nn as nn\n\n#Define generator and discriminator\nG = StandardGenerator(output_size=(1,32,32),latent_size=128)\nD = StandardProjectionDiscriminator(input_size=(1,32,32),apply_sigmoid=False)\n\n#Move to GPU if available\nif cuda.is_available():\n    G = nn.DataParallel(G.cuda())\n    D = nn.DataParallel(D.cuda())\n\n#Setup optimizers\ng_optim = Adam(G.parameters(),lr=0.0002,betas=(0.5,0.999))\nd_optim = Adam(D.parameters(),lr=0.0002,betas=(0.5,0.999))\n\n#Load the dataset\ndataset = fashionmnist_loader(size=32,batch_size=64)\n\n#Init learner\nlearner = RStandardGanLearner(G,D)\n\nif __name__ == \"__main__\":\n    #init training\n    learner.train(dataset,gen_optimizer=g_optim,disc_optimizer=d_optim,save_outputs_interval=500,model_dir=\"./fashion-gan\",latent_size=128,num_epochs=50,batch_log=False)\n\u003c/pre\u003e\n\n\u003ch1\u003eImageNet Inference\u003c/h1\u003e\n\n\n\u003cpre\u003e\n\nfrom torchfusion.learners import *\nimport torch\nfrom torchvision.models.squeezenet import squeezenet1_1\nfrom torchfusion.utils import load_image,decode_imagenet\nfrom torchfusion.datasets import *\nINFER_FOLDER  = r\"./images\"\nMODEL_PATH = r\"squeezenet.pth\"\n\n#load images \ninfer_set = pathimages_loader([INFER_FOLDER],size=224,recursive=False)\n\n#init squeezenet\nnet = squeezenet1_1()\n\n#init learner and load squeezenet model\nlearner = StandardLearner(net)\nlearner.load_model(MODEL_PATH)\n\n#function for predicting from a loader\ndef predict_loader(data_loader):\n    predictions = learner.predict(data_loader)\n    for pred in predictions:\n        pred = torch.softmax(pred,0)\n        class_index = torch.argmax(pred)\n        class_name = decode_imagenet(class_index)\n        confidence = torch.max(pred)\n        print(\"Prediction: {} , Confidence: {} \".format(class_name, confidence))\n\n#function for predict a single image\ndef predict_image(image_path):\n    img = load_image(image_path,target_size=224,mean=0.5,std=0.5)\n    img = img.unsqueeze(0)\n    pred = learner.predict(img)\n    pred = torch.softmax(pred,0)\n    class_index = torch.argmax(pred)\n    class_name = decode_imagenet(class_index)\n    confidence = torch.max(pred)\n    print(\"Prediction: {} , Confidence: {} \".format(class_name, confidence))\n\n\nif __name__ == \"__main__\":\n    predict_loader(infer_set)\n    predict_image(r\"sample.jpg\")\n\n\n\n\u003c/pre\u003e\n\n\n\u003ch3\u003e\u003cb\u003e\u003cu\u003eContact Developers\u003c/u\u003e\u003c/b\u003e\u003c/h3\u003e\n \u003cp\u003e\n  \u003cbr\u003e\n      \u003cb\u003eJohn Olafenwa\u003c/b\u003e \u003cbr\u003e\n    \u003ci\u003eEmail: \u003c/i\u003e    \u003ca style=\"text-decoration: none;\"  href=\"mailto:johnolafenwa@gmail.com\"\u003e johnolafenwa@gmail.com\u003c/a\u003e \u003cbr\u003e\n      \u003ci\u003eWebsite: \u003c/i\u003e    \u003ca style=\"text-decoration: none;\" target=\"_blank\" href=\"https://john.aicommons.science\"\u003e https://john.aicommons.science\u003c/a\u003e \u003cbr\u003e\n      \u003ci\u003eTwitter: \u003c/i\u003e    \u003ca style=\"text-decoration: none;\" target=\"_blank\" href=\"https://twitter.com/johnolafenwa\"\u003e @johnolafenwa\u003c/a\u003e \u003cbr\u003e\n      \u003ci\u003eMedium : \u003c/i\u003e    \u003ca style=\"text-decoration: none;\" target=\"_blank\" href=\"https://medium.com/@johnolafenwa\"\u003e @johnolafenwa\u003c/a\u003e \u003cbr\u003e\n      \u003ci\u003eFacebook : \u003c/i\u003e    \u003ca style=\"text-decoration: none;\" href=\"https://facebook.com/olafenwajohn\"\u003e olafenwajohn\u003c/a\u003e \u003cbr\u003e\n\n\u003cbr\u003e\n  \u003cb\u003eMoses Olafenwa\u003c/b\u003e \u003cbr\u003e\n    \u003ci\u003eEmail: \u003c/i\u003e    \u003ca style=\"text-decoration: none;\"  href=\"mailto:guymodscientist@gmail.com\"\u003e guymodscientist@gmail.com\u003c/a\u003e \u003cbr\u003e\n      \u003ci\u003eWebsite: \u003c/i\u003e    \u003ca style=\"text-decoration: none;\" target=\"_blank\" href=\"https://moses.aicommons.science\"\u003e https://moses.aicommons.science\u003c/a\u003e \u003cbr\u003e\n      \u003ci\u003eTwitter: \u003c/i\u003e    \u003ca style=\"text-decoration: none;\" target=\"_blank\" href=\"https://twitter.com/OlafenwaMoses\"\u003e @OlafenwaMoses\u003c/a\u003e \u003cbr\u003e\n      \u003ci\u003eMedium : \u003c/i\u003e    \u003ca style=\"text-decoration: none;\" target=\"_blank\" href=\"https://medium.com/@guymodscientist\"\u003e @guymodscientist\u003c/a\u003e \u003cbr\u003e\n      \u003ci\u003eFacebook : \u003c/i\u003e    \u003ca style=\"text-decoration: none;\" target=\"_blank\" href=\"https://facebook.com/moses.olafenwa\"\u003e moses.olafenwa\u003c/a\u003e \u003cbr\u003e\n\u003cbr\u003e\n \u003c/p\u003e\n\n \u003cbr\u003e\n\n\u003cpre\u003e\n\nSummary of Resnet50 generated by TorchFusion\n Model Summary\nName                      Input Size                Output Size               Parameters                Multiply Adds (Flops)     \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_1                  [1, 3, 224, 224]          [1, 64, 112, 112]         9408                      118013952                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_1             [1, 64, 112, 112]         [1, 64, 112, 112]         128                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_1                    [1, 64, 112, 112]         [1, 64, 112, 112]         0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nMaxPool2d_1               [1, 64, 112, 112]         [1, 64, 56, 56]           0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_2                  [1, 64, 56, 56]           [1, 64, 56, 56]           4096                      12845056                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_2             [1, 64, 56, 56]           [1, 64, 56, 56]           128                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_2                    [1, 64, 56, 56]           [1, 64, 56, 56]           0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_3                  [1, 64, 56, 56]           [1, 64, 56, 56]           36864                     115605504                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_3             [1, 64, 56, 56]           [1, 64, 56, 56]           128                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_3                    [1, 64, 56, 56]           [1, 64, 56, 56]           0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_4                  [1, 64, 56, 56]           [1, 256, 56, 56]          16384                     51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_4             [1, 256, 56, 56]          [1, 256, 56, 56]          512                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_5                  [1, 64, 56, 56]           [1, 256, 56, 56]          16384                     51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_5             [1, 256, 56, 56]          [1, 256, 56, 56]          512                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_4                    [1, 256, 56, 56]          [1, 256, 56, 56]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nBottleneck_1              [1, 64, 56, 56]           [1, 256, 56, 56]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_6                  [1, 256, 56, 56]          [1, 64, 56, 56]           16384                     51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_6             [1, 64, 56, 56]           [1, 64, 56, 56]           128                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_5                    [1, 64, 56, 56]           [1, 64, 56, 56]           0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_7                  [1, 64, 56, 56]           [1, 64, 56, 56]           36864                     115605504                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_7             [1, 64, 56, 56]           [1, 64, 56, 56]           128                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_6                    [1, 64, 56, 56]           [1, 64, 56, 56]           0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_8                  [1, 64, 56, 56]           [1, 256, 56, 56]          16384                     51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_8             [1, 256, 56, 56]          [1, 256, 56, 56]          512                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_7                    [1, 256, 56, 56]          [1, 256, 56, 56]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nBottleneck_2              [1, 256, 56, 56]          [1, 256, 56, 56]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_9                  [1, 256, 56, 56]          [1, 64, 56, 56]           16384                     51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_9             [1, 64, 56, 56]           [1, 64, 56, 56]           128                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_8                    [1, 64, 56, 56]           [1, 64, 56, 56]           0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_10                 [1, 64, 56, 56]           [1, 64, 56, 56]           36864                     115605504                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_10            [1, 64, 56, 56]           [1, 64, 56, 56]           128                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_9                    [1, 64, 56, 56]           [1, 64, 56, 56]           0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_11                 [1, 64, 56, 56]           [1, 256, 56, 56]          16384                     51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_11            [1, 256, 56, 56]          [1, 256, 56, 56]          512                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_10                   [1, 256, 56, 56]          [1, 256, 56, 56]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nBottleneck_3              [1, 256, 56, 56]          [1, 256, 56, 56]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_12                 [1, 256, 56, 56]          [1, 128, 56, 56]          32768                     102760448                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_12            [1, 128, 56, 56]          [1, 128, 56, 56]          256                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_11                   [1, 128, 56, 56]          [1, 128, 56, 56]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_13                 [1, 128, 56, 56]          [1, 128, 28, 28]          147456                    115605504                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_13            [1, 128, 28, 28]          [1, 128, 28, 28]          256                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_12                   [1, 128, 28, 28]          [1, 128, 28, 28]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_14                 [1, 128, 28, 28]          [1, 512, 28, 28]          65536                     51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_14            [1, 512, 28, 28]          [1, 512, 28, 28]          1024                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_15                 [1, 256, 56, 56]          [1, 512, 28, 28]          131072                    102760448                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_15            [1, 512, 28, 28]          [1, 512, 28, 28]          1024                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_13                   [1, 512, 28, 28]          [1, 512, 28, 28]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nBottleneck_4              [1, 256, 56, 56]          [1, 512, 28, 28]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_16                 [1, 512, 28, 28]          [1, 128, 28, 28]          65536                     51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_16            [1, 128, 28, 28]          [1, 128, 28, 28]          256                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_14                   [1, 128, 28, 28]          [1, 128, 28, 28]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_17                 [1, 128, 28, 28]          [1, 128, 28, 28]          147456                    115605504                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_17            [1, 128, 28, 28]          [1, 128, 28, 28]          256                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_15                   [1, 128, 28, 28]          [1, 128, 28, 28]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_18                 [1, 128, 28, 28]          [1, 512, 28, 28]          65536                     51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_18            [1, 512, 28, 28]          [1, 512, 28, 28]          1024                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_16                   [1, 512, 28, 28]          [1, 512, 28, 28]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nBottleneck_5              [1, 512, 28, 28]          [1, 512, 28, 28]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_19                 [1, 512, 28, 28]          [1, 128, 28, 28]          65536                     51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_19            [1, 128, 28, 28]          [1, 128, 28, 28]          256                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_17                   [1, 128, 28, 28]          [1, 128, 28, 28]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_20                 [1, 128, 28, 28]          [1, 128, 28, 28]          147456                    115605504                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_20            [1, 128, 28, 28]          [1, 128, 28, 28]          256                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_18                   [1, 128, 28, 28]          [1, 128, 28, 28]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_21                 [1, 128, 28, 28]          [1, 512, 28, 28]          65536                     51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_21            [1, 512, 28, 28]          [1, 512, 28, 28]          1024                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_19                   [1, 512, 28, 28]          [1, 512, 28, 28]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nBottleneck_6              [1, 512, 28, 28]          [1, 512, 28, 28]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_22                 [1, 512, 28, 28]          [1, 128, 28, 28]          65536                     51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_22            [1, 128, 28, 28]          [1, 128, 28, 28]          256                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_20                   [1, 128, 28, 28]          [1, 128, 28, 28]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_23                 [1, 128, 28, 28]          [1, 128, 28, 28]          147456                    115605504                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_23            [1, 128, 28, 28]          [1, 128, 28, 28]          256                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_21                   [1, 128, 28, 28]          [1, 128, 28, 28]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_24                 [1, 128, 28, 28]          [1, 512, 28, 28]          65536                     51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_24            [1, 512, 28, 28]          [1, 512, 28, 28]          1024                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_22                   [1, 512, 28, 28]          [1, 512, 28, 28]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nBottleneck_7              [1, 512, 28, 28]          [1, 512, 28, 28]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_25                 [1, 512, 28, 28]          [1, 256, 28, 28]          131072                    102760448                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_25            [1, 256, 28, 28]          [1, 256, 28, 28]          512                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_23                   [1, 256, 28, 28]          [1, 256, 28, 28]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_26                 [1, 256, 28, 28]          [1, 256, 14, 14]          589824                    115605504                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_26            [1, 256, 14, 14]          [1, 256, 14, 14]          512                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_24                   [1, 256, 14, 14]          [1, 256, 14, 14]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_27                 [1, 256, 14, 14]          [1, 1024, 14, 14]         262144                    51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_27            [1, 1024, 14, 14]         [1, 1024, 14, 14]         2048                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_28                 [1, 512, 28, 28]          [1, 1024, 14, 14]         524288                    102760448                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_28            [1, 1024, 14, 14]         [1, 1024, 14, 14]         2048                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_25                   [1, 1024, 14, 14]         [1, 1024, 14, 14]         0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nBottleneck_8              [1, 512, 28, 28]          [1, 1024, 14, 14]         0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_29                 [1, 1024, 14, 14]         [1, 256, 14, 14]          262144                    51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_29            [1, 256, 14, 14]          [1, 256, 14, 14]          512                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_26                   [1, 256, 14, 14]          [1, 256, 14, 14]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_30                 [1, 256, 14, 14]          [1, 256, 14, 14]          589824                    115605504                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_30            [1, 256, 14, 14]          [1, 256, 14, 14]          512                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_27                   [1, 256, 14, 14]          [1, 256, 14, 14]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_31                 [1, 256, 14, 14]          [1, 1024, 14, 14]         262144                    51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_31            [1, 1024, 14, 14]         [1, 1024, 14, 14]         2048                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_28                   [1, 1024, 14, 14]         [1, 1024, 14, 14]         0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nBottleneck_9              [1, 1024, 14, 14]         [1, 1024, 14, 14]         0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_32                 [1, 1024, 14, 14]         [1, 256, 14, 14]          262144                    51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_32            [1, 256, 14, 14]          [1, 256, 14, 14]          512                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_29                   [1, 256, 14, 14]          [1, 256, 14, 14]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_33                 [1, 256, 14, 14]          [1, 256, 14, 14]          589824                    115605504                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_33            [1, 256, 14, 14]          [1, 256, 14, 14]          512                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_30                   [1, 256, 14, 14]          [1, 256, 14, 14]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_34                 [1, 256, 14, 14]          [1, 1024, 14, 14]         262144                    51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_34            [1, 1024, 14, 14]         [1, 1024, 14, 14]         2048                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_31                   [1, 1024, 14, 14]         [1, 1024, 14, 14]         0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nBottleneck_10             [1, 1024, 14, 14]         [1, 1024, 14, 14]         0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_35                 [1, 1024, 14, 14]         [1, 256, 14, 14]          262144                    51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_35            [1, 256, 14, 14]          [1, 256, 14, 14]          512                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_32                   [1, 256, 14, 14]          [1, 256, 14, 14]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_36                 [1, 256, 14, 14]          [1, 256, 14, 14]          589824                    115605504                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_36            [1, 256, 14, 14]          [1, 256, 14, 14]          512                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_33                   [1, 256, 14, 14]          [1, 256, 14, 14]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_37                 [1, 256, 14, 14]          [1, 1024, 14, 14]         262144                    51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_37            [1, 1024, 14, 14]         [1, 1024, 14, 14]         2048                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_34                   [1, 1024, 14, 14]         [1, 1024, 14, 14]         0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nBottleneck_11             [1, 1024, 14, 14]         [1, 1024, 14, 14]         0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_38                 [1, 1024, 14, 14]         [1, 256, 14, 14]          262144                    51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_38            [1, 256, 14, 14]          [1, 256, 14, 14]          512                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_35                   [1, 256, 14, 14]          [1, 256, 14, 14]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_39                 [1, 256, 14, 14]          [1, 256, 14, 14]          589824                    115605504                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_39            [1, 256, 14, 14]          [1, 256, 14, 14]          512                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_36                   [1, 256, 14, 14]          [1, 256, 14, 14]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_40                 [1, 256, 14, 14]          [1, 1024, 14, 14]         262144                    51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_40            [1, 1024, 14, 14]         [1, 1024, 14, 14]         2048                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_37                   [1, 1024, 14, 14]         [1, 1024, 14, 14]         0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nBottleneck_12             [1, 1024, 14, 14]         [1, 1024, 14, 14]         0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_41                 [1, 1024, 14, 14]         [1, 256, 14, 14]          262144                    51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_41            [1, 256, 14, 14]          [1, 256, 14, 14]          512                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_38                   [1, 256, 14, 14]          [1, 256, 14, 14]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_42                 [1, 256, 14, 14]          [1, 256, 14, 14]          589824                    115605504                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_42            [1, 256, 14, 14]          [1, 256, 14, 14]          512                       Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_39                   [1, 256, 14, 14]          [1, 256, 14, 14]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_43                 [1, 256, 14, 14]          [1, 1024, 14, 14]         262144                    51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_43            [1, 1024, 14, 14]         [1, 1024, 14, 14]         2048                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_40                   [1, 1024, 14, 14]         [1, 1024, 14, 14]         0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nBottleneck_13             [1, 1024, 14, 14]         [1, 1024, 14, 14]         0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_44                 [1, 1024, 14, 14]         [1, 512, 14, 14]          524288                    102760448                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_44            [1, 512, 14, 14]          [1, 512, 14, 14]          1024                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_41                   [1, 512, 14, 14]          [1, 512, 14, 14]          0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_45                 [1, 512, 14, 14]          [1, 512, 7, 7]            2359296                   115605504                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_45            [1, 512, 7, 7]            [1, 512, 7, 7]            1024                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_42                   [1, 512, 7, 7]            [1, 512, 7, 7]            0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_46                 [1, 512, 7, 7]            [1, 2048, 7, 7]           1048576                   51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_46            [1, 2048, 7, 7]           [1, 2048, 7, 7]           4096                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_47                 [1, 1024, 14, 14]         [1, 2048, 7, 7]           2097152                   102760448                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_47            [1, 2048, 7, 7]           [1, 2048, 7, 7]           4096                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_43                   [1, 2048, 7, 7]           [1, 2048, 7, 7]           0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nBottleneck_14             [1, 1024, 14, 14]         [1, 2048, 7, 7]           0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_48                 [1, 2048, 7, 7]           [1, 512, 7, 7]            1048576                   51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_48            [1, 512, 7, 7]            [1, 512, 7, 7]            1024                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_44                   [1, 512, 7, 7]            [1, 512, 7, 7]            0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_49                 [1, 512, 7, 7]            [1, 512, 7, 7]            2359296                   115605504                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_49            [1, 512, 7, 7]            [1, 512, 7, 7]            1024                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_45                   [1, 512, 7, 7]            [1, 512, 7, 7]            0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_50                 [1, 512, 7, 7]            [1, 2048, 7, 7]           1048576                   51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_50            [1, 2048, 7, 7]           [1, 2048, 7, 7]           4096                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_46                   [1, 2048, 7, 7]           [1, 2048, 7, 7]           0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nBottleneck_15             [1, 2048, 7, 7]           [1, 2048, 7, 7]           0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_51                 [1, 2048, 7, 7]           [1, 512, 7, 7]            1048576                   51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_51            [1, 512, 7, 7]            [1, 512, 7, 7]            1024                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_47                   [1, 512, 7, 7]            [1, 512, 7, 7]            0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_52                 [1, 512, 7, 7]            [1, 512, 7, 7]            2359296                   115605504                 \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_52            [1, 512, 7, 7]            [1, 512, 7, 7]            1024                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_48                   [1, 512, 7, 7]            [1, 512, 7, 7]            0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nConv2d_53                 [1, 512, 7, 7]            [1, 2048, 7, 7]           1048576                   51380224                  \n----------------------------------------------------------------------------------------------------------------------------------\nBatchNorm2d_53            [1, 2048, 7, 7]           [1, 2048, 7, 7]           4096                      Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nReLU_49                   [1, 2048, 7, 7]           [1, 2048, 7, 7]           0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nBottleneck_16             [1, 2048, 7, 7]           [1, 2048, 7, 7]           0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nAvgPool2d_1               [1, 2048, 7, 7]           [1, 2048, 1, 1]           0                         Not Available             \n----------------------------------------------------------------------------------------------------------------------------------\nLinear_1                  [1, 2048]                 [1, 1000]                 2049000                   2048000                   \n----------------------------------------------------------------------------------------------------------------------------------\n\nTotal Parameters: 25557032\n----------------------------------------------------------------------------------------------------------------------------------\nTotal Multiply Adds (For Convolution and Linear Layers only): 4089184256\n----------------------------------------------------------------------------------------------------------------------------------\nNumber of Layers\nConv2d : 53 layers   Bottleneck : 16 layers   MaxPool2d : 1 layers   Linear : 1 layers   BatchNorm2d : 53 layers   AvgPool2d : 1 layers   ReLU : 49 layers\n\u003c/pre\u003e\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnolafenwa%2Ftorchfusion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnolafenwa%2Ftorchfusion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnolafenwa%2Ftorchfusion/lists"}