docs and noop
MODIFY
ane/1_build/coreml_ane.py
ane/1_build/coreml_ane.py
@@ -13,8 +13,8 @@ builder = NeuralNetworkBuilder(input_features, output_features)
builder.add_inner_product(name='ip_layer', W=weights, b=None, input_channels=3, output_channels=3, has_bias=False, input_name='image', output_name='med')
#builder.add_inner_product(name='ip_layer_2', W=weights, b=None, input_channels=3, output_channels=3, has_bias=False, input_name='med', output_name='probs')
#builder.add_elementwise(name='element', input_names=['med', 'med'], output_name='probs', mode='ADD')
-#builder.add_bias(name='bias', b=bias, input_name='med', output_name='probs', shape_bias=(3,))
-builder.add_activation(name='act_layer', non_linearity='SIGMOID', input_name='med', output_name='probs')
+builder.add_bias(name='bias', b=bias, input_name='med', output_name='probs', shape_bias=(3,))
+#builder.add_activation(name='act_layer', non_linearity='SIGMOID', input_name='med', output_name='probs')
# compile the spec
mlmodel = ct.models.MLModel(builder.spec)

MODIFY
ane/2_compile/hwx_parse.py
ane/2_compile/hwx_parse.py
@@ -44,7 +44,7 @@ def compare(x, y):
a = "%02X" % x[i] if i < len(x) else "--", \
"%02X" % y[i] if i < len(y) else "--"
if i!=0 and i%0x10 == 0:
- ss.append("%8X: " % i+' '.join(ln)+" "+' '.join(ln2)+"\n")
+ ss.append("%8X: " % (i-0x10)+' '.join(ln)+" "+' '.join(ln2)+"\n")
ln = []
ln2 = []
if a[0] != a[1] and a[0] != "--" and a[1] != "--":

MODIFY
ane/2_compile/min.plist
ane/2_compile/min.plist
</array>
<key>Units</key>
<array>
- <string>conv_layer</string>
+ <string>my_layer</string>
</array>
<key>Outputs</key>
<array>
<string>Float16</string>
</dict>
- <!-- comment? -->
- <key>conv_layer</key>
+ <key>my_layer</key>
<dict>
<key>Bottom</key>
<string>image</string>
<key>Name</key>
- <string>conv_layer</string>
+ <string>my_layer</string>
<key>OutputChannels</key>
<integer>3</integer>
<key>OutputType</key>
<key>KernelWidth</key>
<integer>1</integer>
- <!-- where to get the weight from -->
<key>KernelIndex</key>
<integer>0</integer>
<key>KernelOffset</key>
<key>probs@output</key>
<dict>
<key>Bottom</key>
- <string>conv_layer</string>
+ <string>my_layer</string>
<key>OutputPlaneStride</key>
<integer>64</integer>
<key>OutputRowStride</key>

ADD
ane/2_compile/noop.plist
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Networks</key>
+ <array>
+ <string>net</string>
+ </array>
+ <key>Version</key>
+ <string>1.0.9</string>
+ <key>net</key>
+ <dict>
+ <!-- This is a one layer network -->
+ <key>Inputs</key>
+ <array>
+ <string>image</string>
+ </array>
+ <key>Units</key>
+ <array>
+ <string>my_layer</string>
+ </array>
+ <key>Outputs</key>
+ <array>
+ <string>probs@output</string>
+ </array>
+
+ <key>image</key>
+ <dict>
+ <!-- default is 1 -->
+ <key>BatchSize</key>
+ <integer>1</integer>
+
+ <key>InputChannels</key>
+ <integer>3</integer>
+ <key>InputHeight</key>
+ <integer>1</integer>
+ <key>InputWidth</key>
+ <integer>1</integer>
+
+ <key>InputPlaneStride</key>
+ <integer>64</integer>
+ <key>InputRowStride</key>
+ <integer>64</integer>
+ <key>InputType</key>
+ <string>Float16</string>
+ </dict>
+
+ <key>my_layer</key>
+ <dict>
+ <key>Bottom</key>
+ <string>image</string>
+ <key>Name</key>
+ <string>my_layer</string>
+ <key>OutputType</key>
+ <string>Float16</string>
+ <key>Params</key>
+ <dict>
+ <key>ReshapedBatch</key>
+ <integer>1</integer>
+ <key>ReshapedChannel</key>
+ <integer>3</integer>
+ <key>ReshapedDepth</key>
+ <integer>1</integer>
+ <key>ReshapedHeight</key>
+ <integer>1</integer>
+ <key>ReshapedWidth</key>
+ <integer>1</integer>
+ </dict>
+ <key>Type</key>
+ <string>Reshape</string>
+ </dict>
+
+ <key>probs@output</key>
+ <dict>
+ <key>Bottom</key>
+ <string>my_layer</string>
+ <key>OutputPlaneStride</key>
+ <integer>64</integer>
+ <key>OutputRowStride</key>
+ <integer>64</integer>
+ </dict>
+
+ </dict>
+</dict>
+</plist>

MODIFY
ane/README
ane/README
@@ -62,29 +62,30 @@ kZinTensorFormatInvalid
== min.plist ==
-Types: GOC, Conv, Broadcast, ScaledElementWise
+Types: GOC, Conv, Broadcast, ScaledElementWise, Reshape, InputView
-< conv op @ 0x140 >
-u32 0x140 = (OutputType * 0x10) | InputType
-u32 0x144 = InputChannels
-u32 0x148 = OutputChannels
-u16 0x15C = BatchSize
+ops have length 0x300
-u32 0x188 = InputRowStride
-u32 0x18C = InputPlaneStride
-u32 0x190 = (InputPlaneStride * InputChannels)
+u32 0x130 = (OutputType * 0x10) | InputType
+u32 0x134 = InputChannels
+u32 0x138 = OutputChannels
+u16 0x14C = BatchSize
-u32 0x204 = InputChannels * 0x10
-u32 0x208 = InputChannels * 0x10
+u32 0x178 = InputRowStride
+u32 0x17C = InputPlaneStride
+u32 0x180 = (InputPlaneStride * InputChannels)
-u32 0x230 = OutputChannels * 0x10
-u32 0x234 = OutputChannels * 0x10
+u32 0x1F4 = InputChannels * 0x10
+u32 0x1F8 = InputChannels * 0x10
-u32 0x250 = 0x80 | KernelType
+u32 0x220 = OutputChannels * 0x10
+u32 0x224 = OutputChannels * 0x10
-u32 0x270 = OutputRowStride
-u32 0x274 = OutputPlaneStride
-u32 0x278 = (OutputPlaneStride * OutputChannels)
+u32 0x240 = 0x80 | KernelType
+
+u32 0x260 = OutputRowStride
+u32 0x264 = OutputPlaneStride
+u32 0x268 = (OutputPlaneStride * OutputChannels)
== plist exploration ==

docs and noop