Commit Graph

8287 Commits

Author SHA1 Message Date
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
Adrià Arrufat
42e0869606
Fix warning about unused zero_gradients parameter (#2487)
* Fix warning about unused zero_gradients parameter

* match signature of other methods
2022-01-15 09:22:43 -05:00
Adrià Arrufat
8b4652912d
Fix MSVC pragma warnings with other compilers (#2483) 2022-01-10 06:02:20 -05:00
Juha Reunanen
a6f29d41ad
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)
2022-01-06 09:03:48 -05:00
Adrià Arrufat
994df341a2
add option to not zero out gradients and method to do it (#2477) 2022-01-05 08:46:55 -05:00
Davis King
a54cea44ae added a comment 2021-12-16 08:16:59 -05:00
Juha Reunanen
75b3463fa7
Avoid distracting compiler warning (#2472) 2021-12-16 08:13:08 -05:00
Adrià Arrufat
f0c0b307d5
Fix crash when truth center is outside of the image (#2471) 2021-12-07 21:49:06 -05:00
Adrià Arrufat
a2c4760307
Use lambda obj in the ignore case and do some refactoring (#2466) 2021-11-25 10:37:13 -05:00
aribiere
cf21f5aa95
Add semicolon as separator for reading in a matrix (#2462)
Co-authored-by: Alain RIBIÈRE <alain.ribiere@edf.fr>
2021-11-19 08:38:03 -05:00
Adrià Arrufat
e1ac0b43e4
normalize samples for SVM classifier (#2460) 2021-11-17 08:14:39 -05:00
Davis King
44621a6124 fix build error 2021-11-14 21:28:00 -05:00
pfeatherstone
1925b2d10f
[INVOKE] added is_invocable_r, invoke_r, made everything constexpr and conditionally noexcept (#2458)
* - added dlib::invoke_r()
- added dlib::is_invocable_r<>
- made everything constexpr and conditionally noexcept !
- added tests
This has required a refactor of dlib::invoke since std::mem_fn is not constexpr in c++11

* - !std::is_function replaced with std::is_object. Let's be a bit more precise

* - made dlib::apply constexpr and conditionally noexcept

Co-authored-by: pf <pf@me>
2021-11-14 16:18:06 -05:00