Commit Graph

70 Commits

Author SHA1 Message Date
Thomas Dudziak
d524d5b481 Fixes zip/izip for Python 3
Summary: As title

Reviewed By: salexspb

Differential Revision: D5154186

fbshipit-source-id: 2ef24557d82ae16d3bdfbc90a4cc96be8e2dc6c3
2017-06-07 00:04:26 -07:00
Thomas Dudziak
60c78d6160 Fixes range/xrange for Python 3
Summary: As title

Differential Revision: D5151894

fbshipit-source-id: 7badce5d3122e8f2526a7170fbdcf0d0b66e2638
2017-06-07 00:04:26 -07:00
Thomas Dudziak
47e921ba49 Remove map() and filter() in favor of comprehensions
Summary: These return views in Python 3 which would not do anything in a lot of usages currently present in Caffe2. This diff simply removes (almost) all usages of these two in Caffe2 and sub projects in favor of comprehensions which are also easier to read/understand

Reviewed By: akyrola

Differential Revision: D5142049

fbshipit-source-id: e800631d2df7d0823fed698cae46c486038007dc
2017-05-30 15:32:58 -07:00
Yiming Wu
64d43dbb6e new resnet building with brew
Summary: new resnet building with brew

Reviewed By: akyrola

Differential Revision: D4945418

fbshipit-source-id: d90463834cbba2c35d625053ba8812e192df0adf
2017-05-15 22:47:24 -07:00
Yury Zemlyanskiy
11052d03aa RNNCell API change: returns states and outputs
Summary:
Incorporating definition of cell's output and illustraing it's usage by adding dropout to all types of cell.

I think that we should try to get rid of aliases in RecurrentNetwork, so output of applied_over_sequence is also always (state_1_all, state_2_all, ...). This way we can merge get_output_from_single_step, get_output_from_sequence and get_outputs_with_grads into a single method

Let me know what do you think!

Reviewed By: jhcross

Differential Revision: D4992913

fbshipit-source-id: 737939be336ad145f84e8733cd255d4f7188ef70
2017-05-08 15:19:48 -07:00
Yury Zemlyanskiy
31643d5ecb Inference code for seq2seq model
Summary: Beam search implementation

Differential Revision: D4975939

fbshipit-source-id: 67d8b73390221583f36b4367f23626a2aa80f4b4
2017-05-02 22:47:28 -07:00
Yury Zemlyanskiy
12a024241a Move BeamSearchForwardOnly to OSS
Summary: Step 1 for inference code in OSS

Differential Revision: D4960547

fbshipit-source-id: 4c3121e5cb3c2402be08947c1e1afa0dd6eb921a
2017-04-27 13:35:53 -07:00
Jun Luan
95f123a83e fix download progress bar's percentage exceed 100%
Summary:
downloaded_size need to be added with the length of returned data_chunk.
When the last block's size less than chunk, the percentage should exceed 100%
Closes https://github.com/caffe2/caffe2/pull/329

Differential Revision: D4922227

Pulled By: Yangqing

fbshipit-source-id: 7d05d9bbf2dad0a9d330be96b60e658908185a46
2017-04-20 10:41:06 -07:00
Bram Wasti
04bd41a4f2 Downloader fix
Summary:
This fixes some bugs in the downloader.  TODO: fix the URL
Closes https://github.com/caffe2/caffe2/pull/255

Reviewed By: Yangqing

Differential Revision: D4851555

Pulled By: bwasti

fbshipit-source-id: 56d01617ccaddcd40b0fb8e4be137cb4c7a52e91
2017-04-07 10:16:58 -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
Bram Wasti
396ebb0546 exec_net --> predict_net
Summary: Change the naming convention back for maintainability.

Reviewed By: Yangqing

Differential Revision: D4741875

fbshipit-source-id: 044051e772383e81812ae7064a921e97d63615dc
2017-03-23 16:31:49 -07:00
Bram Wasti
c7ed091633 Added model downloader
Summary: Closes https://github.com/caffe2/caffe2/pull/156

