Davis King
13cc545da3
clarified comments.
2016-05-15 14:31:06 -04:00
Davis King
93bbe5ff15
merged
2016-05-14 20:31:50 -04:00
Davis King
66166c674d
Changed the solver interface to take the learning rate and the layer details
...
object as an input. This allows the solvers to exhibit a more complex behavior
that depends on the specific layer. It also removes the learning rate from the
solver's parameter set and pushes it entirely into the core training code.
This also removes the need for the separate "step size" which previously was
multiplied with the output of the solvers.
Most of the code is still the same, and in the core and trainer the step_size
variables have just been renamed to learning_rate. The dnn_trainer's relevant
member functions have also been renamed.
The examples have been updated to reflect these API changes. I also cleaned up
the resnet definition and added better downsampling.
2016-05-14 20:30:45 -04:00
Davis King
9763c471ac
merged
2016-05-13 23:08:47 -04:00
Davis King
8421f213ad
Fixed the in-place layers so that they don't interfere with the operation of
...
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.
2016-05-13 23:08:03 -04:00
Davis King
ead735d0b0
Made printing to cout or cerr check for matlab ctrl+c and throw an exception
...
if so. This way, if you have a long running mex file it will be killable if
it is periodically printing.
2016-05-13 09:01:24 -04:00
Davis King
81eb18a40f
Added intel architecture detection so SSE/AVX isn't enabled when it shouldn't be.
2016-05-13 08:50:25 -04:00
Davis King
3124ec4b81
Made dropout layer initialize its random number generator from std::rand() rather than always
...
using the same seed.
2016-05-13 08:35:22 -04:00
Davis King
da28fe3b3e
Fixed a compiler error on some systems.
2016-05-13 06:40:15 -04:00
Davis King
c79d412c32
slightly relaxed tests to avoid false failure
2016-05-13 06:32:18 -04:00
Davis King
022dce43c2
I accidentally turned the max pooling layers into average pooling a few days
...
ago. This fixes that and turns them back into max pooling layers.
2016-05-12 19:40:24 -04:00
Davis King
6f970e1854
Fixed network constructors so you can give an input layer for initialization
...
without getting a compiler error.
2016-05-12 19:22:53 -04:00
Davis E. King
0846daabdc
Merge pull request #108 from SoapGentoo/master
...
Augment build-system, allow for multilib installation, support pkg-config discovery
2016-05-10 06:37:44 -04:00
David Seifert
f3eae43897
* Add pkg-config file, allowing for build-system agnostic dependencies
...
* Define LIB_INSTALL_DIR cache variable, allowing for multilib installations
* Discover BLAS and LAPACK via pkg-config if possible
* Fix incorrect toolchain variables in "dlib/test/makefile"
2016-05-10 09:18:27 +02:00
Davis King
cad73fae9d
Fixed compiler warnings
2016-05-09 21:46:04 -04:00
Davis King
1e70c721a4
Made example use the "everything" version of avg pooling.
2016-05-07 14:30:42 -04:00
Davis King
f669552186
Added max_pool_everything and avg_pool_everything.
2016-05-07 14:30:18 -04:00
Davis King
6d2495a20a
Changed extract_fhog_features() back to returning matrix<double> since that's
...
what it's contract says needs to happen (and what existing code expects).
2016-05-07 07:53:27 -04:00
Davis King
51065b9808
Made test error reporting more reliable
2016-05-05 06:58:52 -04:00
Davis King
4a7633056c
Fixed avg pooling filter sizes to avoid errors with the new rules about
...
non-one based strides.
2016-05-04 21:40:29 -04:00
Davis King
e4d70f8d3d
Improved error messages
2016-05-04 21:39:31 -04:00
Davis King
4ef5908b0a
Pushed the padding parameters into the con_, max_pool_, and avg_pool_
...
interfaces. Also changed the default behavior when the stride isn't 1. Now
the filters will be applied only to the "valid" part of the image.
2016-05-04 21:32:59 -04:00
Davis King
6bab1f50ad
Added missing ; to DLIB_TEST and DLIB_TEST_MSG macros now that they are required.
2016-05-04 21:27:10 -04:00
Davis King
a17e7f6b3e
fixed typo in comment
2016-05-04 21:13:28 -04:00
Davis King
73d7835590
Added a padding parameter to the pooling and convolution classes. Still need
...
to expose it in the final layer interface.
2016-05-03 22:55:46 -04:00
Davis King
08c8778479
Made test less likely to false alarm.
2016-05-03 21:44:39 -04:00
Davis King
6e9b9d035d
Improved macros
2016-05-03 20:36:09 -04:00
Davis King
707a6b4c88
fixed typo in spec
2016-05-02 18:53:00 -04:00
Davis King
4649193f9c
Made dlib work with libgif v5
2016-05-01 06:56:34 -04:00
Davis King
9260243c21
Fixed bugs in multi-gpu training code.
2016-04-30 12:53:53 -04:00
Davis King
26d2d889df
Added comments
2016-04-30 12:28:00 -04:00
Davis King
d161d0bada
Added a num_device_groups() member function.
2016-04-30 11:09:50 -04:00
Davis King
909ca040fe
Made launch_kernel() not generate CUDA errors if you ask it to launch a kernel of size 0.
2016-04-30 10:42:16 -04:00
Davis King
f5abfca18c
Added missing #include.
2016-04-29 09:53:05 -04:00
Davis King
4ee88457ca
Fixed namespace lookup problem due to a name clash.
2016-04-29 09:40:19 -04:00
Davis King
893824a18c
Fixed compiler warnings
2016-04-29 08:04:54 -04:00
Davis King
aba68d6f0c
merged
2016-04-29 06:56:25 -04:00
Davis King
428b0bb856
Made multi-gpu mode use GPUDirect rather than copying through the CPU.
2016-04-29 06:55:53 -04:00
Davis King
0d6e3f12d6
Made the multi_device_tensor_averager not assume the size of the tensors is
...
known at set() time.
2016-04-29 06:55:04 -04:00
Davis King
b85688acec
clarified spec
2016-04-29 06:54:30 -04:00
Davis King
1f0705ae92
clarified example
2016-04-28 19:41:27 -04:00
Davis King
7770225a88
Fixed a bug in gaussian_blur() that caused messed up outputs when big sigma
...
values were used on some pixel types.
2016-04-28 18:57:15 -04:00
Davis King
482d82db41
Added multi_device_tensor_averager
2016-04-27 21:50:31 -04:00
Davis King
d3f12d832c
Added more overloads of affine_transform()
2016-04-27 20:20:06 -04:00
Davis King
7d5fb9c60c
Added device_id() methods to gpu_data and tensor objects. These functions
...
allow you to find out which device owns the memory inside these objects.
2016-04-27 20:18:57 -04:00
Davis King
8ece542852
Made the cout and cerr redirection in mex files restore the state of the
...
streambufs before exiting.
2016-04-27 12:36:50 -04:00
Davis King
9f2f6146ec
merged
2016-04-27 08:50:23 -04:00
Davis King
339ac50d21
Fixed double counting of mini-batches for the purposes of solver termination
...
when multiple GPUs are used.
2016-04-27 08:49:02 -04:00
Davis King
0f180a68d6
Fixed bad random number generation in layer initialization.
2016-04-27 08:48:23 -04:00
Davis King
dfd9543cdb
Made the elastic_net inputs be in terms of trans(X)*X and trans(X)*Y rather
...
than raw X and Y matrices.
2016-04-26 10:24:19 -04:00