Skip to content

How could i see the forward process of certain model? #1711

Answered by hankyul2
xanhug asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @xanhug

How about using torchsummary? This package is able to sequentially lists the hidden layer name with the output shape along with the forward process.

----------------------------------------------------------------
        Layer (type)               Output Shape         Param #
================================================================
            Conv2d-1           [-1, 10, 24, 24]             260
            Conv2d-2             [-1, 20, 8, 8]           5,020
         Dropout2d-3             [-1, 20, 8, 8]               0
            Linear-4                   [-1, 50]          16,050
            Linear-5                   [-1, 10]             510
=======================…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@xanhug
Comment options

Answer selected by xanhug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants