[PYTHON] Misunderstanding on how to connect cnn

What I made a mistake when building a cnn network with pytorch

When writing cnn with pytorch, use torch.nn and write as follows

conv1 = torch.nn.Conv2d(in_channels , out_channels , kernel_size , stride , padding)

Misunderstanding

Since in_channel and out_channels are the number of kernel channels, they have nothing to do with the image size.

Things to be careful of when building a network

It is the size of the pooling layer and the size of the stride that determine the input and output image size (feature map). So when stacking two or more layers of cnn, I think it will work if you take care to make the out_channel of the previous layer equal to the in_channel of the next layer.

Recommended Posts

Misunderstanding on how to connect cnn
How to register on pypi
How to install mysql-connector-python on mac
How to use Dataiku on Windows
Notes on how to use pywinauto
How to install graph-tool on macOS
How to install VMware-Tools on Linux
How to install pycrypto on Windows
How to deploy django-compressor on Windows
How to install OpenCV on Mac
How to run matplotlib on heroku
How to install PyPy on CentOS
How to use homebrew on Debian
How to install TensorFlow on CentOS 7
Notes on how to use doctest
How to install Maven on CentOS
Notes on how to write requirements.txt
How to install Go on Ubuntu
How to install music 21 on windows
How to install aws-session-manager-plugin on Manajro Linux
How to read pydoc on python interpreter
How to install drobertadams / toggl-cli on Mac
How to use mecab, neologd-ipadic on colab
How to update php on Amazon linux 2
How to use Google Assistant on Windows 10
How to erase Python 2.x on Mac.
How to display emoji on Manjaro Linux
Memorandum on how to use gremlin python
How to install Anisble on Amazon Linux 2
How to switch mouse operations on CentOS
How to install richzhang / colorization on Windows 10
How to update security on CentOS Linux 8
How to install Apache (httpd) on CentOS7
How to install php7.4 on Linux (Ubuntu)
How to install Eclipse GlassFish 5.1.0 on CentOS 7
How to install Apache (httpd) on CentOS8
How to test on a Django-authenticated page
How to run Cython on OSX Memo
How to find large files on Linux
How to install NumPy on Raspberry Pi
How to use SQLAlchemy / Connect with aiomysql
How to install cx_Oracle on macOS Sierra
Gusto cannot connect to Wifi on Linux
Connect to mysql
How to write urlfetch unittest on GAE / P
[2020 version] How to install Python3 on AWS EC2
Strategy on how to monetize with Python Java
How to install OpenCV on Jetson Nano Python
[Latest] How to build Java environment on Ubuntu
How to make multiple kernels selectable on Jupyter
How to use Python Kivy ④ ~ Execution on Android ~
How to run CNN in 1 system notation in Tensorflow 2
How to update security on Ubuntu 19.10 Eoan Ermine
How to quickly install h5py on Windows 10 [Unofficial]
How to install OpenGM on OSX with macports
How to create data to put in CNN (Chainer)
How to live a decent life on 2017 Windows
How to install Camunda Modeler on Manjaro Linux
[Python] How to install OpenCV on Anaconda [Windows]
How to build Java environment on Ubuntu (Linux)
How to install / verify graphviz on anaconda / windows10