diff --git a/docs/faq.md b/docs/faq.md index 099a791b63a0bcd64e767e999f0327bb46dff732..bb66e9a436301b36274388042dc2ec72ba6dcf8c 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -29,6 +29,10 @@ avoiding C++ iostream, hidden internal functions etc. In most cases, the expected overhead should be less than {model weights size in float32}/2 + 3MB. +How to set the input shape in your model deployment file(.yml) when your model support multiple input shape? +------------------------------------------------------------------------------------------------------------ +Set the largest input shape of your model. The input shape is used for memory optimization. + OpenCL allocator failed with CL_OUT_OF_RESOURCES ------------------------------------------------ OpenCL runtime usually requires continuous virtual memory for its image buffer, diff --git a/docs/user_guide/advanced_usage.rst b/docs/user_guide/advanced_usage.rst index 13c3c211a30f40f52b12c69af7f7a69f4602b158..2163c44c1563e35404cf51eadd36c27f717969d0 100644 --- a/docs/user_guide/advanced_usage.rst +++ b/docs/user_guide/advanced_usage.rst @@ -401,28 +401,29 @@ Reduce Library Size * Remove the unused ops. Remove the registration of the ops unused for your models in the ``mace/ops/ops_register.cc``, which will reduce the library size significantly. the final binary just link the registered ops' code. -``` -#include "mace/ops/ops_register.h" -namespace mace { -namespace ops { -// Just leave the ops used in your models +.. code:: cpp -... + #include "mace/ops/ops_register.h" -} // namespace ops + namespace mace { + namespace ops { + // Just leave the ops used in your models + ... -OpRegistry::OpRegistry() : OpRegistryBase() { -// Just leave the ops used in your models + } // namespace ops - ... - ops::RegisterMyCustomOp(this); + OpRegistry::OpRegistry() : OpRegistryBase() { + // Just leave the ops used in your models - ... + ... -} + ops::RegisterMyCustomOp(this); -} // namespace mace -``` + ... + + } + + } // namespace mace