This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ from fvcore.nn import FlopCountAnalysis | |
$ flops = FlopCountAnalysis(model, input) | |
$ flops.total() | |
-> 274656 | |
$ flops.by_operator() | |
-> Counter({'conv': 194616, 'addmm': 80040}) | |
$ flops.by_module() | |
-> Counter({'': 274656, 'conv1': 48600, | |
-> 'conv2': 146016, 'fc1': 69120, | |
-> 'fc2': 10080, 'fc3': 840}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Uncomment code if you're running virtually | |
""" %%capture | |
import sys | |
!pip install selenium | |
#!apt-get update # to update ubuntu to correctly run apt install | |
!apt install chromium-chromedriver | |
!cp /usr/lib/chromium-browser/chromedriver /usr/bin | |
sys.path.insert(0,'/usr/lib/chromium-browser/chromedriver') """ | |
pip install pytube==11.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Uncomment the code below if running on Google Colab | |
""" %%capture | |
import sys | |
!pip install selenium | |
#!apt-get update # to update ubuntu to correctly run apt install | |
!apt install chromium-chromedriver | |
!cp /usr/lib/chromium-browser/chromedriver /usr/bin | |
sys.path.insert(0,'/usr/lib/chromium-browser/chromedriver') """ |