gluon-tutorials | This is staging repo for https : //github
kandi X-RAY | gluon-tutorials Summary
kandi X-RAY | gluon-tutorials Summary
This is staging repo for The reason for creating another repo is. We made the following changes. Prebuild doc is at
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Load MNIST dataset .
- Iterate over the dataset .
- Try to load a GPU .
- Initialize dataset .
- Setup the extension .
- Returns the number of samples .
gluon-tutorials Key Features
gluon-tutorials Examples and Code Snippets
Community Discussions
Trending Discussions on gluon-tutorials
QUESTION
I am reading a tutorial about MxNet. The writers use ‘mxnet.gluon.nn.Sequential()’ as a container to store some blocks (see code 1); then, they rewrite the connection of blocks in ‘def forward(self, x)’ (see codes 2 and 3). Is there any side effect by doing this? By the way, what is the difference between ‘Sequential()’ and ‘HybridSequential()’. I try a list to replace the ‘Sequential’, and I get following warnings doing the initialization process.
“ToySSD.downsamplers” is a container with Blocks. Note that Blocks inside the list, tuple or dict will not be registered automatically. Make sure to register them using register_child() or switching to nn.Sequential/nn.HybridSequential instead.’
As far as I know, if you put some blocks in ‘mxnet.gluon.nn.Sequential()’ or ‘mxnet.gluon.nn.HybridSequential()’, this action is telling the computer that these blocks are connected. However, if you design the relationship of blocks in the ‘forward’ function, you are telling the computer to connect these blocks in another way. Will it lead to confusion? If I only design some block connections in ‘forward’, what are the relationships of the other blocks in ‘Sequential()’ that are not designed in ‘forward’ function?
The entire tutorial can be found in here.
code 1:
...ANSWER
Answered 2018-May-22 at 23:21In Gluon, networks are build using Block
s. If something is not a Block
, it cannot be part of a Gluon network. Dense layer is a Block
, Convolution is a Block
, Pooling layer is a Block
, etc.
Sometimes you might want a Block that is not a pre-defined block in Gluon but is a sequence of predefined Gluon blocks. For example,
Conv2D -> MaxPool2D -> Conv2D -> MaxPool2D -> Flatten -> Dense -> Dense
Gluon doesn't have a pre-defined block that does the above sequence of operation. But Gluon does have Blocks that does each of the individual operation. So, you can create your own block that does the above sequence of operation by stringing together predefined Gluon blocks. Example:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gluon-tutorials
You can use gluon-tutorials like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page