Commit Graph

8199 Commits

Author SHA1 Message Date
Adrià Arrufat 3b518f40ce
Fix deserialize logic in loss_multibinary_log (#2547) 2022-03-23 07:35:56 -04:00
Adrià Arrufat 1b7053fe9d
Add focal gamma to loss_multibinary_log (#2546)
* Add focal gamma to loss_multibinary_log

* update release notes
2022-03-21 22:04:21 -04:00
Adrià Arrufat f1a29f3595
Update docs (#2544)
* Update docs

* escape & in git_logs_as_xml
2022-03-14 08:39:42 -04:00
Adrià Arrufat 516b744b43
Add missing vistor implementations to visitors.h (#2539)
Notably, set_all_bn_running_stats_window_sizes and fuse_layers.

But also I took the chance to remove the superflous separators and
change the attribute of upsample layers from stride to scale.
2022-03-10 08:09:53 -05:00
Adrià Arrufat 12f1b3a305
Refactor visitors into their own header (#2533)
* Refactor visitors into their own header

* Update visitor links in term index

* Move documentation from layers_abstract
2022-03-05 07:58:13 -05:00
Adrià Arrufat 736b4931b7
Fix formatting in YOLO deserialize error message (#2535) 2022-03-04 06:28:28 -05:00
Adrià Arrufat 1f9f32ca97
Add visitor to draw nets in the DOT language (#2528)
* Add visitor to draw nets in the DOT language

* Add documentation
2022-03-03 07:20:24 -05:00
Juha Reunanen bf427f56c7
Problem: `Error while calling cudnnGetConvolutionForwardWorkspaceSize( context(), descriptor(data), (const cudnnFilterDescriptor_t)filter_handle, (const cudnnConvolutionDescriptor_t)conv_handle, descriptor(dest_desc), (cudnnConvolutionFwdAlgo_t)forward_algo, &forward_workspace_size_in_bytes) in file C:\a\2\s\3rdparty\dlib\dlib\cuda\cudnn_dlibapi.cpp:1029. code: 9, reason: CUDNN_STATUS_NOT_SUPPORTED` (#2532)
Solution: when this happens, select the best algorithms again - but this time bypassing the cache
2022-03-03 07:18:35 -05:00
Davis King 5f7e19b785 remove cruft 2022-02-28 07:49:23 -05:00
APTX 8928f477de
Find Threads target if necessary (#2522) (#2526) 2022-02-27 09:34:09 -05:00
Davis King 0f1b2b37fe update cmake docs 2022-02-26 20:13:49 -05:00
Juha Reunanen efa2baee7b
Problem: Error while calling cudnnGetConvolutionBackwardFilterWorkspaceSize( context(), descriptor(data), descriptor(dest_desc), (const cudnnConvolutionDescriptor_t)conv_handle, (const cudnnFilterDescriptor_t)filter_handle, (cudnnConvolutionBwdFilterAlgo_t)backward_filters_algo, &backward_filters_workspace_size_in_bytes) in file C:\a\1\s\3rdparty\dlib\dlib\cuda\cudnn_dlibapi.cpp:1048. code: 9, reason: CUDNN_STATUS_NOT_SUPPORTED (#2527)
Solution: Do not apply the cuDNN 5.1 workaround if we have cuDNN version greater than or equal to 7
2022-02-26 19:52:34 -05:00
Adrià Arrufat 1ccd03fec9
Speed up Barlow Twins loss (#2519) 2022-02-24 22:42:50 -05:00
Adrià Arrufat 50b78da53a
Fix Barlow Twins loss gradient (#2518)
* Fix Barlow Twins loss gradient

* Update reference test accuracy after fix

* Round the empirical cross-correlation matrix

Just a tiny modification that allows the values to actually reach 255 (perfect white).
2022-02-21 08:33:21 -05:00
Davis King 39852f092c fix race condition in sockets unit test 2022-02-21 08:31:40 -05:00
Davis King c7ed14c956 Adjust debugging message from sockets test 2022-02-20 19:05:54 -05:00
Davis E. King f80703e8e6
Make github actions run the python unit tests (#2517)
* Make github actions run the python unit tests

* why don't the pyhton tests run?

* run python tests

* don't run tests twice

* don't run cmake tests twice

* rename the CMake test to C++ since it's testing the C++ part of the library

And the python build uses cmake too, which makes the naming somewhat
confusing

* work around macos

* oops, fix spelling error
2022-02-20 19:05:02 -05:00
Davis King c0382b41c1 Add debugging message to see why the socket tests sometimes fail on windows in github actions 2022-02-20 18:22:58 -05:00
Ryan_Huang 7e942ba989
Update __init__.py.in (#2515) 2022-02-18 08:50:55 -05:00
Juha Reunanen 7be763d65e
Make GitHub actions build on gcc-11 and clang too (#2510)
* Refactor not to use a matrix

* Add clang build

* Add job on clang-13 as well

* Disable the `gcc-11` job for now
2022-02-13 12:06:04 -05:00
Adrià Arrufat 7f8731a240
Add get_random_beta to dlib::rand (#2499)
* Add get_random_beta

* simplify beta distribution generation

* add tests

* fix condition and use full names for shape parameters

* remove unneeded include

* match test types to prevent Windows from failing tests

* Revert "remove unneeded include"

This reverts commit 35f55a96e9.

* Revert "match test types to prevent Windows from failing tests"

This reverts commit a990307066.

* Revert "Revert "remove unneeded include""

This reverts commit 59be002c9e.

* fix outdated message in DLIB_CASSERT

* relax mpc condition again

* Revert "relax mpc condition again"

This reverts commit 1d208c5dcf.

* Loop while both alpha and beta are zero

* Update dlib/rand/rand_kernel_abstract.h

Co-authored-by: Davis E. King <davis685@gmail.com>
2022-02-12 09:28:34 -05:00
Juha Reunanen 48f1167991
Do not use deprecated `std::random_shuffle` (#2507) 2022-02-12 09:16:51 -05:00
Adrià Arrufat d665bfb899
try to fix build on macOS (#2503) 2022-02-06 22:26:31 -05:00
Davis King 5291d58e93 See if this makes the MPC test more reliable on MacOS 2022-02-06 21:36:56 -05:00
Davis King c89bf6b77a try less parallelism and see if that doesn't break github actions 2022-02-06 21:28:24 -05:00
Davis King 42c74c38a1 use parallel builds for github actions 2022-02-06 19:48:18 -05:00
Juha Reunanen 979a22c51d
Make Github Actions build more stuff (in particular, the examples) (#2502) 2022-02-06 19:47:05 -05:00
Davis King 7048f4c1d4 Avoid build error in visual studio 2022-02-03 23:14:36 -05:00
Davis King fda984f7ca Add more unit tests for dlib::rand 2022-02-03 08:45:15 -05:00
Adrià Arrufat fc7595d081
Relax MPC test for macOS (#2500) 2022-02-03 08:28:20 -05:00
Davis King 86b3a809fe Make github actions use -q so the test logs are not so spammy 2022-02-03 08:26:50 -05:00
Davis King 28328af541 Make -q on tests print errors 2022-02-03 08:25:58 -05:00
Adrià Arrufat ffca3b3a6d
Add Reorg Layer (#2496)
* Add Reorg Layer

* Add Reorg Layer

* Fix typo

* fix grammar

* add missing input <-> output mappings to reorg

* Add reorg docs and term index entry

* Update dlib/cuda/tensor_tools.h

Co-authored-by: Davis E. King <davis@dlib.net>
2022-02-02 22:29:01 -05:00
Adrià Arrufat c91959a73d
do not round drectangle in rectangle transform (#2498) 2022-02-02 22:16:04 -05:00
Adrià Arrufat 027fb781bd
GitHub actions (#2289)
* add github actions from "ptheywood/cuda-cmake-github-actions"

* fix typo

* rename

* Revert "rename"

This reverts commit ded445f3bb.

* add cudnn env variable

* remove old cuda configs and try to fix installation

* add run tests

* fix test path

* actually build tests

* fix missing $

* fix syntax

* debug test path

* fix test build dir

* fix cmake syntax

* fix working directory

* Revert "debug test path"

This reverts commit 6d5b4e7a1f.

* uncomment other configurations

* fix run test path

* fix test run dir again

* syntax

* it's really not my day...

* remove incompatible configs and make tests run silently

* add initial windows script from ptheywood/cuda-cmake-github-actions

* fix windows script path

* add test for windows

* remove dot slash

* install cublas_dev

* try adding cudnn (I really need a Windows machine to test this)

* remove windows workflow scripts

* try config with ubuntu 20.10

* fix syntax error

* try to fix DLIB not using CUDA

* try again with ubuntu 20.04

* remove backticks

* remove superfluous configure step

* fix cuda parsing for v10.2

* debug test

* change working dir...

* do not run test silently

* install nvidia drivers

* only install server drivers

* load nvidia kernel module

* move module loading to script

* try to fix kernel module loading

* add simple github actions workflow

* add simple github actions workflow

* fix path?

* fix config step

* only build the dtest target

* handle Windows path

* use ./ on windows

* debugging

* debugging

* debugging

* except for the timer test on macOS, the rest works

* remove cuda custom tests, for the moment

* build in Relase mode to try to avoid timeout on Windows

* debugging

* actually change build config

* do not test the timer on macOS

* try building python
2022-02-02 22:00:56 -05:00
Adrià Arrufat 3d4c14e633
Add input_rgb_image_pair layer and new net visitors documentation (#2497)
* Add input_rgb_image layer documentation

* fix typo

* Add index entries for missing network visitors

* update Barlow Twins loss links

* add missing yolo rect docs, links to yolo paper and better Barlow Twins formatting
2022-02-02 08:36:48 -05:00
Adrià Arrufat 21651f498e
Add missing docs for v19.23 (#2495)
* Add missing docs for v19.23

* remove duplicate yolo entry

* fix link of loss_yolo_ in term_index
2022-01-30 13:17:40 -05:00
Rajas Sambhare 2b86255404
Resolve davisking/dlib#2463 (#2492)
* Resolve davisking/dlib#2463

Fixes missing ssize_t definition on Windows

* Define ssize_t only on Windows 64-bit
2022-01-28 07:55:00 -05:00
Davis King 54af1f85f8 Record last changeset and set PATCH version to 99 2022-01-24 22:16:28 -05:00
Davis King 074ab8bdba Created release v19.23 2022-01-24 22:10:27 -05:00
Davis King 0cba4bacb3 updated docs 2022-01-24 22:09:45 -05:00
Davis King acf1b9c479 Rename INVOKE to invoke_ 2022-01-24 22:05:59 -05:00
Davis King 56b8cd5cbc Make struct some_type; get bolded when pretty printed 2022-01-24 22:01:47 -05:00
Davis King 8810a62b11 fix spelling error in comment 2022-01-24 21:55:44 -05:00
Davis King c1b3feb23b very minor formatting fixup 2022-01-24 21:49:09 -05:00
Davis King 02b290e3fb update release notes 2022-01-24 08:35:47 -05:00
Davis King 3c654a7a9e cleanup formatting a little 2022-01-24 08:35:34 -05:00
Adrià Arrufat 2ed6ae1b6c
Eliminate grid sensitivity in YOLO (#2488) 2022-01-23 11:36:45 -05:00
Adrià Arrufat 3da3e81181
Fix Layer Normalize (#2489)
* Fix Layer Normalize

* remove unneeded temporary variables
2022-01-23 11:29:28 -05:00
pfeatherstone aaac87a224
[TYPE_SAFE_UNION] simplified some type traits and added for_each(). (#2475)
* [TYPE_SAFE_UNION] simplified some type traits and added for_each().

* added example serialization/deserialization using typeid().hash_code and different type_safe_union types

* in_place_tag is an empty struct. so don't pass const references, you're unecessarily passing 8 bytes around for now reason

* - added variant_size for type_safe_union
- added variant_alternative for type_safe_union
- removed for type_safe_union::for_each() and replaced with global function dlib::for_each_type()

* - made visit() a global

* use dlib::invoke explicitly

* - for_each_type is implemented using fold expression (or whatever the right term is) instead of template recursion. This method, in theory, yields better compile times. And if you're familiar with parameter packs, then the implementation is easier to read.

* - refactoring
- reordered function parameters in for_each_type()
- vtable implementation of apply_to_contents and visit() (sorry Davis for yet another change)

* add option to not zero out gradients and method to do it (#2477)

* Avoid different kinds of compiler warnings (#2481)

* Avoid different kinds of compiler warnings that started to appear when upgrading my build environment

* Avoid more compiler warnings

* Revert the overly verbose static_cast changes

* Make resize_bilinear and resize_bilinear_gradient take long long (previously just long)

* Circumvent what appears to be a bug in Visual Studio 2019's optimizer
(see: https://forum.juce.com/t/warning-in-the-lastest-vs2019/38267)

* Fix MSVC pragma warnings with other compilers (#2483)

* Fix warning about unused zero_gradients parameter (#2487)

* Fix warning about unused zero_gradients parameter

* match signature of other methods

* cleanup

Co-authored-by: pfeatherstone <peter@me>
Co-authored-by: Adrià Arrufat <1671644+arrufat@users.noreply.github.com>
Co-authored-by: Juha Reunanen <juha.reunanen@tomaattinen.com>
Co-authored-by: Davis King <davis@dlib.net>
2022-01-23 11:26:15 -05:00