Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug "TypeError: Layer.add_weight() got multiple values for argument 'shape'" in Lab 1 Pt. 1 #165

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lab1/Part1_TensorFlow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@
" d = int(input_shape[-1])\n",
" # Define and initialize parameters: a weight matrix W and bias b\n",
" # Note that parameter initialization is random!\n",
" self.W = self.add_weight(\"weight\", shape=[d, self.n_output_nodes]) # note the dimensionality\n",
" self.b = self.add_weight(\"bias\", shape=[1, self.n_output_nodes]) # note the dimensionality\n",
" self.W = self.add_weight(name=\"weight\", shape=[d, self.n_output_nodes]) # note the dimensionality\n",
" self.b = self.add_weight(name=\"bias\", shape=[1, self.n_output_nodes]) # note the dimensionality\n",
"\n",
" def call(self, x):\n",
" '''TODO: define the operation for z (hint: use tf.matmul)'''\n",
Expand Down Expand Up @@ -695,4 +695,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}