Commit Graph

18 Commits

Author SHA1 Message Date
Kittipat Virochsiri
a790256537 Add option to control the size of lengths tensor
Summary: This would allow us to pin the size of lengths tensor to the batch size. I'll use this in a follow up diff.

Reviewed By: kennyhorror

Differential Revision: D4906634

fbshipit-source-id: 8d3d151f33fd99547d9940e7c663779810283eb6
2017-04-20 09:53:22 -07:00
Aaron Markham
58f7f2b441 doxygen python block added
Summary: Closes https://github.com/caffe2/caffe2/pull/226

Differential Revision: D4793550

Pulled By: JoelMarcey

fbshipit-source-id: cc33e58186304fa8dcac2ee9115dcc271d785b1e
2017-03-29 06:46:16 -07:00
James Cross
c5621ded31 Allow use of ReversePackedSegs operator in CUDA context
Summary: ReversePackedSegs operator for CUDA. Input "lengths" (static integers) required to be in CPU memory.

Differential Revision: D4661281

fbshipit-source-id: c800c316c34015ba8e732dcbcaa8c4edaffdfeab
2017-03-09 15:03:55 -08:00
Aapo Kyrola
d8588d8007 CUDA version of elementwise power + rename to Pow + gradient
Summary: Renamed ElementwisePower to Pow for better discoverability. Added CUDA version and Gradient + tests.

Reviewed By: kennyhorror

Differential Revision: D4665550

fbshipit-source-id: dd33d8ad3917d71504e363ab397af50d38a63b1f
2017-03-07 10:20:40 -08:00
Andrew Dye
b6fbc708f5 Verify InferShapesAndTypes() in operator unittests
Summary:
Verify shape and type inference in op unittests via assertReferenceChecks(). For now catch exceptions from InferShapeAndTypes() and log a warning.

TBD: Determine if there existing inference/output mismatches, and if so, change test asserts to warnings until they are resolved.

Differential Revision: D4639343

fbshipit-source-id: 605e72f53198e1a100fe7ba18b72c34c9ddbb727
2017-03-02 20:18:59 -08:00
Yury Zemlyanskiy
4a53ab3cb6 LSTMWithAttention implementation in Caffe2
Summary:
Implementation of ##LSTMWithAttention##

Still TBD:
1. There are problems with back propagation, because gradient is not implemented for ops with broadcasting
2. I need to make initial_recurrent_state to be of shape [dim] rather than [1, batch_size, dim], so one doesn't need to provide batch_size to LSTMWithAttention

Differential Revision: D4298735

fbshipit-source-id: 8903fcff4d6a66647ee6d45a6ef28803fc3091e5
2017-02-23 04:08:34 -08:00
Artem Volkhin
45e1905722 add support of fp16 to SparseLengthsSum and SparseLengthsMean
Summary: Another part of making DPER compatible with half-floats. This diffs adds supoprt of fp16 to segment reduction operators used in DPER.

Reviewed By: dzhulgakov

Differential Revision: D4587560

fbshipit-source-id: 0ae10648a7286a820bffaee802464dd9464584bc
2017-02-22 11:05:55 -08:00
Yury Zemlyanskiy
280718b40c Allow non-batched initial recurrent states for RecurrentNetworkOp
Summary: title

Reviewed By: salexspb

Differential Revision: D4493728

fbshipit-source-id: a9ba25bd325b413ed15c35754afb9ed562b1a60c
2017-02-06 15:01:36 -08:00
Yury Zemlyanskiy
debd256177 Fix for gradient propagation for initial recurrent state for RecurrentNetwork
Summary: looks like we don't a good job with initial recurrent input gradients yet. Here is some fix, but gradient doesn't check yet. The shape is correct now though

Reviewed By: salexspb

Differential Revision: D4475447

fbshipit-source-id: 280f1f59f19e487fd0dce0d440609c50ddce294a
2017-01-30 18:59:32 -08:00
Andrew Tulloch
0f870d4f40 Add error checking for too-small input in ConvPoolOpBase
Summary: Fixes segfaults that occur in Eigen and im2col/sgemm backends.

Reviewed By: Yangqing

Differential Revision: D4451772

fbshipit-source-id: 3cf21e5afb2fe300db4228933a82063db5f7091f
2017-01-25 17:44:22 -08:00
Alexander Sidorov
f09da676d7 CNNModelHelper.LSTM test
Summary:
lets have a test for this so we don't break existing usecases
while iterating over RecurrentOp's code

Reviewed By: urikz

Differential Revision: D4456404

fbshipit-source-id: 79f2b88c1eed16106adf5b793b4c74441c7146c6
2017-01-24 15:59:24 -08:00
Yangqing Jia
589398950f fbsync at f5a877 2016-11-18 15:41:06 -08:00
Yangqing Jia
d1e9215184 fbsync 2016-10-07 13:08:53 -07:00
Yangqing Jia
b23e51d467 chunky sync 2016-09-06 15:55:19 -07:00
Yangqing Jia
05512d1e10 sync 2016-08-10 11:02:15 -07:00
Yangqing Jia
bcea409c82 sync 2016-07-28 15:06:43 -07:00
Yangqing Jia
6463eebc7b chunky sync - build scripts to be written 2016-07-21 10:16:42 -07:00
Yangqing Jia
559053d3a8 chunky sync 2016-05-13 14:43:48 -07:00