Created using Colaboratory
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
"metadata": {
|
"metadata": {
|
||||||
"colab": {
|
"colab": {
|
||||||
"provenance": [],
|
"provenance": [],
|
||||||
"authorship_tag": "ABX9TyOZaNcBrdZ9yCHhjLOwSi69",
|
"authorship_tag": "ABX9TyPVeAd3eDpEOCFh8CVyr1zz",
|
||||||
"include_colab_link": true
|
"include_colab_link": true
|
||||||
},
|
},
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
@@ -267,7 +267,7 @@
|
|||||||
"# Use the torch function nn.BatchNorm1d\n",
|
"# Use the torch function nn.BatchNorm1d\n",
|
||||||
"class ResidualNetworkWithBatchNorm(torch.nn.Module):\n",
|
"class ResidualNetworkWithBatchNorm(torch.nn.Module):\n",
|
||||||
" def __init__(self, input_size, output_size, hidden_size=100):\n",
|
" def __init__(self, input_size, output_size, hidden_size=100):\n",
|
||||||
" super(ResidualNetwork, self).__init__()\n",
|
" super(ResidualNetworkWithBatchNorm, self).__init__()\n",
|
||||||
" self.linear1 = nn.Linear(input_size, hidden_size)\n",
|
" self.linear1 = nn.Linear(input_size, hidden_size)\n",
|
||||||
" self.linear2 = nn.Linear(hidden_size, hidden_size)\n",
|
" self.linear2 = nn.Linear(hidden_size, hidden_size)\n",
|
||||||
" self.linear3 = nn.Linear(hidden_size, hidden_size)\n",
|
" self.linear3 = nn.Linear(hidden_size, hidden_size)\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user