How to Solve NameError: name 'summary' is not defined -- torchsummary

Solution: Import the 'summary' module

To Solve the error, add the following line to the top of your code.

from torchsummary import summary

 

For more information:
Python torchsummary summary