Reviewed By: Yangqing

Differential Revision: D4574588

Pulled By: bwasti

fbshipit-source-id: a0f2da0b13358157c7d7322257a9c4f1c61aae12
2017-02-22 12:47:15 -08:00
Sean Snyder
79c04d32dc add an option to use a resnet network instead of alexnet
Summary: add an option to use a resnet network instead of alexnet. Modified the resnet.create_resnet50 function slightly to allow specifying different kernel/stride parameters so we can adapt resnet to our image size.

Differential Revision: D4472535

fbshipit-source-id: ed06acf52f6425a1e04d047548eb3c70388d74aa
2017-01-31 16:59:30 -08:00
Aapo Kyrola
e18643f90b More fixes
Summary:
When testing the code, a couple of issues arised:
 - we need to have different name for last layer than the preprocessed model, otherwise a shape assertion is created
 - preprocess_noaugmentation still needs to do a crop for images larger than 227x227, otherwise things fail.

Reviewed By: viswanathgs

Differential Revision: D4442700

fbshipit-source-id: 05f54e7f17c266280f5ba5bb57af1721fe30df12
2017-01-20 13:44:24 -08:00
Aapo Kyrola
afe822ebd7 Small tweaks
Summary:
Some tweaks, hopefully getting us to 0.98 MAP
- no cropping for test dataset (as per patrick)
- spatialBN momentum 0.1 (default is 0.9)

Also added some additional logging and reduced frequency of running of test net and logging.

Reviewed By: viswanathgs

Differential Revision: D4439790

fbshipit-source-id: 700705b811a5fc8c7139a265de96db646605ca5a
2017-01-19 18:44:26 -08:00
Aapo Kyrola
bb928f3cc0 Latest fixes to Xray Flow workflows for Caffe2
Summary:
(Ignore the convolution-op related changes, they will be later patched separately)

This diff ignores work from latest few weeks:
- some refactoring of the flow ops
- no_bias setting
- MAP computation (instead of accuracy) for OC
- adaptive learning rate for Xray concepts
- various small bug fixes

Reviewed By: viswanathgs

Differential Revision: D4329500

fbshipit-source-id: 000d4fd22ec408af5290480c788eb86546bff52e
2017-01-10 12:59:23 -08:00
Aapo Kyrola
d37fffd257 use in-place ReLu to safe a lot of memory
Summary: Reading Torch docs about Resnets, and soumith's comment,  they mention significant memory-saving with in-place ReLu. prigoyal already had this in her code, but I did not. This saves memory a lot: 9851 MiB -> 7497 MiB.

Reviewed By: prigoyal

Differential Revision: D4346100

fbshipit-source-id: e9c5d5e93787f47487fade668b65b9619bfc9741
2016-12-19 09:29:26 -08:00
Aapo Kyrola
eddf23ca0f Handle parameters that are computed but not optimized
Summary:
prigoyal sharply noticed a bug in the Resnet models: we have not been checkpointing, nor synchronizing between gpus, the moving average and variance computed by the SpatialBN ops.  Particularly the first problen is serious, since models starting from checkpoint would have started from a null-state for SpatialBN. Not synchronizing with the data parallel model is less tragic since each GPU should see very similar data.

Thus I propose keeping track of "computed params", i.e params that are computed from data but not optimized. I don't know if there are other examples, but SpatialBN's moving avg and var definitely are one.

- I modified the checkpointign for xray model to store those blobs + also ensure the synchronization of those blobs
- I modified data parallel model to broadcast those params from gpu0. I first tried averaging, but hit some NCCL deadlocks ... :(

Differential Revision: D4281265

fbshipit-source-id: 933311afeec4b7e9344a13cf2d38aa939c50ac31
2016-12-15 12:01:28 -08:00
Yangqing Jia
238ceab825 fbsync. TODO: check if build files need update. 2016-11-15 00:00:46 -08:00
Yangqing Jia
d1e9215184 fbsync 2016-10-07 13:08:53 -07:00