1. 20 Oct, 2020 1 commit
    • Adrià Arrufat's avatar
      Add Layer Normalization (#2213) · 3c82c225
      Adrià Arrufat authored
      * wip: layer normalization on cpu
      
      * wip: add cuda implementation, nor working yet
      
      * wip: try to fix cuda implementation
      
      * swap grid_strid_range and grid_strid_range_y: does not work yet
      
      * fix CUDA implementation
      
      * implement cuda gradient
      
      * add documentation, move layer_norm, update bn_visitor
      
      * add tests
      
      * use stddev instead of variance in test (they are both 1, anyway)
      
      * add test for means and invstds on CPU and CUDA
      
      * rename visitor to disable_duplicative_bias
      
      * handle more cases in the visitor_disable_input_bias
      
      * Add tests for visitor_disable_input_bias
      3c82c225
  2. 09 Oct, 2020 1 commit
  3. 06 Oct, 2020 1 commit
    • Adrià Arrufat's avatar
      Test cuda losses (#2199) · c45d166a
      Adrià Arrufat authored
      * add cuda test for loss_binary_log_per_pixel and some needed refactoring
      
      * add cuda test for loss_multiclass_log_per_pixel
      
      * forgot to add cpu version in loss
      
      * remove a line I added by mistake
      
      * fix typos
      
      * declare label_to_ignore as static
      
      * use tensor_index function instead of index method
      
      * test cuda and cpu gradients values
      
      * use DLIB_TEST instead of DLIB_CASSERT
      c45d166a
  4. 30 Sep, 2020 1 commit
  5. 18 Apr, 2020 1 commit
    • Adrià Arrufat's avatar
      Add cuda implementation for loss_mean_squared_per_channel_and_pixel (#2053) · 55e9c890
      Adrià Arrufat authored
      
      
      * wip: attempt to use cuda for loss mse channel
      
      * wip: maybe this is a step in the right direction
      
      * Try to fix dereferencing the truth data (#1)
      
      * Try to fix dereferencing the truth data
      
      * Fix memory layout
      
      * fix loss scaling and update tests
      
      * rename temp1 to temp
      
      * readd lambda captures for output_width and output_height
      
      clangd was complaining about this, and suggested me to remove them
      in the first, place:
      
      ```
      Lambda capture 'output_height' is not required to be captured for this use (fix available)
      Lambda capture 'output_width' is not required to be captured for this use (fix available)
      ```
      
      * add a weighted_loss typedef to loss_multiclass_log_weighted_ for consistency
      
      * update docs for weighted losses
      
      * refactor multi channel loss and add cpu-cuda tests
      
      * make operator() const
      
      * make error relative to the loss value
      Co-authored-by: default avatarJuha Reunanen <juha.reunanen@tomaattinen.com>
      55e9c890
  6. 21 Mar, 2020 1 commit
    • Adrià Arrufat's avatar
      add leaky_relu activation layer (#2033) · d610e56c
      Adrià Arrufat authored
      * add leaky_relu activation layer
      
      * add inplace case for leaky_relu and test_layer
      
      * make clear that alpha is not learned by leaky_relu
      
      * remove branch from cuda kernel
      d610e56c
  7. 15 Jan, 2020 1 commit
  8. 06 Apr, 2018 1 commit
  9. 25 Jan, 2018 1 commit
  10. 17 Nov, 2017 1 commit
  11. 04 Sep, 2017 1 commit
  12. 14 Aug, 2017 1 commit
    • Davis King's avatar
      Added an "add_to" option to tt:copy_tensor(). There was also a bug in the · 7078cfaf
      Davis King authored
      concat layer's backward() method.  It was assigning the gradient to previous
      layers instead of adding the gradient, as required by the layer interface
      specification.  This change also noticeably speeds up concat layers since only
      one CUDA kernel launch now happens per concat operation, rather than one
      kernel launch for each sample in a tensor.
      7078cfaf
  13. 11 Aug, 2017 1 commit
  14. 04 Jul, 2017 1 commit
  15. 27 Jun, 2017 1 commit
  16. 22 Jun, 2017 1 commit
  17. 02 Apr, 2017 1 commit
  18. 16 Mar, 2017 1 commit
  19. 13 Mar, 2017 1 commit
  20. 25 Jun, 2016 1 commit
  21. 26 May, 2016 1 commit
  22. 22 May, 2016 3 commits
  23. 17 May, 2016 1 commit
  24. 14 May, 2016 1 commit
    • Davis King's avatar
      Fixed the in-place layers so that they don't interfere with the operation of · 8421f213
      Davis King authored
      skip layers and add_prev style layers.  In particular, now in-place layers only
      overwrite the gradient information in their child layer if they are operating
      in in-place mode.  Otherwise, they add their gradients to their child layers.
      
      It should also be noted that it's safe for in-place layers to overwrite
      gradients when in in-place mode since their child layers are inaccessible when
      in-place layers operate in in-place mode.  This prevents any other layers from
      trying to add to the child layer, thereby avoiding the potability of layer
      interference.  So the bug this change fixes is that, when not in in-place mode
      the child layers are still accessible but in-place layers were *still*
      overwriting child gradients.
      8421f213
  25. 04 May, 2016 1 commit
  26. 10 Apr, 2016 2 commits
  27. 01 Apr, 2016 1 commit
  28. 27 Mar, 2016 1 commit
  29. 24 Jan, 2016 1 commit
  30. 23 Jan, 2016 1 commit
  31. 04 Jan, 2016 1 commit
  32. 03 Jan, 2016 1 commit
  33. 24 Dec, 2015 2 commits
  34. 23 Dec, 2015 1 commit
    • Davis King's avatar
      Upgraded to cuDNN v4.0. This means changing the binding to max_pool a little · 122f2fa6
      Davis King authored
      since that's a little different in cuDNN.  I also removed my CUDA code for
      doing batch normalization and replaced it with cuDNN's new batch normalization
      methods.
      
      Finally, I forgot to add a convolutional option to the bn_ object.  Now it has
      one so you can set the mode however you like, either BATCH_NORM_FC or
      BATCH_NORM_CONV.
      122f2fa6
  35. 12 Dec, 2015 1 commit
  36. 09 Dec, 2015 1 commit