Skip to content

Commit

Permalink
Demo
Browse files Browse the repository at this point in the history
  • Loading branch information
bewee committed Jul 23, 2021
1 parent 63c232f commit bb21e55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@
"execution_count": 14,
"source": [
"def total_variation_loss(x):\n",
" a = backend.square(x[:, :height-1, :width-1, :] - x[:, 1:, :width-1, :])\n",
" b = backend.square(x[:, :height-1, :width-1, :] - x[:, :height-1, 1:, :])\n",
" a = backend.square(x[:, :-1, :-1, :] - x[:, 1:, :-1, :])\n",
" b = backend.square(x[:, :-1, :-1, :] - x[:, :-1, 1:, :])\n",
" return backend.sum(backend.pow(a + b, 1.25))\n",
"\n",
"loss += total_variation_weight * total_variation_loss(combination_image)"
Expand Down

0 comments on commit bb21e55

Please sign in to comment.