mirror of
https://github.com/mrdbourke/pytorch-deep-learning.git
synced 2026-11-27 06:07:09 +00:00
remove summary output
This commit is contained in:
1 parent
04bc463267
commit
ca2bacd1f4
1 file changed
+9
-9
@@ -1650,17 +1650,17 @@
|
||||
"effnetb2_weights = torchvision.models.EfficientNet_B2_Weights.DEFAULT # \"DEFAULT\" means best available weights\n",
|
||||
"effnetb2 = torchvision.models.efficientnet_b2(weights=effnetb2_weights)\n",
|
||||
"\n",
|
||||
"# 2. Get a summary of standard EffNetB2 from torchvision.models (uncomment for full output)\n",
|
||||
"summary(model=effnetb2, \n",
|
||||
" input_size=(32, 3, 224, 224), # make sure this is \"input_size\", not \"input_shape\"\n",
|
||||
" # col_names=[\"input_size\"], # uncomment for smaller output\n",
|
||||
" col_names=[\"input_size\", \"output_size\", \"num_params\", \"trainable\"],\n",
|
||||
" col_width=20,\n",
|
||||
" row_settings=[\"var_names\"]\n",
|
||||
") \n",
|
||||
"# # 2. Get a summary of standard EffNetB2 from torchvision.models (uncomment for full output)\n",
|
||||
"# summary(model=effnetb2, \n",
|
||||
"# input_size=(32, 3, 224, 224), # make sure this is \"input_size\", not \"input_shape\"\n",
|
||||
"# # col_names=[\"input_size\"], # uncomment for smaller output\n",
|
||||
"# col_names=[\"input_size\", \"output_size\", \"num_params\", \"trainable\"],\n",
|
||||
"# col_width=20,\n",
|
||||
"# row_settings=[\"var_names\"]\n",
|
||||
"# ) \n",
|
||||
"\n",
|
||||
"# 3. Get the number of in_features of the EfficientNetB2 classifier layer\n",
|
||||
"# print(f\"Number of in_features to final layer of EfficientNetB2: {len(effnetb2.classifier.state_dict()['1.weight'][0])}\")"
|
||||
"print(f\"Number of in_features to final layer of EfficientNetB2: {len(effnetb2.classifier.state_dict()['1.weight'][0])}\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user