Matteo Salvarezza
Matteo Salvarezza
This script creates a `Loop` operator containing a `Squeeze` and an `Unsqueeze` in opset 12 (where they had a static `axes` attribute) and upgrades it to 13 (where the attribute...
This script creates a batchnorm and runs it 3 times: 1) A first test mode evaluation 2) A dummy training mode evaluation 3) A second test mode evaluation The outputs...
``` import mxnet as mx data = mx.np.array([[5, 8, 7, 3, 4]]) print("**************************** repeat with spec 3") print(mx.np.repeat(data, repeats=3, axis=1)) json = '{\"nodes\":[{\"op\":\"null\",\"name\":\"in\",\"inputs\":[]},{\"op\":\"_npi_repeats\",\"name\":\"_npi_repeats9\",\"attrs\":{\"axis\":\"1\",\"repeats\":\"(3,3,3,3,3)\"},\"inputs\":[[0,0,0]]}],\"arg_nodes\":[0],\"heads\":[[1,0,0]]}' sym = mx.sym.fromjson(json) cached_op = mx.ndarray.CachedOp(sym) print("****************************...
This script repeatedly runs a large convolution operator on the same input and checks memory allocation: ``` import mxnet as mx import os, psutil def get_memory_usage(): return psutil.Process(os.getpid()).memory_info().rss / 1e+6...
I bumped into this while investigating memory efficiency of v2.0 vs v1.6. I am building master branch (v2.0) from commit https://github.com/apache/incubator-mxnet/commit/fabcd145cd496628791f9f2ea813048360ac33ca and 1.x branch (v1.6) from commit https://github.com/apache/incubator-mxnet/commit/6eec9da55c5096079355d1f1a5fa58dcf35d6752 This script...
Building on Mac-ARM fails with some basic errors, the first one being: ``` /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/mmintrin.h:33:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'? __builtin_ia32_emms(); ^ ``` After a bit...
We have experienced problems with the mxnet library hanging at loading time on some Linux machines, specifically during the operator tuning phase (`mxnet::op::OperatorTune`). I don't have precise information about where...
``` import mxnet as mx json = "{\"nodes\":[{\"op\":\"null\",\"name\":\".Inputs.Input\",\"inputs\":[]\ },{\"op\":\"Reshape\",\"name\":\".Nodes.1$0\",\"attrs\":{\"shape\":\"(\ -3, -2)\"},\"inputs\":[[0,0,0]]},{\"op\":\"null\",\"name\":\".Nodes.1.\ Parameters.Net.Arrays.Weights\",\"inputs\":[]},{\"op\":\"null\",\"\ name\":\".Nodes.1.Parameters.Net.Arrays.Biases\",\"inputs\":[]},{\"op\ \":\"Convolution\",\"name\":\".Nodes.1.Parameters.Net\",\"attrs\":{\"\ cudnn_off\":\"0\",\"dilate\":\"(1, 1)\",\"kernel\":\"(1, \ 1)\",\"layout\":\"None\",\"no_bias\":\"False\",\"num_filter\":\"200\",\ \"num_group\":\"1\",\"pad\":\"(0, 0)\",\"stride\":\"(1, \ 1)\"},\"inputs\":[[1,0,0],[2,0,0],[3,0,0]]},{\"op\":\"reshape_like\",\ \"name\":\".Nodes.1$1\",\"attrs\":{\"lhs_begin\":\"0\",\"lhs_end\":\"\ 1\",\"rhs_begin\":\"0\",\"rhs_end\":\"2\"},\"inputs\":[[4,0,0],[0,0,0]\ ]},{\"op\":\"Reshape\",\"name\":\".Nodes.2$0\",\"attrs\":{\"shape\":\"\ (0, 2, 200)\"},\"inputs\":[[5,0,0]]},{\"op\":\"_copy\",\"name\":\".\ Outputs.Output\",\"inputs\":[[6,0,0]]}],\"arg_nodes\":[0,2,3],\"heads\ \":[[7,0,0]]}"...
This script creates an `RNN` operator and computes its input gradient 5 times for sequence lengths = 1, 2, 3, 4, 5. Then it shows each gradient element at a...
Currently Resize 12->13 uses [CompatibleAdapter](https://github.com/onnx/onnx/blob/main/onnx/version_converter/convert.h#L455), but that's wrong. The differences between Resize-12 (Resize-11 in the changelog) and Resize-13 are: * Resize-12 accepts `"tf_half_pixel_for_nn"` as a value for the `coordinate_transformation_mode` attribute,...