From 81beae3a870004795275e9266bc43d845b9f78db Mon Sep 17 00:00:00 2001 From: Matthew Sloyan Date: Tue, 13 Jul 2021 19:46:11 +0100 Subject: IVGCVSW-6119 ConstTensorsAsInput: FullyConnected * Constant weights and biases are now stored as Constant layers. * Updated Serializer, Deserializer and unit tests to reflect this. * Updated TfLiteDelegate, TfLiteParser and OnnxParser. * Updated Schema with IsConstant and ConstantTensorsAsInputs. * Updated Ref backend to handle constant weights and bias as inputs rather than reading from member variables. * Added dynamic or constant input EndToEnd tests. !android-nn-driver:5959 Signed-off-by: Matthew Sloyan Change-Id: Ibf3cf437df1100e4b322b0d303c575c6339f9696 --- src/armnnSerializer/ArmnnSchema.fbs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/armnnSerializer/ArmnnSchema.fbs') diff --git a/src/armnnSerializer/ArmnnSchema.fbs b/src/armnnSerializer/ArmnnSchema.fbs index a544161c53..85435a366f 100644 --- a/src/armnnSerializer/ArmnnSchema.fbs +++ b/src/armnnSerializer/ArmnnSchema.fbs @@ -69,6 +69,7 @@ table TensorInfo { quantizationDim:uint; dimensionality:uint = 1; dimensionSpecificity:[bool]; + isConstant:bool = false; } struct Connection { @@ -324,7 +325,7 @@ table FloorLayer{ table FullyConnectedLayer { base:LayerBase; descriptor:FullyConnectedDescriptor; - weights:ConstTensor; + weights:ConstTensor; // ConstTensors are now passed as inputs. biases:ConstTensor; } @@ -1007,6 +1008,7 @@ table AnyLayer { table FeatureCompatibilityVersions { bindingIdsScheme:uint = 0; weightsLayoutScheme:uint = 0; + constantTensorsAsInputs:uint = 0; } // Root type for serialized data is the graph of the network -- cgit v1.2.1