Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
48f5b4da
Commit
48f5b4da
authored
Mar 15, 2017
by
Neal Wu
Committed by
GitHub
Mar 15, 2017
Browse files
Update to use tf.losses.mean_squared_error
parent
d50d2117
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
slim/slim_walkthough.ipynb
slim/slim_walkthough.ipynb
+2
-2
No files found.
slim/slim_walkthough.ipynb
View file @
48f5b4da
...
@@ -244,7 +244,7 @@
...
@@ -244,7 +244,7 @@
" predictions, nodes = regression_model(inputs, is_training=True)\n",
" predictions, nodes = regression_model(inputs, is_training=True)\n",
"\n",
"\n",
" # Add the loss function to the graph.\n",
" # Add the loss function to the graph.\n",
" loss =
slim
.losses.mean_squared_error(prediction
s, target
s)\n",
" loss =
tf
.losses.mean_squared_error(
labels=targets, predictions=
predictions)\n",
" \n",
" \n",
" # The total loss is the uers's loss plus any regularization losses.\n",
" # The total loss is the uers's loss plus any regularization losses.\n",
" total_loss = slim.losses.get_total_loss()\n",
" total_loss = slim.losses.get_total_loss()\n",
...
@@ -289,7 +289,7 @@
...
@@ -289,7 +289,7 @@
" predictions, end_points = regression_model(inputs, is_training=True)\n",
" predictions, end_points = regression_model(inputs, is_training=True)\n",
"\n",
"\n",
" # Add multiple loss nodes.\n",
" # Add multiple loss nodes.\n",
" mean_squared_error_loss =
slim
.losses.mean_squared_error(prediction
s, target
s)\n",
" mean_squared_error_loss =
tf
.losses.mean_squared_error(
labels=targets, predictions=
predictions)\n",
" absolute_difference_loss = slim.losses.absolute_difference(predictions, targets)\n",
" absolute_difference_loss = slim.losses.absolute_difference(predictions, targets)\n",
"\n",
"\n",
" # The following two ways to compute the total loss are equivalent\n",
" # The following two ways to compute the total loss are equivalent\n",
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment