pytorch/caffe2/python
Wenyi Huang d8dfaeeef7 Add batch-based/row-based sparse from/to dense operator
Summary:
Two ops: BatchSparseToDenseOp and DenseToBatchSparseOp
Inverse operations of each other.

Details are described in op Doc

These op is used along with flexible topK, where the output is
lengths, indices, and values.
We want to do softmax on the values, but the dimension of each batch is different. So these op will convert sparse representation to dense and vice versa. The two ops are also gradient op for each other.

Reviewed By: chocjy

Differential Revision: D6288338

fbshipit-source-id: 0ba9e611058b39e46e7414dcc5f39cab29915fa3
2017-11-16 00:59:21 -08:00
..
docs Re-license to Apache 2017-09-28 16:22:00 -07:00
examples Fix LoadModel() in resnet50_trainer 2017-11-03 11:15:25 -07:00
helpers Updated brew SpatialBN to use initializers 2017-11-02 11:25:45 -07:00
layers add Mean Pooling distributed support 2017-11-14 17:30:31 -08:00
mint Re-license to Apache 2017-09-28 16:22:00 -07:00
mkl disable sbn running mean and var comp 2017-11-13 12:09:08 -08:00
modeling Added inverted FP16 Initializer 2017-10-27 10:20:04 -07:00
models penalty for EOS successor 2017-11-14 21:46:56 -08:00
operator_test Add batch-based/row-based sparse from/to dense operator 2017-11-16 00:59:21 -08:00
predictor Add a EmptyDeviceScope (i.e. allow setting CurrentDeviceScope() to None) 2017-11-02 11:25:48 -07:00
rnn Re-license to Apache 2017-09-28 16:22:00 -07:00
test Polling async net executor 2017-11-03 07:27:44 -07:00
_import_c_extension.py Re-license to Apache 2017-09-28 16:22:00 -07:00
allcompare_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
attention.py Re-license to Apache 2017-09-28 16:22:00 -07:00
benchmark_generator.py Re-license to Apache 2017-09-28 16:22:00 -07:00
binarysize.py Re-license to Apache 2017-09-28 16:22:00 -07:00
brew.py Re-license to Apache 2017-09-28 16:22:00 -07:00
brew_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
build.py Expose CMake options in the binary 2017-10-04 02:33:02 -07:00
cached_reader.py Cached reader 2017-11-15 12:38:49 -08:00
caffe_translator.py Translating Crop to Slice 2017-10-03 17:18:32 -07:00
caffe_translator_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
checkpoint.py Write checkpoint info to XDB at the end of an epoch 2017-11-09 11:13:24 -08:00
checkpoint_test.py Fixes the checkpoint test. 2017-10-26 13:18:21 -07:00
CMakeLists.txt
cnn.py Re-license to Apache 2017-09-28 16:22:00 -07:00
context.py Re-license to Apache 2017-09-28 16:22:00 -07:00
context_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
control.py Re-license to Apache 2017-09-28 16:22:00 -07:00
control_ops_grad.py Re-license to Apache 2017-09-28 16:22:00 -07:00
control_ops_util.py Re-license to Apache 2017-09-28 16:22:00 -07:00
control_test.py Revert D6026557: [caffe2][PR] Fix "No handlers could be found for logger" 2017-10-12 20:21:52 -07:00
convnet_benchmarks.py Re-license to Apache 2017-09-28 16:22:00 -07:00
convnet_benchmarks_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
core.py Make a concrete function for device_option equality 2017-11-13 15:17:06 -08:00
core_gradients_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
core_test.py Make a concrete function for device_option equality 2017-11-13 15:17:06 -08:00
crf.py Re-license to Apache 2017-09-28 16:22:00 -07:00
data_parallel_model.py fix dynamic memory management for distributed execution 2017-11-13 12:09:11 -08:00
data_parallel_model_test.py fix memonger after D5994548 2017-10-12 17:36:27 -07:00
data_workers.py Remove order by clause if it is not needed. Increasing timeout from 10mins to 2017-10-31 14:51:39 -07:00
data_workers_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
dataio.py Re-license to Apache 2017-09-28 16:22:00 -07:00
dataio_test.py Cached reader 2017-11-15 12:38:49 -08:00
dataset.py Re-license to Apache 2017-09-28 16:22:00 -07:00
db_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
device_checker.py Re-license to Apache 2017-09-28 16:22:00 -07:00
dyndep.py Re-license to Apache 2017-09-28 16:22:00 -07:00
embedding_generation_benchmark.py Re-license to Apache 2017-09-28 16:22:00 -07:00
experiment_util.py Re-license to Apache 2017-09-28 16:22:00 -07:00
extension_loader.py Re-license to Apache 2017-09-28 16:22:00 -07:00
functional.py Re-license to Apache 2017-09-28 16:22:00 -07:00
functional_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
gradient_check_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
gradient_checker.py Re-license to Apache 2017-09-28 16:22:00 -07:00
gru_cell.py Integrated GRU implementation into C2 2017-11-14 16:18:50 -08:00
hsm_util.py Re-license to Apache 2017-09-28 16:22:00 -07:00
hypothesis_test.py Switch RNNOp to use NetDef argument for step represenetation. 2017-10-10 22:01:51 -07:00
hypothesis_test_util.py Add check for Travis in executor test 2017-10-05 11:40:23 -07:00
layer_model_helper.py Add shape checks and print more info in parameter sharing 2017-10-27 01:22:06 -07:00
layer_model_instantiator.py Re-license to Apache 2017-09-28 16:22:00 -07:00
layer_parameter_sharing_test.py Add shape checks and print more info in parameter sharing 2017-10-27 01:22:06 -07:00
layer_test_util.py Re-license to Apache 2017-09-28 16:22:00 -07:00
layers_test.py Add rank loss for retrieval models with random negative sample 2017-10-25 16:19:41 -07:00
lengths_reducer_rowwise_8bit_ops_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
load_save_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
lstm_benchmark.py Re-license to Apache 2017-09-28 16:22:00 -07:00
memonger.py Revert D6026557: [caffe2][PR] Fix "No handlers could be found for logger" 2017-10-12 20:21:52 -07:00
memonger_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
mkl_test_util.py Re-license to Apache 2017-09-28 16:22:00 -07:00
model_device_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
model_helper.py Fix: ClearField only accepts string as field name 2017-10-13 10:57:34 -07:00
modifier_context.py Re-license to Apache 2017-09-28 16:22:00 -07:00
mpi_python.cc Upgrade to 2.2.1 2017-10-22 13:26:56 -07:00
muji.py Re-license to Apache 2017-09-28 16:22:00 -07:00
muji_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
net_builder.py Minor documentation fix in NetBuiler 2017-11-15 16:22:22 -08:00
net_builder_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
net_drawer.py Revert D6026557: [caffe2][PR] Fix "No handlers could be found for logger" 2017-10-12 20:21:52 -07:00
net_printer.py Unit test that compares net snippets after parallelization 2017-11-08 15:55:27 -08:00
net_printer_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
observer_test.py Attach observers to operators inside step net 2017-11-14 15:06:38 -08:00
optimizer.py Support RMSProp in Caffe2. 2017-11-08 16:43:18 -08:00
optimizer_context.py Re-license to Apache 2017-09-28 16:22:00 -07:00
optimizer_test.py Support RMSProp in Caffe2. 2017-11-08 16:43:18 -08:00
optimizer_test_util.py momentum sgd 2017-11-03 16:17:17 -07:00
parallel_workers.py Revert D6026557: [caffe2][PR] Fix "No handlers could be found for logger" 2017-10-12 20:21:52 -07:00
parallel_workers_test.py Add shutdown_fun to parallel_workers 2017-10-10 12:02:24 -07:00
parallelize_gpu_bmuf_distributed_test.py Revert D6026557: [caffe2][PR] Fix "No handlers could be found for logger" 2017-10-12 20:21:52 -07:00
pipeline.py Re-license to Apache 2017-09-28 16:22:00 -07:00
pipeline_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
predictor_constants.py Re-license to Apache 2017-09-28 16:22:00 -07:00
pybind_state.cc Attach observers to operators inside step net 2017-11-14 15:06:38 -08:00
pybind_state.h Polling async net executor 2017-11-03 07:27:44 -07:00
pybind_state_gpu.cc Upgrade to 2.2.1 2017-10-22 13:26:56 -07:00
pybind_state_mkl.cc Re-license to Apache 2017-09-28 16:22:00 -07:00
python_op_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
queue_util.py Re-license to Apache 2017-09-28 16:22:00 -07:00
record_queue.py Re-license to Apache 2017-09-28 16:22:00 -07:00
recurrent.py Switch RNNOp to use NetDef argument for step represenetation. 2017-10-10 22:01:51 -07:00
regularizer.py Re-license to Apache 2017-09-28 16:22:00 -07:00
regularizer_context.py Re-license to Apache 2017-09-28 16:22:00 -07:00
rnn_cell.py Disable cudnn dropout 2017-10-04 17:24:09 -07:00
schema.py Revert D6026557: [caffe2][PR] Fix "No handlers could be found for logger" 2017-10-12 20:21:52 -07:00
schema_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
scope.py Add a EmptyDeviceScope (i.e. allow setting CurrentDeviceScope() to None) 2017-11-02 11:25:48 -07:00
scope_test.py Add a EmptyDeviceScope (i.e. allow setting CurrentDeviceScope() to None) 2017-11-02 11:25:48 -07:00
session.py Re-license to Apache 2017-09-28 16:22:00 -07:00
session_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
sparse_to_dense_mask_test.py Skip negative indices 2017-10-09 16:09:50 -07:00
task.py Re-license to Apache 2017-09-28 16:22:00 -07:00
test_util.py Re-license to Apache 2017-09-28 16:22:00 -07:00
text_file_reader.py Re-license to Apache 2017-09-28 16:22:00 -07:00
timeout_guard.py Re-license to Apache 2017-09-28 16:22:00 -07:00
toy_regression_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
tt_core.py Re-license to Apache 2017-09-28 16:22:00 -07:00
tt_core_test.py Re-license to Apache 2017-09-28 16:22:00 -07:00
utils.py Re-license to Apache 2017-09-28 16:22:00 -07:00
visualize.py Re-license to Apache 2017-09-28 16:22:00 -07:00
workspace.py Add ONNX exporter for glcgan 2017-11-14 10:09:44 -08:00
workspace_test.py expose flop annotation to python 2017-10-24 11:35:24 -07:00