input_as_shape option for Filler ops

Summary: I couldn't find a way to fill a tensor with a shape provided at runtime, so I added an input_as_shape option to the filler ops. When input_as_shape is true, the input can be used to directly provide the shape of the output (this is different from the default behavior, where the output is reshaped like the input). For example if the input contains [2, 3], the output will have shape [2, 3]. Let me know if you see a simpler way :)

Reviewed By: Yangqing

Differential Revision: D4276872

fbshipit-source-id: 095e995d8bf302152765bd51c405185ef9952212
2 files changed
tree: 23ee074293136a6675f110874ee5bcc4f6b17d8d
  1. caffe/
  2. caffe2/
  3. docs/
  4. third_party/
  5. .Doxyfile
  6. .gitignore
  7. .gitmodules
  8. build.py
  9. build_android.py
  10. build_android_prepare.py
  11. LICENSE
  12. Makefile
  13. README.md
README.md

Caffe2

Caffe2 is a deep learning framework made with expression, speed, and modularity in mind. It is an experimental refactoring of Caffe, and allows a more flexible way to organize computation.

Read the installation instructions for installation details.

License and Citation

Caffe2 is released under the BSD 2-Clause license.