1. 12 Apr, 2021 1 commit
    • Adrià Arrufat's avatar
      Add Clipped ReLU and ELU activations (#2285) · 1b7c7a64
      Adrià Arrufat authored
      
      
      * wip: add apis for clipped_relu and elu, and layer implementation for clipped_relu
      
      * add tensor_tools documentation
      
      * add cpu implementations for new activations
      
      * add elu layer
      
      * use upperbound and lowerbound for clipped_relu
      
      * fix clipped_relu gradient due to wrong variable naming
      
      * fix elu_gradient due to wrong variable naming
      
      * fix elu_gradient documentation
      
      * add documentation
      
      * WIP: add test_layer cases for clipped_relu and elu
      
      For some reason that I can't see, ELU is failing...
      
      * add clipped_relu and elu tests... cuda elu layer still does not work
      
      * fix spacing
      
      * add custom cuda implementation for elu_gradient (this one works)
      
      * Revert "add custom cuda implementation for elu_gradient (this one works)"
      
      This reverts commit 446dd803964cc6ecca598ddf6688e5d89ca0b112.
      
      * Revert "Revert "add custom cuda implementation for elu_gradient (this one works)""
      
      This reverts commit 0b615f50081d0d90e71d502b6767fcb6ba62f28a.
      
      * add comment about custom elu gradient implementation
      
      * add gradient tests, restore cudnn elu gradient
      
      * re add custom elu gradient implementation
      
      * update docs
      
      * use own cuda implementation for clipped_relu and elu
      Co-authored-by: default avatarDavis E. King <davis@dlib.net>
      1b7c7a64
  2. 04 Apr, 2021 2 commits
    • Adrià Arrufat's avatar
      Fix input/output mappings with repeat layers (#2337) · 0ffe9c4c
      Adrià Arrufat authored
      * Fix input/output mappings with repeat layers
      
      * add test for input/output tensor mappers
      
      * fix output to input order
      0ffe9c4c
    • Adrià Arrufat's avatar
      Add letterbox image (#2335) · a4713b59
      Adrià Arrufat authored
      * Add letterbox image
      
      * use && instead of and
      
      * make function adhere to the generic image interface
      
      * avoid extra copy
      
      * add some overloads and a simple test
      
      * add documentation
      
      * use zero_border_pixels and remove superfluous temporary image
      
      * allow different input and out images and update docs
      
      * remove empty line
      
      * be more explicit about output image size
      a4713b59
  3. 28 Mar, 2021 3 commits
  4. 22 Mar, 2021 1 commit
  5. 08 Mar, 2021 1 commit
    • Adrià Arrufat's avatar
      Add softmax function for matrix type (#2320) · 092fa303
      Adrià Arrufat authored
      * Add softmax function for matrix type
      
      * make softmax inherit from basic_op_m
      
      * fix comment
      
      * add test for matrix softmax
      
      * remove include
      
      * take inspiration from op_normalize
      
      * use multiplication instead of division
      
      * fix typo in documentation
      092fa303
  6. 20 Feb, 2021 1 commit
  7. 17 Feb, 2021 1 commit
  8. 16 Feb, 2021 1 commit
    • Davis King's avatar
      Add cmake back as a pip dependency. · 8b9d0439
      Davis King authored
      This dependency was explicitly removed two years ago because pip was
      installing a broken cmake on some systems.  I'm adding the dependency
      back in the hope that the pip copy of cmake has been fixed on all
      systems by this point.
      8b9d0439
  9. 13 Feb, 2021 1 commit
  10. 12 Feb, 2021 1 commit
    • pfeatherstone's avatar
      Serialization to and from vector<int8_t> and vector<uint8_t> (#2301) · 479b69e6
      pfeatherstone authored
      
      
      * [SERIALIZATION]	- vectorstream can now be used with vector<int8_t> and vector<uint8_t>
      
      * [SERIALIZATION]	- update proxy_serialize and proxy_deserialize to work with vector<int8_t> and vector<uint8_t>
      
      * [SERIALIZATION]	- updated vectorstream tests
      
      * [SERIALIZATION]	- updated serialize tests. check you can go to and from any of vector<char>, vector<int8_t> and vector<uint8_t>
      
      * [SERIALIZATION]	- updated matrix tests. check you can go to and from any of vector<char>, vector<int8_t> and vector<uint8_t>
      
      * [SERIALIZATION]	- updated dnn tests. check you can go to and from any of vector<char>, vector<int8_t> and vector<uint8_t>
      
      * [SERIALIZATION] improved and possibly safer
      
      * [SERIALIZATION] use placement new. best of all worlds i think. we have least object overhead. but code looks a tad uglier. oh well, user doesn't have to care
      
      * [SERIALIZATION] i hope this is easier on the eyes.
      Co-authored-by: default avatarpf <pf@pf-ubuntu-dev>
      479b69e6
  11. 11 Feb, 2021 1 commit
  12. 09 Feb, 2021 1 commit
  13. 28 Jan, 2021 1 commit
  14. 18 Jan, 2021 2 commits
  15. 17 Jan, 2021 3 commits
  16. 16 Jan, 2021 4 commits
  17. 15 Jan, 2021 1 commit
  18. 13 Jan, 2021 1 commit
  19. 06 Jan, 2021 2 commits
  20. 03 Jan, 2021 1 commit
  21. 30 Dec, 2020 1 commit
    • Adrià Arrufat's avatar
      Draw string on images (#2270) · 187b73f7
      Adrià Arrufat authored
      * add function to draw string on images
      
      * add documentation
      
      * formatting
      
      * add semicolon
      
      * add test for draw_string on images
      187b73f7
  22. 28 Dec, 2020 1 commit
  23. 19 Dec, 2020 1 commit
  24. 17 Dec, 2020 1 commit
  25. 14 Dec, 2020 1 commit
  26. 13 Dec, 2020 1 commit
  27. 09 Dec, 2020 1 commit
  28. 07 Dec, 2020 1 commit
  29. 04 Dec, 2020 2 commits
    • Davis King's avatar
      Some systems manage to install cuda in a way that causes cmake to claim · f42a6d23
      Davis King authored
      that cuda is available even though it knows it didn't find cublas, which
      is part of the standard cuda install.  So we need to add a check to see
      if cmake *really for realz* found cuda.
      f42a6d23
    • pfeatherstone's avatar
      Adding exponential and weibull distributions (#2247) · 0ff61299
      pfeatherstone authored
      
      
      * Added exponential distribution
      
      * tab problem removed?
      
      * forgot std::
      
      * Also added Weibull distribution. Very useful indeed.
      
      * Simple Weibull distribution unit test
      
      * don't forget std::
      
      * sorry, typo
      
      * [RAND] 	- seed the random number generators for consistency and no nasty surprises
      		- added parameter for tolerance
      		- added unit test for exponential distribution
      
      * [RAND] print the spinner more often
      
      * [RAND] up the tolerance for kurtosis a bit
      
      * [RAND] refactored parameters to reflect documentation on wikipedia.
      
      * [RAND] added documentation to _abstract
      
      * [RAND] i switched the order of the arguments to get_random_weibull and didn't update the unit tests. oops
      Co-authored-by: default avatarpf <pf@pf-ubuntu-dev>
      0ff61299