Skip to main content

nb is nerual network builder for quick network prototyping

Project description


Nenural network Blocks (aka: NB, or neural network builder). This library provides massive fancy blocks for you for quick import to build your powerful. Some SOTA tricks and connections such as CSP, ASFF, Attention, BaseConv, Hardswish, all included for quick prototype your model.

nb is an idea comes from engineering, we build model with some common blocks, we exploring new ideas with SOTA tricks, but all those thing can be gathered into one single place, and for model quick design and prototyping.

this project is under construct for now, I will update it quickly once I found some new blocks that really works in model. Also, every single updated block will be recorded in updates.


nb can be installed from PIP, remember the name is nbnb:

sudo pip3 install nbnb


Here is an example of using NB to build YoloV5!

A simple example to build a layer of conv:

from nb.torch.base.conv_block import ConvBase

a = ConvBase(128, 256, 3, 1, 2, norm_cfg=dict(type="BN"), act_cfg=dict(type="Hardswish"))

Be note that, the reason for us using cfg to specific norm and activation is for users dynamically switch their configuration of model in yaml format rather than hard code it.


  • 2020.09.12: New backbone SpineNet added:

    SpineNet is a backbone model specific for detection, it's a backbone but can do FPN's thing!! More info pls reference google's paper link.

    from nb.torch.bakbones.spinenet import SpineNet
    model = SpineNet()

  • 2020.09.11: New added blocks:


Support Matrix

We list all conv and block support in nb here:


@Lucas Jin all rights reserved.

Project details

Download files

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

Files for nbnb, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size nbnb-0.0.3.tar.gz (14.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page