(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 11.1' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 498746, 9658] NotebookOptionsPosition[ 493162, 9559] NotebookOutlinePosition[ 493496, 9574] CellTagsIndexPosition[ 493453, 9571] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Construction Notebook for:", FontSize->24], "\nCapsNet Trained on MNIST Data" }], "Title", CellChangeTimes->{{3.700390059931024*^9, 3.700390069370269*^9}, { 3.713527335930427*^9, 3.71352733920855*^9}, {3.725196329204988*^9, 3.7251963296657867`*^9}, 3.725709769145364*^9, 3.725975379788035*^9, 3.725979717913773*^9, {3.729430915767581*^9, 3.729430920312129*^9}},ExpressionUUID->"cf0af03b-7c0d-44fe-a36a-\ 801fb2cc9d1e"], Cell[CellGroupData[{ Cell["NetModel Access", "Subsection", CellChangeTimes->{{3.695474314080426*^9, 3.695474346087426*^9}},ExpressionUUID->"20a938bc-d1c4-4bd6-a5fd-\ 63b43d74e3fb"], Cell[CellGroupData[{ Cell["This Notebook", "Subsubsection", CellChangeTimes->{{3.6954750910664797`*^9, 3.695475092737351*^9}},ExpressionUUID->"aece8991-ede8-4c4f-b8b7-\ d3deda75843b"], Cell[BoxData[ RowBox[{"NetModel", "[", RowBox[{ "\"\\"", ",", "\"\\""}], "]"}]], "Input", CellChangeTimes->{{3.696656935596855*^9, 3.6966569364445457`*^9}, 3.696768427361453*^9, 3.696768595763381*^9, 3.700390080550715*^9, 3.713527332938039*^9, 3.7251895368569007`*^9, 3.7257097745186977`*^9, { 3.725974160027033*^9, 3.7259741712693043`*^9}, 3.7259797223664417`*^9, { 3.7294309246087093`*^9, 3.729430925323285*^9}},ExpressionUUID->"f9e334a7-6b84-4b97-a015-\ 364f975bd6c8"] }, Open ]], Cell[CellGroupData[{ Cell["Training Net", "Subsubsection", CellChangeTimes->{{3.6954750978333807`*^9, 3.695475133273511*^9}, { 3.731075591892523*^9, 3.731075592692441*^9}},ExpressionUUID->"278efdc3-d956-4587-8723-\ 2a3485f9bac0"], Cell[BoxData[ RowBox[{"NetModel", "[", RowBox[{ "\"\\"", ",", "\"\\""}], "]"}]], "Input", CellChangeTimes->{{3.696656940213286*^9, 3.6966569411083603`*^9}, 3.6967685960955133`*^9, 3.700390083629743*^9, {3.713527345914727*^9, 3.713527346642221*^9}, {3.7251895437188444`*^9, 3.725189544052307*^9}, { 3.7257097811399565`*^9, 3.725709791683883*^9}, 3.7259741741281953`*^9, 3.725979726480075*^9, {3.7294309272885857`*^9, 3.7294309280489798`*^9}, { 3.7310755946054907`*^9, 3.731075595860874*^9}},ExpressionUUID->"4997fe3c-81ac-42f4-9497-\ 390d3d9b0fce"] }, Open ]], Cell[CellGroupData[{ Cell["Trained Net", "Subsubsection", CellChangeTimes->{{3.6954751072255173`*^9, 3.6954751086815357`*^9}},ExpressionUUID->"71c6cef7-94d1-4660-857a-\ d6696698fd69"], Cell[BoxData[ RowBox[{"NetModel", "[", "\"\\"", "]"}]], "Input", CellChangeTimes->{{3.6966569441649303`*^9, 3.696656946349728*^9}, 3.696768596439824*^9, 3.70039008606037*^9, 3.713527350999201*^9, 3.725189549129289*^9, 3.725709788369228*^9, 3.725974177559237*^9, 3.725979728776238*^9, {3.7294309301845303`*^9, 3.72943093089148*^9}},ExpressionUUID->"908d5d25-3cee-40c2-a5c9-\ 2b89750c8f92"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Net Construction", "Section", CellChangeTimes->{ 3.695625386014464*^9},ExpressionUUID->"e6f0ec16-daa9-4151-8b11-\ 649c83fbd9a1"], Cell[CellGroupData[{ Cell["Intermediate Functions", "Subsection", CellChangeTimes->{{3.7251952635053062`*^9, 3.7251952804601765`*^9}},ExpressionUUID->"075f3fef-d0b5-4896-9f18-\ 27f1ae7779eb"], Cell["\<\ The squashing function rescales a vector so that its norm is between 0 and 1:\ \ \>", "Text", CellChangeTimes->{{3.7283713519220943`*^9, 3.728371366586268*^9}, { 3.7283716579878397`*^9, 3.728371660219677*^9}, {3.729431666623828*^9, 3.729431677879814*^9}},ExpressionUUID->"8fd8eddc-ad94-4e6e-a2cd-\ 646a03eb7705"], Cell[BoxData[ RowBox[{ RowBox[{"squash", "=", RowBox[{"NetGraph", "[", RowBox[{ RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"ElementwiseLayer", "[", RowBox[{ RowBox[{"#", "^", "2"}], "&"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"AggregationLayer", "[", "Total", "]"}], ",", "\[IndentingNewLine]", RowBox[{"ElementwiseLayer", "[", RowBox[{ RowBox[{ RowBox[{"Sqrt", "[", "#", "]"}], "/", RowBox[{"(", RowBox[{"1", "+", "#"}], ")"}]}], "&"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"ReplicateLayer", "[", RowBox[{"Automatic", ",", "2"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"ThreadingLayer", "[", "Times", "]"}]}], "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"NetPort", "[", "\"\\"", "]"}], "\[Rule]", RowBox[{"1", "\[Rule]", RowBox[{"2", "\[Rule]", RowBox[{"3", "\[Rule]", RowBox[{"4", "\[Rule]", "5"}]}]}]}]}], ",", RowBox[{ RowBox[{"NetPort", "[", "\"\\"", "]"}], "\[Rule]", "5"}]}], "}"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{ 3.7294310491426*^9, {3.729431401648553*^9, 3.729431402293125*^9}}, CellLabel->"In[1]:=",ExpressionUUID->"cbac4d5d-63a0-4539-9313-7250a189ce3b"], Cell[TextData[{ "The capsuleLayer takes the ", Cell[BoxData[ FormBox[ OverscriptBox["u", "\[And]"], TraditionalForm]], FormatType->"TraditionalForm", FontWeight->"Bold",ExpressionUUID->"f0d7a961-779e-4eb3-b0df-7e96d22769b9"], " prediction vectors and the flattened ", StyleBox["b", FontWeight->"Bold"], " parameters to produce the squashed output ", StyleBox["v:", FontWeight->"Bold"] }], "Text", CellChangeTimes->{{3.728996611222272*^9, 3.728996693583775*^9}, 3.729431688977562*^9, {3.729431723370409*^9, 3.729431749087792*^9}, { 3.729431804758519*^9, 3.7294318261028423`*^9}},ExpressionUUID->"e3c127e8-82c8-4941-b7c7-\ 53cc0c5b62e8"], Cell[BoxData[ RowBox[{ RowBox[{"capsuleLayer", "[", RowBox[{"numCapsulesIn_", ",", "numCapsulesOut_"}], "]"}], ":=", RowBox[{"NetGraph", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"<|", "\[IndentingNewLine]", RowBox[{ RowBox[{"\"\\"", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"ReshapeLayer", "[", RowBox[{"{", RowBox[{"numCapsulesIn", ",", "numCapsulesOut"}], "}"}], "]"}], ",", RowBox[{"SoftmaxLayer", "[", "]"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"NetGraph", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ReplicateLayer", "[", RowBox[{"Automatic", ",", "3"}], "]"}], ",", RowBox[{"ThreadingLayer", "[", "Times", "]"}], ",", RowBox[{"AggregationLayer", "[", RowBox[{"Total", ",", "1"}], "]"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"NetPort", "[", "\"\\"", "]"}], "\[Rule]", RowBox[{"1", "\[Rule]", RowBox[{"2", "\[Rule]", "3"}]}]}], ",", RowBox[{ RowBox[{"NetPort", "[", "\"\\"", "]"}], "\[Rule]", "2"}]}], "}"}]}], "\[IndentingNewLine]", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", "squash"}]}], "\[IndentingNewLine]", "|>"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"NetPort", "[", "\"\\"", "]"}], "\[Rule]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"NetPort", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}]}]}], ",", RowBox[{ RowBox[{"NetPort", "[", "\"\\"", "]"}], "\[Rule]", RowBox[{"NetPort", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}]}], ",", RowBox[{"\"\\"", "\[Rule]", "\"\\""}]}], "}"}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{ 3.7294310639346333`*^9, {3.7294314031858063`*^9, 3.729431410146639*^9}, { 3.7294314744756603`*^9, 3.729431477186903*^9}}, CellLabel->"In[2]:=",ExpressionUUID->"a3201696-1c29-48c9-ae1d-93b8d41966fa"], Cell[TextData[{ "The predVects layer takes a capsule output ", StyleBox["u", FontWeight->"Bold"], " as input and produces the ", Cell[BoxData[ FormBox[ OverscriptBox["u", "\[And]"], TraditionalForm]], FormatType->"TraditionalForm", FontWeight->"Bold",ExpressionUUID->"6d849c5d-cd1b-46fe-b1a9-7e5b6dbd6fb7"], " vectors by a series of dot products with the ", StyleBox["W", FontWeight->"Bold"], " matrices, stored as a compact tensor in the ConstantArrayLayer." }], "Text", CellChangeTimes->{{3.728996732494933*^9, 3.7289968002085857`*^9}, 3.729431874165144*^9},ExpressionUUID->"f36fef8c-50ea-403f-8280-\ 3103a072a08e"], Cell[BoxData[ RowBox[{ RowBox[{"predVects", "[", RowBox[{"numCapsulesOut_", ",", "dimCapsulesOut_"}], "]"}], ":=", RowBox[{"NetGraph", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"ReplicateLayer", "[", RowBox[{ RowBox[{"{", RowBox[{"Automatic", ",", "Automatic"}], "}"}], ",", "2"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"ConstantArrayLayer", "[", RowBox[{"\"\\"", "\[Rule]", RowBox[{"{", RowBox[{ "Automatic", ",", "numCapsulesOut", ",", "dimCapsulesOut", ",", "Automatic"}], "}"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"ThreadingLayer", "[", "Times", "]"}], ",", "\[IndentingNewLine]", RowBox[{"AggregationLayer", "[", RowBox[{"Total", ",", "4"}], "]"}]}], "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"2", "\[Rule]", RowBox[{"3", "\[Rule]", "4"}]}], ",", RowBox[{"1", "\[Rule]", "3"}]}], "}"}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.7294314103211*^9, 3.729431413754348*^9}, { 3.7294314717463818`*^9, 3.729431472177772*^9}}, CellLabel->"In[3]:=",ExpressionUUID->"1a37a15b-26cc-4e99-9406-ee225c38c95b"], Cell[TextData[{ "The routingIteration layer performs a single iteration in the dynamic \ routing loop. Port \[OpenCurlyDoubleQuote]Input\[CloseCurlyDoubleQuote] gets \ the ", Cell[BoxData[ FormBox[ OverscriptBox["u", "\[And]"], TraditionalForm]], FormatType->"TraditionalForm", FontWeight->"Bold",ExpressionUUID->"18daac40-ff05-45bc-aa6c-aac19957881b"], " vector at every iteration, port \[OpenCurlyDoubleQuote]State\ \[CloseCurlyDoubleQuote] gets the ", StyleBox["b", FontWeight->"Bold"], " vectors, port \[OpenCurlyDoubleQuote]Output\[CloseCurlyDoubleQuote] \ produces the updated ", StyleBox["b", FontWeight->"Bold"], " vectors. The ", StyleBox["b", FontWeight->"Bold"], " vectors must be flattened. Notice that we use the capsule but never get \ its output, we only produce the ", StyleBox["b", FontWeight->"Bold"], " vectors." }], "Text", CellChangeTimes->{{3.7289968277440977`*^9, 3.728996957578671*^9}, { 3.728997254685719*^9, 3.72899728735837*^9}, {3.729431903079337*^9, 3.729431967353888*^9}},ExpressionUUID->"beeb2da4-fef6-4911-929b-\ 01e509928fd3"], Cell[BoxData[ RowBox[{ RowBox[{"routingIteration", "[", RowBox[{"numCapsulesIn_", ",", "numCapsulesOut_"}], "]"}], ":=", RowBox[{"NetGraph", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"<|", "\[IndentingNewLine]", RowBox[{ RowBox[{"\"\\"", "\[Rule]", RowBox[{"capsuleLayer", "[", RowBox[{"numCapsulesIn", ",", "numCapsulesOut"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"NetGraph", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ReplicateLayer", "[", RowBox[{"numCapsulesIn", ",", "1"}], "]"}], ",", RowBox[{"ThreadingLayer", "[", "Times", "]"}], ",", RowBox[{"AggregationLayer", "[", RowBox[{"Total", ",", "3"}], "]"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"NetPort", "[", "\"\\"", "]"}], "\[Rule]", RowBox[{"1", "\[Rule]", RowBox[{"2", "\[Rule]", "3"}]}]}], ",", RowBox[{ RowBox[{"NetPort", "[", "\"\\"", "]"}], "\[Rule]", "2"}]}], "}"}]}], "\[IndentingNewLine]", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"FlattenLayer", "[", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"ThreadingLayer", "[", "Plus", "]"}]}]}], "\[IndentingNewLine]", "|>"}], ",", "\[IndentingNewLine]", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"NetPort", "[", "\"\\"", "]"}], "\[Rule]", RowBox[{"NetPort", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"NetPort", "[", "\"\\"", "]"}], "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"NetPort", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}], ",", RowBox[{"NetPort", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"NetPort", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}]}], ",", RowBox[{"\"\\"", "\[Rule]", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"NetPort", "[", "\"\\"", "]"}], ",", "\"\\""}], "}"}], "\[Rule]", "\"\\""}]}], "\[IndentingNewLine]", "}"}]}], "\n", "]"}]}]], "Input", CellChangeTimes->{{3.729431361473609*^9, 3.7294313825377274`*^9}, { 3.729431414107625*^9, 3.729431419570973*^9}, {3.729431467659836*^9, 3.72943146855586*^9}}, CellLabel->"In[4]:=",ExpressionUUID->"8a82d98d-c89f-4d02-bf22-bd403691fcfc"], Cell[TextData[{ "The dynamicRouting layer performs the full dynamic routing loop, taking the \ ", Cell[BoxData[ FormBox[ OverscriptBox["u", "\[And]"], TraditionalForm]], FontWeight->"Bold",ExpressionUUID->"0d3aca3c-d615-4d69-a85d-0739880144e9"], " vectors as input. NetFoldOperator implements the loop. In order to provide \ ", Cell[BoxData[ FormBox[ OverscriptBox["u", "\[And]"], TraditionalForm]], FontWeight->"Bold",ExpressionUUID->"7bcf5563-df77-401f-b772-091b79779965"], " to every iteration in the loop, it must be replicated. The replication \ amount sets the loop length. The final ", StyleBox["b", FontWeight->"Bold"], " parameters are produced as output and can be fed to an actual external \ capsule layer." }], "Text", CellChangeTimes->{{3.728996964322504*^9, 3.728996970162037*^9}, { 3.7289970130109*^9, 3.7289971497164*^9}, {3.728997215685712*^9, 3.728997237437827*^9}, {3.72899729585433*^9, 3.728997360807652*^9}, { 3.729431981997137*^9, 3.729432025766117*^9}},ExpressionUUID->"de1d5806-8610-4588-8619-\ 29252b8a5c74"], Cell[BoxData[ RowBox[{ RowBox[{"dynamicRouting", "[", RowBox[{"iterations_", ",", "numCapsulesIn_", ",", "numCapsulesOut_"}], "]"}], ":=", RowBox[{"NetChain", "@", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"ReplicateLayer", "[", "iterations", "]"}], ",", "\[IndentingNewLine]", RowBox[{"NetFoldOperator", "[", RowBox[{"routingIteration", "[", RowBox[{"numCapsulesIn", ",", "numCapsulesOut"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"SequenceLastLayer", "[", "]"}]}], "\[IndentingNewLine]", "}"}]}]}]], "Input", CellChangeTimes->{{3.729431111509246*^9, 3.729431111972732*^9}, { 3.7294314197443123`*^9, 3.7294314204958477`*^9}, {3.7294314518971357`*^9, 3.729431455673378*^9}}, CellLabel->"In[5]:=",ExpressionUUID->"c5fef86a-d329-4f01-8730-f269477e743b"], Cell["\<\ The DigitCaps output vector corresponding to the detected class can also be \ fed to a reconstruction branch to reconstruct the input image. The correct \ capsule vector can be picked using a combination of MXNet primitives through \ MXLayer:\ \>", "Text", CellChangeTimes->{{3.730396598942915*^9, 3.73039666154385*^9}, { 3.730396700429737*^9, 3.730396787795467*^9}},ExpressionUUID->"1d97e187-072b-4ad6-b198-\ 2d5ea1ab6924"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"mxPick", "=", RowBox[{"NeuralNetworks`MXLayer", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"<|", RowBox[{ RowBox[{"\"\\"", "\[Rule]", RowBox[{"{", RowBox[{"10", ",", "16"}], "}"}]}], ",", RowBox[{"\"\\"", "\[Rule]", RowBox[{"{", "10", "}"}]}]}], "|>"}], ",", RowBox[{"<|", RowBox[{"\"\\"", "\[Rule]", RowBox[{"{", "16", "}"}]}], "|>"}], ",", "\[IndentingNewLine]", RowBox[{"Function", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"norms", "=", RowBox[{ "NeuralNetworks`Private`GetInput", "[", "\"\\"", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"vectors", "=", RowBox[{ "NeuralNetworks`Private`GetInput", "[", "\"\\"", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"index", "=", RowBox[{"NeuralNetworks`Private`SowNode", "[", RowBox[{"\"\\"", ",", "norms", ",", RowBox[{"\"\\"", "\[Rule]", "1"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"index", "=", RowBox[{"NeuralNetworks`Private`SowNode", "[", RowBox[{"\"\\"", ",", "index", ",", RowBox[{"\"\\"", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"index", "=", RowBox[{"NeuralNetworks`Private`SowNode", "[", RowBox[{"\"\\"", ",", "index", ",", RowBox[{"\"\\"", "\[Rule]", "1"}], ",", RowBox[{"\"\\"", "\[Rule]", "16"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"picked", "=", RowBox[{"NeuralNetworks`Private`SowNode", "[", RowBox[{"\"\\"", ",", RowBox[{"{", RowBox[{"vectors", ",", "index"}], "}"}], ",", RowBox[{"\"\\"", "\[Rule]", "1"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"NeuralNetworks`Private`SetOutput", "[", RowBox[{"\"\\"", ",", "picked"}], "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}]], "Input",\ CellChangeTimes->{{3.7303965797715054`*^9, 3.730396581083819*^9}, 3.730396686484921*^9}, CellLabel->"In[6]:=",ExpressionUUID->"12059e77-936f-407d-adf5-195c2abe4266"], Cell[BoxData[ TagBox[ TemplateBox[{RowBox[{ StyleBox[ TagBox["MXLayer", "SummaryHead"], "NonInterpretableSummary"], StyleBox["[", "NonInterpretableSummary"], PanelBox[ GridBox[{{ GridBox[{{ FrameBox[ TemplateBox[{ GraphicsBox[{{ GrayLevel[0.8], { LineBox[{{-5., 1.0000000000000002`}, {-4., 1.0000000000000002`}}], LineBox[{{-4., 1.0000000000000002`}, {-3., 1.0000000000000002`}}], LineBox[{{-3., 1.0000000000000002`}, {-2., 1.0000000000000002`}}], LineBox[{{-2., 1.2246467991473532`*^-16}, {-0.9999999999999999, 1.}}], LineBox[{{-2., 1.0000000000000002`}, {-0.9999999999999999, 1.}}], LineBox[{{-0.9999999999999999, 1.}, { 6.123233995736766*^-17, 1.}}]}}, { TagBox[ TooltipBox[ InsetBox[ GraphicsBox[ StyleBox[ LineBox[{{-1., 1.}, {0., 0.}, {-1., -1.}}], GrayLevel[0.7], StripOnInput -> False]], {-4.4, 1.0000000000000002`}, {-0.25, 0}, Offset[8], {1., 0.}], TemplateBox[{"\[Times]", "\"\[Times]\"", "\"b\"", "10"}, "RowWithSeparators"]], Annotation[#, Row[{"b", 10}, "\[Times]"], "Tooltip"]& ], TagBox[ TooltipBox[ InsetBox[ GraphicsBox[ StyleBox[ LineBox[{{-1., 1.}, {0., 0.}, {-1., -1.}}], GrayLevel[0.7], StripOnInput -> False]], {-3.4, 1.0000000000000002`}, {-0.25, 0}, Offset[8], {1., 0.}], TemplateBox[{"\[Times]", "\"\[Times]\"", "\"b\""}, "RowWithSeparators"], LabelStyle -> "TextStyling"], Annotation[#, Row[{"b"}, "\[Times]"], "Tooltip"]& ], TagBox[ TooltipBox[ InsetBox[ GraphicsBox[ StyleBox[ LineBox[{{-1., 1.}, {0., 0.}, {-1., -1.}}], GrayLevel[0.7], StripOnInput -> False]], {-2.4000000000000004`, 1.0000000000000002`}, {-0.25, 0}, Offset[8], {1., 0.}], TemplateBox[{"\[Times]", "\"\[Times]\"", "\"b\"", "1"}, "RowWithSeparators"]], Annotation[#, Row[{"b", 1}, "\[Times]"], "Tooltip"]& ], TagBox[ TooltipBox[ InsetBox[ GraphicsBox[ StyleBox[ LineBox[{{-1., 1.}, {0., 0.}, {-1., -1.}}], GrayLevel[0.7], StripOnInput -> False]], {-1.4, 0.6}, {-0.25, 0}, Offset[8], {1., 0.9999999999999999}], TemplateBox[{ "\[Times]", "\"\[Times]\"", "\"b\"", "10", "16"}, "RowWithSeparators"]], Annotation[#, Row[{"b", 10, 16}, "\[Times]"], "Tooltip"]& ], TagBox[ TooltipBox[ InsetBox[ GraphicsBox[ StyleBox[ LineBox[{{-1., 1.}, {0., 0.}, {-1., -1.}}], GrayLevel[0.7], StripOnInput -> False]], {-1.4, 1.}, {-0.25, 0}, Offset[8], {1., -2.220446049250313*^-16}], TemplateBox[{"\[Times]", "\"\[Times]\"", "\"b\"", "16"}, "RowWithSeparators"]], Annotation[#, Row[{"b", 16}, "\[Times]"], "Tooltip"]& ], TagBox[ TooltipBox[ InsetBox[ GraphicsBox[ StyleBox[ LineBox[{{-1., 1.}, {0., 0.}, {-1., -1.}}], GrayLevel[0.7], StripOnInput -> False]], {-0.3999999999999999, 1.}, {-0.25, 0}, Offset[8], {1., 0.}], TemplateBox[{"\[Times]", "\"\[Times]\"", "\"b\"", "16"}, "RowWithSeparators"]], Annotation[#, Row[{"b", 16}, "\[Times]"], "Tooltip"]& ]}, { GrayLevel[0], { TagBox[ TooltipBox[{ AbsolutePointSize[4], GrayLevel[0.5], PointBox[{-2., 1.2246467991473532`*^-16}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "0"}, { StyleBox["\"name\"", Bold, StripOnInput -> False], "\".Inputs.Vectors\""}, { StyleBox["\"op\"", Bold, StripOnInput -> False], "\"null\""}, { StyleBox["\"param\"", Bold, StripOnInput -> False], RowBox[{"\[LeftAssociation]", "\[RightAssociation]"}]}, { StyleBox["\"attrs\"", Bold, StripOnInput -> False], RowBox[{"\[LeftAssociation]", "\[RightAssociation]"}]}, { StyleBox["\"inputs\"", Bold, StripOnInput -> False], RowBox[{"{", "}"}]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> False, GridBoxDividers -> { "Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{1.4}}}, GridBoxSpacings -> { "Columns" -> {{1.1}}, "Rows" -> {{0.5}}}, BaseStyle -> {FontFamily -> "Source Code Pro"}, FrameStyle -> GrayLevel[0.85]], "Grid"]], Annotation[#, Grid[{{ Style["id", Bold], 0}, { Style["name", Bold], ".Inputs.Vectors"}, { Style["op", Bold], "null"}, { Style["param", Bold], Association[]}, { Style["attrs", Bold], Association[]}, { Style["inputs", Bold], {}}}, Alignment -> Left, BaseStyle -> {FontFamily -> "Source Code Pro"}, Dividers -> All, FrameStyle -> GrayLevel[0.85], Alignment -> {Left, Baseline}, Spacings -> {1.1, 0.5}, ItemSize -> {Automatic, 1.4}], "Tooltip"]& ], TagBox[ TooltipBox[{ AbsolutePointSize[4], GrayLevel[0.5], PointBox[{-5., 1.0000000000000002`}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "1"}, { StyleBox["\"name\"", Bold, StripOnInput -> False], "\".Inputs.Norms\""}, { StyleBox["\"op\"", Bold, StripOnInput -> False], "\"null\""}, { StyleBox["\"param\"", Bold, StripOnInput -> False], RowBox[{"\[LeftAssociation]", "\[RightAssociation]"}]}, { StyleBox["\"attrs\"", Bold, StripOnInput -> False], RowBox[{"\[LeftAssociation]", "\[RightAssociation]"}]}, { StyleBox["\"inputs\"", Bold, StripOnInput -> False], RowBox[{"{", "}"}]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> False, GridBoxDividers -> { "Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{1.4}}}, GridBoxSpacings -> { "Columns" -> {{1.1}}, "Rows" -> {{0.5}}}, BaseStyle -> {FontFamily -> "Source Code Pro"}, FrameStyle -> GrayLevel[0.85]], "Grid"]], Annotation[#, Grid[{{ Style["id", Bold], 1}, { Style["name", Bold], ".Inputs.Norms"}, { Style["op", Bold], "null"}, { Style["param", Bold], Association[]}, { Style["attrs", Bold], Association[]}, { Style["inputs", Bold], {}}}, Alignment -> Left, BaseStyle -> {FontFamily -> "Source Code Pro"}, Dividers -> All, FrameStyle -> GrayLevel[0.85], Alignment -> {Left, Baseline}, Spacings -> {1.1, 0.5}, ItemSize -> {Automatic, 1.4}], "Tooltip"]& ], TagBox[ TooltipBox[{ AbsolutePointSize[6], Hue[0.06, 1, 0.75], PointBox[{-4., 1.0000000000000002`}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "2"}, { StyleBox["\"name\"", Bold, StripOnInput -> False], "\".$0\""}, { StyleBox["\"op\"", Bold, StripOnInput -> False], "\"argmax\""}, { StyleBox["\"param\"", Bold, StripOnInput -> False], RowBox[{"\[LeftAssociation]", "\[RightAssociation]"}]}, { StyleBox["\"attrs\"", Bold, StripOnInput -> False], TagBox[ GridBox[{{ StyleBox["\"axis\"", Bold, StripOnInput -> False], StyleBox[ "\"1\"", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> False, GridBoxDividers -> { "Columns" -> {False, {True}, False}, "Rows" -> {False, {True}, False}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> { "Columns" -> {{1.1}}, "Rows" -> {{0.5}}}, FrameStyle -> GrayLevel[0.85]], "Grid"]}, { StyleBox["\"inputs\"", Bold, StripOnInput -> False], RowBox[{"{", RowBox[{"{", RowBox[{"1", ",", "0", ",", "0"}], "}"}], "}"}]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> False, GridBoxDividers -> { "Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{1.4}}}, GridBoxSpacings -> { "Columns" -> {{1.1}}, "Rows" -> {{0.5}}}, BaseStyle -> {FontFamily -> "Source Code Pro"}, FrameStyle -> GrayLevel[0.85]], "Grid"]], Annotation[#, Grid[{{ Style["id", Bold], 2}, { Style["name", Bold], ".$0"}, { Style["op", Bold], "argmax"}, { Style["param", Bold], Association[]}, { Style["attrs", Bold], Grid[{{ Style["axis", Bold], Style["1", ShowStringCharacters -> True]}}, Alignment -> Left, Spacings -> {1.1, 0.5}, Dividers -> Center, FrameStyle -> GrayLevel[0.85]]}, { Style["inputs", Bold], {{1, 0, 0}}}}, Alignment -> Left, BaseStyle -> {FontFamily -> "Source Code Pro"}, Dividers -> All, FrameStyle -> GrayLevel[0.85], Alignment -> {Left, Baseline}, Spacings -> {1.1, 0.5}, ItemSize -> {Automatic, 1.4}], "Tooltip"]& ], TagBox[ TooltipBox[{ AbsolutePointSize[6], RGBColor[0.4, 0., 0.4], PointBox[{-3., 1.0000000000000002`}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "3"}, { StyleBox["\"name\"", Bold, StripOnInput -> False], "\".$1\""}, { StyleBox["\"op\"", Bold, StripOnInput -> False], "\"Reshape\""}, { StyleBox["\"param\"", Bold, StripOnInput -> False], RowBox[{"\[LeftAssociation]", "\[RightAssociation]"}]}, { StyleBox["\"attrs\"", Bold, StripOnInput -> False], TagBox[ GridBox[{{ StyleBox["\"shape\"", Bold, StripOnInput -> False], StyleBox[ "\"(0, 1)\"", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> False, GridBoxDividers -> { "Columns" -> {False, {True}, False}, "Rows" -> {False, {True}, False}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> { "Columns" -> {{1.1}}, "Rows" -> {{0.5}}}, FrameStyle -> GrayLevel[0.85]], "Grid"]}, { StyleBox["\"inputs\"", Bold, StripOnInput -> False], RowBox[{"{", RowBox[{"{", RowBox[{"2", ",", "0", ",", "0"}], "}"}], "}"}]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> False, GridBoxDividers -> { "Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{1.4}}}, GridBoxSpacings -> { "Columns" -> {{1.1}}, "Rows" -> {{0.5}}}, BaseStyle -> {FontFamily -> "Source Code Pro"}, FrameStyle -> GrayLevel[0.85]], "Grid"]], Annotation[#, Grid[{{ Style["id", Bold], 3}, { Style["name", Bold], ".$1"}, { Style["op", Bold], "Reshape"}, { Style["param", Bold], Association[]}, { Style["attrs", Bold], Grid[{{ Style["shape", Bold], Style["(0, 1)", ShowStringCharacters -> True]}}, Alignment -> Left, Spacings -> {1.1, 0.5}, Dividers -> Center, FrameStyle -> GrayLevel[0.85]]}, { Style["inputs", Bold], {{2, 0, 0}}}}, Alignment -> Left, BaseStyle -> {FontFamily -> "Source Code Pro"}, Dividers -> All, FrameStyle -> GrayLevel[0.85], Alignment -> {Left, Baseline}, Spacings -> {1.1, 0.5}, ItemSize -> {Automatic, 1.4}], "Tooltip"]& ], TagBox[ TooltipBox[{ AbsolutePointSize[6], Hue[0, 0.75, 0.8], PointBox[{-2., 1.0000000000000002`}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "4"}, { StyleBox["\"name\"", Bold, StripOnInput -> False], "\".$2\""}, { StyleBox["\"op\"", Bold, StripOnInput -> False], "\"broadcast_axis\""}, { StyleBox["\"param\"", Bold, StripOnInput -> False], RowBox[{"\[LeftAssociation]", "\[RightAssociation]"}]}, { StyleBox["\"attrs\"", Bold, StripOnInput -> False], TagBox[ GridBox[{{ StyleBox["\"axis\"", Bold, StripOnInput -> False], StyleBox[ "\"1\"", ShowStringCharacters -> True, StripOnInput -> False]}, { StyleBox["\"size\"", Bold, StripOnInput -> False], StyleBox[ "\"16\"", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> False, GridBoxDividers -> { "Columns" -> {False, {True}, False}, "Rows" -> {False, {True}, False}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> { "Columns" -> {{1.1}}, "Rows" -> {{0.5}}}, FrameStyle -> GrayLevel[0.85]], "Grid"]}, { StyleBox["\"inputs\"", Bold, StripOnInput -> False], RowBox[{"{", RowBox[{"{", RowBox[{"3", ",", "0", ",", "0"}], "}"}], "}"}]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> False, GridBoxDividers -> { "Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{1.4}}}, GridBoxSpacings -> { "Columns" -> {{1.1}}, "Rows" -> {{0.5}}}, BaseStyle -> {FontFamily -> "Source Code Pro"}, FrameStyle -> GrayLevel[0.85]], "Grid"]], Annotation[#, Grid[{{ Style["id", Bold], 4}, { Style["name", Bold], ".$2"}, { Style["op", Bold], "broadcast_axis"}, { Style["param", Bold], Association[]}, { Style["attrs", Bold], Grid[{{ Style["axis", Bold], Style["1", ShowStringCharacters -> True]}, { Style["size", Bold], Style["16", ShowStringCharacters -> True]}}, Alignment -> Left, Spacings -> {1.1, 0.5}, Dividers -> Center, FrameStyle -> GrayLevel[0.85]]}, { Style["inputs", Bold], {{3, 0, 0}}}}, Alignment -> Left, BaseStyle -> {FontFamily -> "Source Code Pro"}, Dividers -> All, FrameStyle -> GrayLevel[0.85], Alignment -> {Left, Baseline}, Spacings -> {1.1, 0.5}, ItemSize -> {Automatic, 1.4}], "Tooltip"]& ], TagBox[ TooltipBox[{ AbsolutePointSize[6], Hue[0.12, 1, 0.9], PointBox[{-0.9999999999999999, 1.}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "5"}, { StyleBox["\"name\"", Bold, StripOnInput -> False], "\".$3\""}, { StyleBox["\"op\"", Bold, StripOnInput -> False], "\"pick\""}, { StyleBox["\"param\"", Bold, StripOnInput -> False], RowBox[{"\[LeftAssociation]", "\[RightAssociation]"}]}, { StyleBox["\"attrs\"", Bold, StripOnInput -> False], TagBox[ GridBox[{{ StyleBox["\"axis\"", Bold, StripOnInput -> False], StyleBox[ "\"1\"", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> False, GridBoxDividers -> { "Columns" -> {False, {True}, False}, "Rows" -> {False, {True}, False}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> { "Columns" -> {{1.1}}, "Rows" -> {{0.5}}}, FrameStyle -> GrayLevel[0.85]], "Grid"]}, { StyleBox["\"inputs\"", Bold, StripOnInput -> False], RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "0", ",", "0"}], "}"}]}], "}"}]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> False, GridBoxDividers -> { "Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{1.4}}}, GridBoxSpacings -> { "Columns" -> {{1.1}}, "Rows" -> {{0.5}}}, BaseStyle -> {FontFamily -> "Source Code Pro"}, FrameStyle -> GrayLevel[0.85]], "Grid"]], Annotation[#, Grid[{{ Style["id", Bold], 5}, { Style["name", Bold], ".$3"}, { Style["op", Bold], "pick"}, { Style["param", Bold], Association[]}, { Style["attrs", Bold], Grid[{{ Style["axis", Bold], Style["1", ShowStringCharacters -> True]}}, Alignment -> Left, Spacings -> {1.1, 0.5}, Dividers -> Center, FrameStyle -> GrayLevel[0.85]]}, { Style["inputs", Bold], {{0, 0, 0}, {4, 0, 0}}}}, Alignment -> Left, BaseStyle -> {FontFamily -> "Source Code Pro"}, Dividers -> All, FrameStyle -> GrayLevel[0.85], Alignment -> {Left, Baseline}, Spacings -> {1.1, 0.5}, ItemSize -> {Automatic, 1.4}], "Tooltip"]& ], TagBox[ TooltipBox[{ AbsolutePointSize[4], GrayLevel[0.5], PointBox[{6.123233995736766*^-17, 1.}]}, "Null"], Annotation[#, Null, "Tooltip"]& ]}}, StyleBox[{{{ InsetBox[ FormBox["0", TraditionalForm], Offset[{0, 5}, {-2., 1.2246467991473532`*^-16}], { 0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["1", TraditionalForm], Offset[{0, 5}, {-5., 1.0000000000000002`}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["2", TraditionalForm], Offset[{0, 6}, {-4., 1.0000000000000002`}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["3", TraditionalForm], Offset[{0, 6}, {-3., 1.0000000000000002`}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["4", TraditionalForm], Offset[{0, 6}, {-2., 1.0000000000000002`}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["5", TraditionalForm], Offset[{0, 6}, {-0.9999999999999999, 1.}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["\"\"", TraditionalForm], Offset[{0, 5}, {6.123233995736766*^-17, 1.}], {0., -0.17}, Automatic, {1, 0}]}, { InsetBox[ FormBox["\"\"", TraditionalForm], Offset[{0, -5}, {-2., 1.2246467991473532`*^-16}], {0, 1.}, Automatic, {1, 0}], InsetBox[ FormBox["\"\"", TraditionalForm], Offset[{0, -5}, {-5., 1.0000000000000002`}], {0, 1.}, Automatic, {1, 0}], InsetBox[ FormBox["\"a\"", TraditionalForm], Offset[{0, -6}, {-4., 1.0000000000000002`}], {0, 1.}, Automatic, {1, 0}], InsetBox[ FormBox["\"R\"", TraditionalForm], Offset[{0, -6}, {-3., 1.0000000000000002`}], {0, 1.}, Automatic, {1, 0}], InsetBox[ FormBox["\"b\"", TraditionalForm], Offset[{0, -6}, {-2., 1.0000000000000002`}], {0, 1.}, Automatic, {1, 0}], InsetBox[ FormBox["\"p\"", TraditionalForm], Offset[{0, -6}, {-0.9999999999999999, 1.}], {0, 1.}, Automatic, {1, 0}], InsetBox[ FormBox["\"\"", TraditionalForm], Offset[{0, -5}, {6.123233995736766*^-17, 1.}], {0, 1.}, Automatic, {1, 0}]}}}, FontSize -> 7, StripOnInput -> False]}, ImageSize -> {280., 76.85}, AspectRatio -> Full, PlotRangePadding -> 0, ImagePadding -> {{24.00000000000002, 6}, {15., 11.849999999999994`}}, ImageMargins -> 0, BaseStyle -> {TooltipBoxOptions -> {TooltipDelay -> 0.08}}], FormBox[ FormBox[ TemplateBox[{ "\"Tensor\"", "\"argmax\"", "\"Reshape\"", "\"broadcast_axis\"", "\"pick\""}, "PointLegend", DisplayFunction -> (FormBox[ StyleBox[ StyleBox[ PaneBox[ TagBox[ GridBox[{{ TemplateBox[{ GraphicsBox[{{}, { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], GrayLevel[0.5], AbsolutePointSize[4]], { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], GrayLevel[0.5], AbsolutePointSize[4]], PointBox[ NCache[{ Scaled[{ Rational[1, 2], Rational[1, 2]}]}, { Scaled[{0.5, 0.5}]}]]}}}, AspectRatio -> Full, ImageSize -> {12, 12}, PlotRangePadding -> None, ImagePadding -> Automatic, BaselinePosition -> (Scaled[0.23333333333333334`] -> Baseline)], "\" \"", #}, "RowDefault"], TemplateBox[{ GraphicsBox[{{}, { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], Hue[0.06, 1, 0.75], AbsolutePointSize[6]], { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], Hue[0.06, 1, 0.75], AbsolutePointSize[6]], PointBox[ NCache[{ Scaled[{ Rational[1, 2], Rational[1, 2]}]}, { Scaled[{0.5, 0.5}]}]]}}}, AspectRatio -> Full, ImageSize -> {12, 12}, PlotRangePadding -> None, ImagePadding -> Automatic, BaselinePosition -> (Scaled[0.23333333333333334`] -> Baseline)], "\" \"", #2}, "RowDefault"], TemplateBox[{ GraphicsBox[{{}, { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], RGBColor[0.4, 0., 0.4], AbsolutePointSize[6]], { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], RGBColor[0.4, 0., 0.4], AbsolutePointSize[6]], PointBox[ NCache[{ Scaled[{ Rational[1, 2], Rational[1, 2]}]}, { Scaled[{0.5, 0.5}]}]]}}}, AspectRatio -> Full, ImageSize -> {12, 12}, PlotRangePadding -> None, ImagePadding -> Automatic, BaselinePosition -> (Scaled[0.23333333333333334`] -> Baseline)], "\" \"", #3}, "RowDefault"], TemplateBox[{ GraphicsBox[{{}, { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], Hue[0, 0.75, 0.8], AbsolutePointSize[6]], { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], Hue[0, 0.75, 0.8], AbsolutePointSize[6]], PointBox[ NCache[{ Scaled[{ Rational[1, 2], Rational[1, 2]}]}, { Scaled[{0.5, 0.5}]}]]}}}, AspectRatio -> Full, ImageSize -> {12, 12}, PlotRangePadding -> None, ImagePadding -> Automatic, BaselinePosition -> (Scaled[0.23333333333333334`] -> Baseline)], "\" \"", #4}, "RowDefault"], TemplateBox[{ GraphicsBox[{{}, { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], Hue[0.12, 1, 0.9], AbsolutePointSize[6]], { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], Hue[0.12, 1, 0.9], AbsolutePointSize[6]], PointBox[ NCache[{ Scaled[{ Rational[1, 2], Rational[1, 2]}]}, { Scaled[{0.5, 0.5}]}]]}}}, AspectRatio -> Full, ImageSize -> {12, 12}, PlotRangePadding -> None, ImagePadding -> Automatic, BaselinePosition -> (Scaled[0.23333333333333334`] -> Baseline)], "\" \"", #5}, "RowDefault"]}}, GridBoxAlignment -> { "Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, AutoDelete -> False, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Grid"], Alignment -> Left, AppearanceElements -> None, ImageMargins -> {{2, 2}, {2, 2}}, ImageSizeAction -> "ResizeToFit"], LineIndent -> 0, StripOnInput -> False], { FontSize -> 8, FontFamily -> "Arial"}, Background -> Automatic, StripOnInput -> False], TraditionalForm]& ), InterpretationFunction :> (RowBox[{"PointLegend", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Directive", "[", RowBox[{ InterpretationBox[ ButtonBox[ TooltipBox[ GraphicsBox[{{ GrayLevel[0], RectangleBox[{0, 0}]}, { GrayLevel[0], RectangleBox[{1, -1}]}, { GrayLevel[0.5], RectangleBox[{0, -1}, {2, 1}]}}, DefaultBaseStyle -> "ColorSwatchGraphics", AspectRatio -> 1, Frame -> True, FrameStyle -> GrayLevel[0.33333333333333337`], FrameTicks -> None, PlotRangePadding -> None, ImageSize -> Dynamic[{Automatic, 1.35 CurrentValue["FontCapHeight"]/ AbsoluteCurrentValue[Magnification]}]], StyleBox[ RowBox[{"GrayLevel", "[", "0.5`", "]"}], NumberMarks -> False]], Appearance -> None, BaseStyle -> {}, BaselinePosition -> Baseline, DefaultBaseStyle -> {}, ButtonFunction :> With[{Typeset`box$ = EvaluationBox[]}, If[ Not[ AbsoluteCurrentValue["Deployed"]], SelectionMove[Typeset`box$, All, Expression]; FrontEnd`Private`$ColorSelectorInitialAlpha = 1; FrontEnd`Private`$ColorSelectorInitialColor = GrayLevel[0.5]; FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; MathLink`CallFrontEnd[ FrontEnd`AttachCell[Typeset`box$, FrontEndResource["GrayLevelColorValueSelector"], { 0, {Left, Bottom}}, {Left, Top}, "ClosingActions" -> {"SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]], BaseStyle -> Inherited, Evaluator -> Automatic, Method -> "Preemptive"], GrayLevel[0.5], Editable -> False, Selectable -> False], ",", RowBox[{"AbsolutePointSize", "[", "4", "]"}]}], "]"}], ",", RowBox[{"Directive", "[", RowBox[{ InterpretationBox[ ButtonBox[ TooltipBox[ GraphicsBox[{{ GrayLevel[0], RectangleBox[{0, 0}]}, { GrayLevel[0], RectangleBox[{1, -1}]}, { Hue[0.06, 1, 0.75], RectangleBox[{0, -1}, {2, 1}]}}, DefaultBaseStyle -> "ColorSwatchGraphics", AspectRatio -> 1, Frame -> True, FrameStyle -> Hue[0.060000000000000005`, 1., 0.5], FrameTicks -> None, PlotRangePadding -> None, ImageSize -> Dynamic[{Automatic, 1.35 CurrentValue["FontCapHeight"]/ AbsoluteCurrentValue[Magnification]}]], StyleBox[ RowBox[{"Hue", "[", RowBox[{"0.06`", ",", "1", ",", "0.75`"}], "]"}], NumberMarks -> False]], Appearance -> None, BaseStyle -> {}, BaselinePosition -> Baseline, DefaultBaseStyle -> {}, ButtonFunction :> With[{Typeset`box$ = EvaluationBox[]}, If[ Not[ AbsoluteCurrentValue["Deployed"]], SelectionMove[Typeset`box$, All, Expression]; FrontEnd`Private`$ColorSelectorInitialAlpha = 1; FrontEnd`Private`$ColorSelectorInitialColor = Hue[0.06, 1, 0.75]; FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; MathLink`CallFrontEnd[ FrontEnd`AttachCell[Typeset`box$, FrontEndResource["HueColorValueSelector"], { 0, {Left, Bottom}}, {Left, Top}, "ClosingActions" -> {"SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]], BaseStyle -> Inherited, Evaluator -> Automatic, Method -> "Preemptive"], Hue[0.06, 1, 0.75], Editable -> False, Selectable -> False], ",", RowBox[{"AbsolutePointSize", "[", "6", "]"}]}], "]"}], ",", RowBox[{"Directive", "[", RowBox[{ InterpretationBox[ ButtonBox[ TooltipBox[ GraphicsBox[{{ GrayLevel[0], RectangleBox[{0, 0}]}, { GrayLevel[0], RectangleBox[{1, -1}]}, { RGBColor[0.4, 0., 0.4], RectangleBox[{0, -1}, {2, 1}]}}, DefaultBaseStyle -> "ColorSwatchGraphics", AspectRatio -> 1, Frame -> True, FrameStyle -> RGBColor[ 0.2666666666666667, 0., 0.2666666666666667], FrameTicks -> None, PlotRangePadding -> None, ImageSize -> Dynamic[{Automatic, 1.35 CurrentValue["FontCapHeight"]/ AbsoluteCurrentValue[Magnification]}]], StyleBox[ RowBox[{"RGBColor", "[", RowBox[{"0.4`", ",", "0.`", ",", "0.4`"}], "]"}], NumberMarks -> False]], Appearance -> None, BaseStyle -> {}, BaselinePosition -> Baseline, DefaultBaseStyle -> {}, ButtonFunction :> With[{Typeset`box$ = EvaluationBox[]}, If[ Not[ AbsoluteCurrentValue["Deployed"]], SelectionMove[Typeset`box$, All, Expression]; FrontEnd`Private`$ColorSelectorInitialAlpha = 1; FrontEnd`Private`$ColorSelectorInitialColor = RGBColor[0.4, 0., 0.4]; FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; MathLink`CallFrontEnd[ FrontEnd`AttachCell[Typeset`box$, FrontEndResource["RGBColorValueSelector"], { 0, {Left, Bottom}}, {Left, Top}, "ClosingActions" -> {"SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]], BaseStyle -> Inherited, Evaluator -> Automatic, Method -> "Preemptive"], RGBColor[0.4, 0., 0.4], Editable -> False, Selectable -> False], ",", RowBox[{"AbsolutePointSize", "[", "6", "]"}]}], "]"}], ",", RowBox[{"Directive", "[", RowBox[{ InterpretationBox[ ButtonBox[ TooltipBox[ GraphicsBox[{{ GrayLevel[0], RectangleBox[{0, 0}]}, { GrayLevel[0], RectangleBox[{1, -1}]}, { Hue[0, 0.75, 0.8], RectangleBox[{0, -1}, {2, 1}]}}, DefaultBaseStyle -> "ColorSwatchGraphics", AspectRatio -> 1, Frame -> True, FrameStyle -> Hue[0., 0.75, 0.5333333333333334], FrameTicks -> None, PlotRangePadding -> None, ImageSize -> Dynamic[{Automatic, 1.35 CurrentValue["FontCapHeight"]/ AbsoluteCurrentValue[Magnification]}]], StyleBox[ RowBox[{"Hue", "[", RowBox[{"0", ",", "0.75`", ",", "0.8`"}], "]"}], NumberMarks -> False]], Appearance -> None, BaseStyle -> {}, BaselinePosition -> Baseline, DefaultBaseStyle -> {}, ButtonFunction :> With[{Typeset`box$ = EvaluationBox[]}, If[ Not[ AbsoluteCurrentValue["Deployed"]], SelectionMove[Typeset`box$, All, Expression]; FrontEnd`Private`$ColorSelectorInitialAlpha = 1; FrontEnd`Private`$ColorSelectorInitialColor = Hue[0, 0.75, 0.8]; FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; MathLink`CallFrontEnd[ FrontEnd`AttachCell[Typeset`box$, FrontEndResource["HueColorValueSelector"], { 0, {Left, Bottom}}, {Left, Top}, "ClosingActions" -> {"SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]], BaseStyle -> Inherited, Evaluator -> Automatic, Method -> "Preemptive"], Hue[0, 0.75, 0.8], Editable -> False, Selectable -> False], ",", RowBox[{"AbsolutePointSize", "[", "6", "]"}]}], "]"}], ",", RowBox[{"Directive", "[", RowBox[{ InterpretationBox[ ButtonBox[ TooltipBox[ GraphicsBox[{{ GrayLevel[0], RectangleBox[{0, 0}]}, { GrayLevel[0], RectangleBox[{1, -1}]}, { Hue[0.12, 1, 0.9], RectangleBox[{0, -1}, {2, 1}]}}, DefaultBaseStyle -> "ColorSwatchGraphics", AspectRatio -> 1, Frame -> True, FrameStyle -> Hue[0.12, 1., 0.6000000000000001], FrameTicks -> None, PlotRangePadding -> None, ImageSize -> Dynamic[{Automatic, 1.35 CurrentValue["FontCapHeight"]/ AbsoluteCurrentValue[Magnification]}]], StyleBox[ RowBox[{"Hue", "[", RowBox[{"0.12`", ",", "1", ",", "0.9`"}], "]"}], NumberMarks -> False]], Appearance -> None, BaseStyle -> {}, BaselinePosition -> Baseline, DefaultBaseStyle -> {}, ButtonFunction :> With[{Typeset`box$ = EvaluationBox[]}, If[ Not[ AbsoluteCurrentValue["Deployed"]], SelectionMove[Typeset`box$, All, Expression]; FrontEnd`Private`$ColorSelectorInitialAlpha = 1; FrontEnd`Private`$ColorSelectorInitialColor = Hue[0.12, 1, 0.9]; FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; MathLink`CallFrontEnd[ FrontEnd`AttachCell[Typeset`box$, FrontEndResource["HueColorValueSelector"], { 0, {Left, Bottom}}, {Left, Top}, "ClosingActions" -> {"SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]], BaseStyle -> Inherited, Evaluator -> Automatic, Method -> "Preemptive"], Hue[0.12, 1, 0.9], Editable -> False, Selectable -> False], ",", RowBox[{"AbsolutePointSize", "[", "6", "]"}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{#, ",", #2, ",", #3, ",", #4, ",", #5}], "}"}], ",", RowBox[{"LabelStyle", "\[Rule]", "8"}], ",", RowBox[{"LegendMarkerSize", "\[Rule]", "12"}], ",", RowBox[{"LegendMargins", "\[Rule]", "2"}], ",", RowBox[{ "LegendLayout", "\[Rule]", "GeneralUtilities`Graphics`PackagePrivate`legendTable"}]}]\ , "]"}]& ), Editable -> True], TraditionalForm], TraditionalForm]}, "Legended", DisplayFunction -> (GridBox[{{ TagBox[ ItemBox[ PaneBox[ TagBox[#, "SkipImageSizeLevel"], Alignment -> {Center, Baseline}, BaselinePosition -> Baseline], DefaultBaseStyle -> "Labeled"], "SkipImageSizeLevel"]}, { ItemBox[#2, DefaultBaseStyle -> "LabeledLabel"]}}, GridBoxAlignment -> { "Columns" -> {{Center}}, "Rows" -> {{Center}}}, AutoDelete -> False, GridBoxItemSize -> Automatic, BaselinePosition -> {1, 1}]& ), InterpretationFunction -> (RowBox[{"Legended", "[", RowBox[{#, ",", RowBox[{"Placed", "[", RowBox[{#2, ",", "Below"}], "]"}]}], "]"}]& ), Editable -> True], ImageMargins -> 5, FrameStyle -> None, Background -> GrayLevel[1]], "\[SpanFromLeft]"}, { ItemBox[ StyleBox["Ports", Bold], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]], ItemBox[ StyleBox[ GraphicsBox[{}, ImageSize -> {1, 11}, BaselinePosition -> (Scaled[0.] -> Baseline)], "CacheGraphics" -> False], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]]}, { StyleBox[ TemplateBox[{"\"Vectors\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox[ TemplateBox[{"\"matrix\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{ "\[Times]", "\"\[Times]\"", "\"10\"", "\"16\""}, "RowWithSeparators"], "\"\[VeryThinSpace]\"", "\")\""}, "RowDefault"], GrayLevel[0.5], StripOnInput -> False]}, "RowDefault"], "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Norms\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox[ TemplateBox[{"\"vector\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{"\[Times]", "\"\[Times]\"", "\"10\""}, "RowWithSeparators"], "\"\[VeryThinSpace]\"", "\")\""}, "RowDefault"], GrayLevel[0.5], StripOnInput -> False]}, "RowDefault"], "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Output\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox[ TemplateBox[{"\"vector\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{"\[Times]", "\"\[Times]\"", "\"16\""}, "RowWithSeparators"], "\"\[VeryThinSpace]\"", "\")\""}, "RowDefault"], GrayLevel[0.5], StripOnInput -> False]}, "RowDefault"], "SummaryItem"]}}, BaselinePosition -> {2, 1}, GridBoxAlignment -> { "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> { "Columns" -> {{2}}, "Rows" -> {{Automatic}}}]}}, GridBoxAlignment -> {"Rows" -> {{Top}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridFrameMargins -> {{0, 0}, {0, 0}}, BaselinePosition -> {1, 3}], BaselinePosition -> Baseline, BaseStyle -> { ShowStringCharacters -> False, NumberMarks -> False, PrintPrecision -> 3, ShowSyntaxStyles -> False}], StyleBox["]", "NonInterpretableSummary"]}]}, "CopyTag", DisplayFunction->(#& ), InterpretationFunction->("MXLayer[<>]"& )], False, Editable->False, SelectWithContents->True, Selectable->False]], "Output", CellChangeTimes->{3.7303968016620207`*^9, 3.73039718342083*^9}, CellLabel->"Out[6]=",ExpressionUUID->"73ec9834-9900-48e8-a5f7-a628b8b0f5f5"] }, Open ]], Cell["\<\ The reconstruct layer reconstructs the input image from the DigitCaps vector \ corresponding to the detected class:\ \>", "Text", CellChangeTimes->{{3.730396598942915*^9, 3.73039666154385*^9}, { 3.730396700429737*^9, 3.730396787795467*^9}, {3.730396952498693*^9, 3.730396984220232*^9}},ExpressionUUID->"8a5e4e5d-d369-44cd-88c8-\ a39de849d06c"], Cell[BoxData[ RowBox[{ RowBox[{"reconstruct", "=", RowBox[{"NetChain", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"LinearLayer", "[", "512", "]"}], ",", "Ramp", ",", "\[IndentingNewLine]", RowBox[{"LinearLayer", "[", "1024", "]"}], ",", "Ramp", ",", "\[IndentingNewLine]", RowBox[{"LinearLayer", "[", "784", "]"}], ",", "LogisticSigmoid", ",", "\[IndentingNewLine]", RowBox[{"ReshapeLayer", "[", RowBox[{"{", RowBox[{"1", ",", "28", ",", "28"}], "}"}], "]"}]}], "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"NetDecoder", "[", "\"\\"", "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.730397005838299*^9, 3.7303970558819*^9}}, CellLabel->"In[7]:=",ExpressionUUID->"6f48898a-83c0-48ce-bedd-740e196fcd09"] }, Open ]], Cell[CellGroupData[{ Cell["Parameter Settings", "Subsection", CellChangeTimes->{{3.7251952635053062`*^9, 3.725195271633607*^9}, { 3.729431420680352*^9, 3.729431430608068*^9}},ExpressionUUID->"b2a30602-d81a-4151-bf0b-\ 89c8180222fe"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"nConvCaps1", ",", "dimCaps1"}], "}"}], "=", RowBox[{"{", RowBox[{"32", ",", "8"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"nCaps2", ",", "dimCaps2"}], "}"}], "=", RowBox[{"{", RowBox[{"10", ",", "16"}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"iterations", "=", "2"}], ";"}]}], "Input", CellChangeTimes->{{3.729431356286166*^9, 3.7294313572226887`*^9}}, CellLabel->"In[13]:=",ExpressionUUID->"03271dbd-100c-4095-b1e3-93da02134fc1"] }, Open ]], Cell[CellGroupData[{ Cell["Final Net", "Subsection", CellChangeTimes->{{3.695106779945572*^9, 3.695106780985426*^9}, 3.7294311292752037`*^9, {3.729431420856628*^9, 3.7294314322715054`*^9}},ExpressionUUID->"791564d7-bbb0-42be-870f-\ 225e70c83a2d"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"capsNet", "=", RowBox[{"NetGraph", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"<|", "\[IndentingNewLine]", RowBox[{ RowBox[{"\"\\"", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"ConvolutionLayer", "[", RowBox[{"256", ",", RowBox[{"{", RowBox[{"9", ",", "9"}], "}"}]}], "]"}], ",", "Ramp"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"ConvolutionLayer", "[", RowBox[{ RowBox[{"nConvCaps1", "*", "dimCaps1"}], ",", RowBox[{"{", RowBox[{"9", ",", "9"}], "}"}], ",", RowBox[{"\"\\"", "\[Rule]", "2"}]}], "]"}], ",", RowBox[{"TransposeLayer", "[", RowBox[{"{", RowBox[{ RowBox[{"1", "\[TwoWayRule]", "3"}], ",", RowBox[{"1", "\[TwoWayRule]", "2"}]}], "}"}], "]"}], ",", RowBox[{"ReshapeLayer", "[", RowBox[{"{", RowBox[{ RowBox[{"6", "*", "6", "*", "nConvCaps1"}], ",", "dimCaps1"}], "}"}], "]"}], ",", "squash"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"predVects", "[", RowBox[{"nCaps2", ",", "dimCaps2"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"dynamicRouting", "[", RowBox[{"iterations", ",", RowBox[{"6", "*", "6", "*", "nConvCaps1"}], ",", "nCaps2"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"capsuleLayer", "[", RowBox[{ RowBox[{"6", "*", "6", "*", "nConvCaps1"}], ",", "nCaps2"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"ElementwiseLayer", "[", RowBox[{ RowBox[{"#", "^", "2"}], "&"}], "]"}], ",", RowBox[{"AggregationLayer", "[", "Total", "]"}], ",", RowBox[{"ElementwiseLayer", "[", "Sqrt", "]"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", "mxPick"}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", "reconstruct"}]}], "\[IndentingNewLine]", "|>"}], ",", "\[IndentingNewLine]", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"\"\\"", "\[Rule]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"NetPort", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}]}]}]}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"NetPort", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"NetPort", "[", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}], "]"}]}], "}"}]}], ",", RowBox[{"\"\\"", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"NetPort", "[", "\"\\"", "]"}], ",", RowBox[{"NetPort", "[", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}], "]"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"NetPort", "[", "\"\\"", "]"}]}]}]}], "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"{", RowBox[{"1", ",", "28", ",", "28"}], "}"}]}]}], "\n", "]"}]}]], "Input",\ CellChangeTimes->{{3.72943113160144*^9, 3.729431145485145*^9}, { 3.729431217641472*^9, 3.729431276229598*^9}, {3.729431320273776*^9, 3.7294313536318703`*^9}, {3.729431421016019*^9, 3.729431426658733*^9}, { 3.729432677702054*^9, 3.729432702899198*^9}, {3.730396826749292*^9, 3.730396932272396*^9}, {3.730397062285162*^9, 3.730397092160947*^9}}, CellLabel->"In[16]:=",ExpressionUUID->"b18d2a82-5625-4591-8934-425aa7e19f32"], Cell[BoxData[ TagBox[ TemplateBox[{RowBox[{ StyleBox[ TagBox["NetGraph", "SummaryHead"], "NonInterpretableSummary"], StyleBox["[", "NonInterpretableSummary"], DynamicModuleBox[{Typeset`open = True}, PanelBox[ PaneSelectorBox[{False -> GridBox[{{ PaneBox[ ButtonBox[ DynamicBox[ FEPrivate`FrontEndResource[ "FEBitmaps", "SquarePlusIconMedium"], ImageSizeCache -> {12., {0., 12.}}], Appearance -> None, ButtonFunction :> (Typeset`open = True), Evaluator -> Automatic, Method -> "Preemptive"], Alignment -> {Center, Center}, ImageSize -> {Automatic, 24}], OverlayBox[{ GraphicsBox[{ Thickness[0.0149], { GrayLevel[0.6], Thickness[0.03], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{1, 4, 3}}}, {{{18., 37.}, {18., 37.}, { 18.5, 27.5}, {35., 27.}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{50., 37.}, {50., 37.}, { 49.5, 27.5}, {33., 27.}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{18., 16.}, {18., 16.}, { 18.5, 25.5}, {35., 26.}}}, CurveClosed -> {0}]}, { FaceForm[ GrayLevel[0.9]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 40.5}, {22.5, 40.5}, {22.5, 33.5}, {15.5, 33.5}}}]}, { FaceForm[ GrayLevel[0.6]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 41.}, {15., 41.}, { 15., 33.}, {23., 33.}}, {{22., 34.}, {16., 34.}, {16., 40.}, {22., 40.}}}]}, { FaceForm[ GrayLevel[0.9]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 19.5}, {22.5, 19.5}, {22.5, 12.5}, {15.5, 12.5}}}]}, { FaceForm[ GrayLevel[0.6]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 20.}, {15., 20.}, { 15., 12.}, {23., 12.}}, {{22., 13.}, {16., 13.}, {16., 19.}, {22., 19.}}}]}, { FaceForm[ GrayLevel[0.9]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 30.5, 30.5}, {37.5, 30.5}, {37.5, 23.5}, {30.5, 23.5}}}]}, { FaceForm[ GrayLevel[0.6]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 31.}, {30., 31.}, { 30., 23.}, {38., 23.}}, {{37., 24.}, {31., 24.}, {31., 30.}, {37., 30.}}}]}, { FaceForm[ GrayLevel[0.9]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 45.5, 40.5}, {52.5, 40.5}, {52.5, 33.5}, {45.5, 33.5}}}]}, { FaceForm[ GrayLevel[0.6]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{53., 41.}, {45., 41.}, { 45., 33.}, {53., 33.}}, {{52., 34.}, {46., 34.}, {46., 40.}, {52., 40.}}}]}}, BaseStyle -> GrayLevel[0.6], ImageMargins -> 0, ImageSize -> {36, Automatic}, PlotRangePadding -> 0], StyleBox[ "uninitialized", LineColor -> RGBColor[0.66, 0, 0], FrontFaceColor -> RGBColor[0.66, 0, 0], BackFaceColor -> RGBColor[0.66, 0, 0], GraphicsColor -> RGBColor[0.66, 0, 0], FontFamily -> "Roboto", FontSize -> 8, FontColor -> RGBColor[0.66, 0, 0], Background -> GrayLevel[1, 0.65]]}, Alignment -> {Center, Scaled[0.0001]}], GridBox[{{ StyleBox[ TemplateBox[{ TemplateBox[{ StyleBox["\"Input\"", GrayLevel[0], StripOnInput -> False], "\" \"", "\"port\""}, "RowDefault"], "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox[ TemplateBox[{"\"3-tensor\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{ "\[Times]", "\"\[Times]\"", "\"1\"", "\"28\"", "\"28\""}, "RowWithSeparators"], "\"\[VeryThinSpace]\"", "\")\""}, "RowDefault"], GrayLevel[0.5], StripOnInput -> False]}, "RowDefault"], "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Number of outputs\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["2", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Number of layers\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["8", "SummaryItem"]}}, BaselinePosition -> {2, 1}, GridBoxAlignment -> { "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> { "Columns" -> {{2}}, "Rows" -> {{Automatic}}}]}}, BaselinePosition -> {1, 3}, GridBoxAlignment -> {"Rows" -> {{Top}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> {"Columns" -> { Offset[0.], { Offset[0.5599999999999999]}, Offset[0.]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.], { Offset[0.4]}, Offset[0.]}, "RowsIndexed" -> {}}], True -> GridBox[{{ PaneBox[ ButtonBox[ DynamicBox[ FEPrivate`FrontEndResource[ "FEBitmaps", "SquareMinusIconMedium"], ImageSizeCache -> {12., {0., 12.}}], Appearance -> None, ButtonFunction :> (Typeset`open = False), Evaluator -> Automatic, Method -> "Preemptive"], Alignment -> {Center, Center}, ImageSize -> {Automatic, 24}], OverlayBox[{ GraphicsBox[{ Thickness[0.0149], { GrayLevel[0.6], Thickness[0.03], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{1, 4, 3}}}, {{{18., 37.}, {18., 37.}, { 18.5, 27.5}, {35., 27.}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{50., 37.}, {50., 37.}, { 49.5, 27.5}, {33., 27.}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{18., 16.}, {18., 16.}, { 18.5, 25.5}, {35., 26.}}}, CurveClosed -> {0}]}, { FaceForm[ GrayLevel[0.9]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 40.5}, {22.5, 40.5}, {22.5, 33.5}, {15.5, 33.5}}}]}, { FaceForm[ GrayLevel[0.6]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 41.}, {15., 41.}, { 15., 33.}, {23., 33.}}, {{22., 34.}, {16., 34.}, {16., 40.}, {22., 40.}}}]}, { FaceForm[ GrayLevel[0.9]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 19.5}, {22.5, 19.5}, {22.5, 12.5}, {15.5, 12.5}}}]}, { FaceForm[ GrayLevel[0.6]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 20.}, {15., 20.}, { 15., 12.}, {23., 12.}}, {{22., 13.}, {16., 13.}, {16., 19.}, {22., 19.}}}]}, { FaceForm[ GrayLevel[0.9]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 30.5, 30.5}, {37.5, 30.5}, {37.5, 23.5}, {30.5, 23.5}}}]}, { FaceForm[ GrayLevel[0.6]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 31.}, {30., 31.}, { 30., 23.}, {38., 23.}}, {{37., 24.}, {31., 24.}, {31., 30.}, {37., 30.}}}]}, { FaceForm[ GrayLevel[0.9]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 45.5, 40.5}, {52.5, 40.5}, {52.5, 33.5}, {45.5, 33.5}}}]}, { FaceForm[ GrayLevel[0.6]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{53., 41.}, {45., 41.}, { 45., 33.}, {53., 33.}}, {{52., 34.}, {46., 34.}, {46., 40.}, {52., 40.}}}]}}, BaseStyle -> GrayLevel[0.6], ImageMargins -> 0, ImageSize -> {36, Automatic}, PlotRangePadding -> 0], StyleBox[ "uninitialized", LineColor -> RGBColor[0.66, 0, 0], FrontFaceColor -> RGBColor[0.66, 0, 0], BackFaceColor -> RGBColor[0.66, 0, 0], GraphicsColor -> RGBColor[0.66, 0, 0], FontFamily -> "Roboto", FontSize -> 8, FontColor -> RGBColor[0.66, 0, 0], Background -> GrayLevel[1, 0.65]]}, Alignment -> {Center, Scaled[0.0001]}], GridBox[{{ DynamicModuleBox[{ NeuralNetworks`Private`NetGraph`selection = None}, GridBox[{{ TagBox[ GraphicsBox[{{ GrayLevel[0.7], LineBox[{{-9., 5.51091059616309*^-16}, {-8., 4.898587196589413*^-16}}], LineBox[{{-8., 4.898587196589413*^-16}, {-7., 4.286263797015736*^-16}}], LineBox[{{-7., 4.286263797015736*^-16}, {-6., 3.6739403974420594`*^-16}}], LineBox[CompressedData[" 1:eJxTTMoPSmViYGCQAWIQDQESB7i65vlYVu6yWZn+5tHX8+IHylZJbbJ22WUT uYTH5u4s8QNvu1yVVnHusuHZlsC9LUH8QKG2/NyWkzttDs95EdCgKH7gb/dy pdPNO23qI0AaxA7MWHNvU63FThv7l5PtXk4WO2Dbe8R3zvMdNiz+25+1u4od eKsb+Vlt4g6bs518rBKfRA+s7JuzWNZ0h82smSAgeqBgfV9cw+XtNusypwrx O4ge2Lx+5Srm2Tn7/Z7a3at6KXLg5UYQv2d/Bc+0P3emihzwLfnPbyS+YL/u /Vm5pq4iB0o3geTX7M+J9TVs+S58oHJyyF2pyG37TdrXup9cI3ygAKz+wP7O mN0bWFKFD+x6s/LcumdH96ffLcsxUxA+MB2s/8z+C5wPquLuCR1gTf4fKCF1 aX/L82UBm3KEDhxon/j1lsnN/ftnP2fiZhY6IOvSdtH//P39DWqLJmYsFDzA c+Zd0e4vj/Yfa7/255S74IEbB70lVxx8un/S/hYXo28CB0qYb93O9Xux/8nZ NRnz1ggcuDdh5i6e2a/2793kl8mfLXBAKqtra8vyN/tl8rLcWg0FDqj0rzlz tfjdfkh8CRz49x8E3u8HAPlK5gY= "]], LineBox[{{-6., 3.6739403974420594`*^-16}, {-5., -0.9999999999999997}}], LineBox[{{-5., -0.9999999999999997}, {-4., \ -0.9999999999999998}}], LineBox[{{-4., -0.9999999999999998}, {-3., \ -0.9999999999999998}}], LineBox[CompressedData[" 1:eJxTTMoPSmViYGCQAWIQDQECB/79B4H3+08oaxd/ncN/IHvHSknRYx/2t89K 0n2oyX/g0ymrpbZrPu63Slmmd3gZ34E+882LKjd92n+v4VvZbGG+Ay7/hIRO 3vi8v+xDEFtWAe8BIfmoz9ryX/ezbN59R28vz4EfMzvcFrV+299ywuDXy5/c B77nzePW4fmx/6fBprjZatwH+ObNdjq56ef+xDf2XM7OXAds1BteV1b+3m/o KqQ+eT/ngZUnV3XNz/mz/71b57xvppwH0g5pqWk5/90/4+OSgtxlHAcKBBn2 Sf79u1/LNXXudwGOA8e2aQXlzfq3f7njKZWppewHsjateqQu/X+/wPPLbG5X 2A5EszTku9X/359i2uTMpct2YNaaVT9OHvu/f7HO1VsP61kPqK7Wqtv08f/+ M2DAAg2f//vT3jz6el6a5cAfKP9X4kSjDyXMcPkW3RtNujeYDvyH8ln8tz9r d0Xwq47pxf3fwwhX/2qy3cvJdgg+WPkpBjh/jYG6lUgCA1w/NMLgfADboAu/ "]], LineBox[{{-3., -0.9999999999999998}, {-2., \ -0.9999999999999999}}], LineBox[{{-3., -0.9999999999999998}, {-2., \ -1.9999999999999998`}}], LineBox[{{-2., -1.9999999999999998`}, \ {-1.0000000000000002`, -2.}}], LineBox[{{-1.0000000000000002`, -2.}, \ {-1.2246467991473532`*^-16, -2.}}]}, { InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-8.4, 5.143516556418883*^-16}, {-0.25, 0}, Offset[8], {1., -6.123233995736767*^-17}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-7.4, 4.531193156845207*^-16}, {-0.25, 0}, Offset[8], {1., -6.123233995736767*^-17}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-6.4, 3.9188697572715305`*^-16}, {-0.25, 0}, Offset[8], {1., -6.123233995736767*^-17}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-4.883693638516403, \ -0.14840512691569488`}, {-0.25, 0}, Offset[8], {0.07008586743419709, -0.04539450940950679}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-5.4, -0.5999999999999996}, \ {-0.25, 0}, Offset[8], {1., -1.}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-4.4, -0.9999999999999998}, \ {-0.25, 0}, Offset[8], {1., -1.1102230246251565`*^-16}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-3.4, -0.9999999999999998}, \ {-0.25, 0}, Offset[8], {1., 0.}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-2.8128207114948767`, \ -1.9773027452952463`}, {-0.25, 0}, Offset[8], {0.08165695756016156, -0.01745942669596423}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-2.4000000000000004`, \ -0.9999999999999998}, {-0.25, 0}, Offset[8], {1., -1.1102230246251565`*^-16}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-2.4000000000000004`, \ -1.5999999999999996`}, {-0.25, 0}, Offset[8], {1., -1.}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-1.4000000000000001`, -2.}, \ {-0.25, 0}, Offset[8], {0.9999999999999998, -2.220446049250313*^-16}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-0.4000000000000002, -2.}, \ {-0.25, 0}, Offset[8], {1., 0.}]}, { EdgeForm[ AbsoluteThickness[1]], StyleBox[{ TagBox[ TagBox[ TooltipBox[{ GrayLevel[0.85], EdgeForm[ GrayLevel[0.5]], DiskBox[{-9., 5.51091059616309*^-16}, Offset[{2., 2.}, {0., 0.}]]}, TagBox[ GridBox[{{ StyleBox["\"Input\"", Bold, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Input", Bold]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 1), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ EdgeForm[ RGBColor[0.881, 0.65, 0.65]], FaceForm[ RGBColor[ 0.9206666666666666, 0.7666666666666667, 0.7666666666666667]], RectangleBox[ Offset[{-12, -12}, {-8., 4.898587196589413*^-16}], Offset[{12, 12}, {-8., 4.898587196589413*^-16}]]}, InsetBox[ GraphicsBox[{ Thickness[0.014925373134328358`], { GrayLevel[0.5], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{23., 91.5}, {30., 91.5}}}, CurveClosed -> {0}]}, { GrayLevel[0.5], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{37., 91.5}, {44., 91.5}}}, CurveClosed -> {0}]}, { FaceForm[{ GrayLevel[0.7], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 103.5}, {23.5, 103.5}, {23.5, 79.5}, {15.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.4], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{24., 104.}, {15., 104.}, { 15., 79.}, {24., 79.}}, {{23., 80.}, {16., 80.}, {16., 103.}, {23., 103.}}}]}, { FaceForm[{ GrayLevel[0.7], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 29.5, 103.5}, {37.5, 103.5}, {37.5, 79.5}, {29.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.4], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 104.}, {29., 104.}, { 29., 79.}, {38., 79.}}, {{37., 80.}, {30., 80.}, {30., 103.}, {37., 103.}}}]}, { FaceForm[{ GrayLevel[0.7], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 43.5, 103.5}, {51.5, 103.5}, {51.5, 79.5}, {43.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.4], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{52., 104.}, {43., 104.}, { 43., 79.}, {52., 79.}}, {{51., 80.}, {44., 80.}, {44., 103.}, {51., 103.}}}]}}, AspectRatio -> 0.7, BaseStyle -> GrayLevel[0.4], ImageMargins -> 0., ImagePadding -> 0, ImageSize -> 16, PlotRange -> All, PlotRangePadding -> 1], {-8., 4.898587196589413*^-16}]}, TagBox[ GridBox[{{ StyleBox["\"ReLUConv1\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"NetChain", "[", RowBox[{"\[LeftSkeleton]", "2", "\[RightSkeleton]"}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["ReLUConv1", Bold], Style[ HoldForm[ NetChain[ Skeleton[2]]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 2), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ EdgeForm[ RGBColor[0.881, 0.65, 0.65]], FaceForm[ RGBColor[ 0.9206666666666666, 0.7666666666666667, 0.7666666666666667]], RectangleBox[ Offset[{-12, -12}, {-7., 4.286263797015736*^-16}], Offset[{12, 12}, {-7., 4.286263797015736*^-16}]]}, InsetBox[ GraphicsBox[{ Thickness[0.014925373134328358`], { GrayLevel[0.5], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{23., 91.5}, {30., 91.5}}}, CurveClosed -> {0}]}, { GrayLevel[0.5], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{37., 91.5}, {44., 91.5}}}, CurveClosed -> {0}]}, { FaceForm[{ GrayLevel[0.7], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 103.5}, {23.5, 103.5}, {23.5, 79.5}, {15.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.4], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{24., 104.}, {15., 104.}, { 15., 79.}, {24., 79.}}, {{23., 80.}, {16., 80.}, {16., 103.}, {23., 103.}}}]}, { FaceForm[{ GrayLevel[0.7], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 29.5, 103.5}, {37.5, 103.5}, {37.5, 79.5}, {29.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.4], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 104.}, {29., 104.}, { 29., 79.}, {38., 79.}}, {{37., 80.}, {30., 80.}, {30., 103.}, {37., 103.}}}]}, { FaceForm[{ GrayLevel[0.7], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 43.5, 103.5}, {51.5, 103.5}, {51.5, 79.5}, {43.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.4], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{52., 104.}, {43., 104.}, { 43., 79.}, {52., 79.}}, {{51., 80.}, {44., 80.}, {44., 103.}, {51., 103.}}}]}}, AspectRatio -> 0.7, BaseStyle -> GrayLevel[0.4], ImageMargins -> 0., ImagePadding -> 0, ImageSize -> 16, PlotRange -> All, PlotRangePadding -> 1], {-7., 4.286263797015736*^-16}]}, TagBox[ GridBox[{{ StyleBox[ "\"PrimaryCaps\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"NetChain", "[", RowBox[{"\[LeftSkeleton]", "4", "\[RightSkeleton]"}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["PrimaryCaps", Bold], Style[ HoldForm[ NetChain[ Skeleton[4]]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 3), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ EdgeForm[ RGBColor[0.881, 0.65, 0.65]], FaceForm[ RGBColor[ 0.9206666666666666, 0.7666666666666667, 0.7666666666666667]], RectangleBox[ Offset[{-12, -12}, {-6., 3.6739403974420594`*^-16}], Offset[{12, 12}, {-6., 3.6739403974420594`*^-16}]]}, InsetBox[ GraphicsBox[{ Thickness[0.0149], { GrayLevel[0.5], Thickness[0.03], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{1, 4, 3}}}, {{{39.192120463394616`, 30.51535353195944}, {39.192120463394616`, 30.51535353195944}, {38.69442248591872, 35.17935629818005}, {28.246036107633145`, 35.21413676830481}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{39.335627149246974`, 22.022653388846493`}, {39.335627149246974`, 22.022653388846493`}, {39.028664759644585`, 18.313538367818456`}, {28.898905902765012`, 18.118321787764348`}}}, CurveClosed -> {0}]}, GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ GrayLevel[0.7]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 40.5}, {22.5, 40.5}, {22.5, 33.5}, {15.5, 33.5}}}]}, { FaceForm[ GrayLevel[0.4]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 41.}, {15., 41.}, { 15., 33.}, {23., 33.}}, {{22., 34.}, {16., 34.}, {16., 40.}, {22., 40.}}}]}}]}], {{{{1.6209767772132715`, 0.}, { 0., 1.302327038770047}}, {-8.296516058106576, \ -14.790162389666165`}}}], GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ GrayLevel[0.7]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 19.5}, {22.5, 19.5}, {22.5, 12.5}, {15.5, 12.5}}}]}, { FaceForm[ GrayLevel[0.4]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 20.}, {15., 20.}, { 15., 12.}, {23., 12.}}, {{22., 13.}, {16., 13.}, {16., 19.}, {22., 19.}}}]}}]}], {{{{1.6446663930506598`, 0.}, { 0., 1.2828873028183188`}}, {-8.702521921403617, \ -2.012105908138385}}}], GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ GrayLevel[0.7]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 30.5, 30.5}, {37.5, 30.5}, {37.5, 23.5}, {30.5, 23.5}}}]}, { FaceForm[ GrayLevel[0.4]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 31.}, {30., 31.}, { 30., 23.}, {38., 23.}}, {{37., 24.}, {31., 24.}, {31., 30.}, {37., 30.}}}]}}]}], {{{{1.5182866155506958`, 0.}, { 0., 1.2065857650683098`}}, {-11.402865979580374`, \ -6.527851836053724}}}]}, AspectRatio -> 1, BaseStyle -> GrayLevel[0.4], ImageMargins -> 0., ImagePadding -> 0, ImageSize -> 15, PlotRange -> All, PlotRangePadding -> 0], {-6., 3.6739403974420594`*^-16}]}, TagBox[ GridBox[{{ StyleBox[ "\"PrimaryPredVects\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"NetGraph", "[", RowBox[{ RowBox[{"\[LeftSkeleton]", "4", "\[RightSkeleton]"}], ",", RowBox[{"\[LeftSkeleton]", "5", "\[RightSkeleton]"}]}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["PrimaryPredVects", Bold], Style[ HoldForm[ NetGraph[ Skeleton[4], Skeleton[5]]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 4), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ EdgeForm[ GrayLevel[0.85]], FaceForm[ RGBColor[0.9, 0.9, 0.9]], RectangleBox[ Offset[{-12, -12}, {-4., -0.9999999999999998}], Offset[{12, 12}, {-4., -0.9999999999999998}]]}, InsetBox[ GraphicsBox[{ Thickness[0.0149], { GrayLevel[0.5], Thickness[0.03], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{1, 4, 3}}}, {{{39.192120463394616`, 30.51535353195944}, {39.192120463394616`, 30.51535353195944}, {38.69442248591872, 35.17935629818005}, {28.246036107633145`, 35.21413676830481}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{39.335627149246974`, 22.022653388846493`}, {39.335627149246974`, 22.022653388846493`}, {39.028664759644585`, 18.313538367818456`}, {28.898905902765012`, 18.118321787764348`}}}, CurveClosed -> {0}]}, GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ GrayLevel[0.7]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 40.5}, {22.5, 40.5}, {22.5, 33.5}, {15.5, 33.5}}}]}, { FaceForm[ GrayLevel[0.4]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 41.}, {15., 41.}, { 15., 33.}, {23., 33.}}, {{22., 34.}, {16., 34.}, {16., 40.}, {22., 40.}}}]}}]}], {{{{1.6209767772132715`, 0.}, { 0., 1.302327038770047}}, {-8.296516058106576, \ -14.790162389666165`}}}], GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ GrayLevel[0.7]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 19.5}, {22.5, 19.5}, {22.5, 12.5}, {15.5, 12.5}}}]}, { FaceForm[ GrayLevel[0.4]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 20.}, {15., 20.}, { 15., 12.}, {23., 12.}}, {{22., 13.}, {16., 13.}, {16., 19.}, {22., 19.}}}]}}]}], {{{{1.6446663930506598`, 0.}, { 0., 1.2828873028183188`}}, {-8.702521921403617, \ -2.012105908138385}}}], GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ GrayLevel[0.7]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 30.5, 30.5}, {37.5, 30.5}, {37.5, 23.5}, {30.5, 23.5}}}]}, { FaceForm[ GrayLevel[0.4]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 31.}, {30., 31.}, { 30., 23.}, {38., 23.}}, {{37., 24.}, {31., 24.}, {31., 30.}, {37., 30.}}}]}}]}], {{{{1.5182866155506958`, 0.}, { 0., 1.2065857650683098`}}, {-11.402865979580374`, \ -6.527851836053724}}}]}, AspectRatio -> 1, BaseStyle -> GrayLevel[0.4], ImageMargins -> 0., ImagePadding -> 0, ImageSize -> 15, PlotRange -> All, PlotRangePadding -> 0], {-4., -0.9999999999999998}]}, TagBox[ GridBox[{{ StyleBox["\"DigitCaps\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"NetGraph", "[", RowBox[{ RowBox[{"\[LeftSkeleton]", "3", "\[RightSkeleton]"}], ",", RowBox[{"\[LeftSkeleton]", "5", "\[RightSkeleton]"}]}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["DigitCaps", Bold], Style[ HoldForm[ NetGraph[ Skeleton[3], Skeleton[5]]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 5), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ EdgeForm[ GrayLevel[0.85]], FaceForm[ RGBColor[0.9, 0.9, 0.9]], RectangleBox[ Offset[{-12, -12}, {-5., -0.9999999999999997}], Offset[{12, 12}, {-5., -0.9999999999999997}]]}, InsetBox[ GraphicsBox[{ Thickness[0.014925373134328358`], { GrayLevel[0.5], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{23., 91.5}, {30., 91.5}}}, CurveClosed -> {0}]}, { GrayLevel[0.5], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{37., 91.5}, {44., 91.5}}}, CurveClosed -> {0}]}, { FaceForm[{ GrayLevel[0.7], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 103.5}, {23.5, 103.5}, {23.5, 79.5}, {15.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.4], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{24., 104.}, {15., 104.}, { 15., 79.}, {24., 79.}}, {{23., 80.}, {16., 80.}, {16., 103.}, {23., 103.}}}]}, { FaceForm[{ GrayLevel[0.7], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 29.5, 103.5}, {37.5, 103.5}, {37.5, 79.5}, {29.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.4], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 104.}, {29., 104.}, { 29., 79.}, {38., 79.}}, {{37., 80.}, {30., 80.}, {30., 103.}, {37., 103.}}}]}, { FaceForm[{ GrayLevel[0.7], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 43.5, 103.5}, {51.5, 103.5}, {51.5, 79.5}, {43.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.4], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{52., 104.}, {43., 104.}, { 43., 79.}, {52., 79.}}, {{51., 80.}, {44., 80.}, {44., 103.}, {51., 103.}}}]}}, AspectRatio -> 0.7, BaseStyle -> GrayLevel[0.4], ImageMargins -> 0., ImagePadding -> 0, ImageSize -> 16, PlotRange -> All, PlotRangePadding -> 1], {-5., -0.9999999999999997}]}, TagBox[ GridBox[{{ StyleBox[ "\"DynamicRouting\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"NetChain", "[", RowBox[{"\[LeftSkeleton]", "3", "\[RightSkeleton]"}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["DynamicRouting", Bold], Style[ HoldForm[ NetChain[ Skeleton[3]]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 6), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ EdgeForm[ GrayLevel[0.85]], FaceForm[ RGBColor[0.9, 0.9, 0.9]], RectangleBox[ Offset[{-12, -12}, {-3., -0.9999999999999998}], Offset[{12, 12}, {-3., -0.9999999999999998}]]}, InsetBox[ GraphicsBox[{ Thickness[0.014925373134328358`], { GrayLevel[0.5], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{23., 91.5}, {30., 91.5}}}, CurveClosed -> {0}]}, { GrayLevel[0.5], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{37., 91.5}, {44., 91.5}}}, CurveClosed -> {0}]}, { FaceForm[{ GrayLevel[0.7], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 103.5}, {23.5, 103.5}, {23.5, 79.5}, {15.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.4], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{24., 104.}, {15., 104.}, { 15., 79.}, {24., 79.}}, {{23., 80.}, {16., 80.}, {16., 103.}, {23., 103.}}}]}, { FaceForm[{ GrayLevel[0.7], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 29.5, 103.5}, {37.5, 103.5}, {37.5, 79.5}, {29.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.4], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 104.}, {29., 104.}, { 29., 79.}, {38., 79.}}, {{37., 80.}, {30., 80.}, {30., 103.}, {37., 103.}}}]}, { FaceForm[{ GrayLevel[0.7], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 43.5, 103.5}, {51.5, 103.5}, {51.5, 79.5}, {43.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.4], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{52., 104.}, {43., 104.}, { 43., 79.}, {52., 79.}}, {{51., 80.}, {44., 80.}, {44., 103.}, {51., 103.}}}]}}, AspectRatio -> 0.7, BaseStyle -> GrayLevel[0.4], ImageMargins -> 0., ImagePadding -> 0, ImageSize -> 16, PlotRange -> All, PlotRangePadding -> 1], {-3., -0.9999999999999998}]}, TagBox[ GridBox[{{ StyleBox["\"Norm\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"NetChain", "[", RowBox[{"\[LeftSkeleton]", "3", "\[RightSkeleton]"}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Norm", Bold], Style[ HoldForm[ NetChain[ Skeleton[3]]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 7), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ EdgeForm[ Hue[0, 1., 0.9]], FaceForm[ RGBColor[ 0.9333333333333333, 0.3333333333333333, 0.3333333333333333]], RectangleBox[ Offset[{-10, -10}, {-2., -1.9999999999999998`}], Offset[{10, 10}, {-2., -1.9999999999999998`}]]}, InsetBox["\"MX\"", Offset[{0, -1}, {-2., -1.9999999999999998`}]]}, TagBox[ GridBox[{{ StyleBox["\"Pick\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"NeuralNetworks`MXLayer", "[", RowBox[{ RowBox[{ RowBox[{"Block", "[", RowBox[{ RowBox[{"{", RowBox[{"index", ",", "norms", ",", "picked", ",", "vectors"}], "}"}], ",", RowBox[{ RowBox[{"norms", "=", RowBox[{"NeuralNetworks`Private`GetInput", "[", "\"Norms\"", "]"}]}], ";", RowBox[{"vectors", "=", RowBox[{"NeuralNetworks`Private`GetInput", "[", "\"Vectors\"", "]"}]}], ";", RowBox[{"index", "=", RowBox[{"NeuralNetworks`Private`SowNode", "[", RowBox[{"\"argmax\"", ",", "norms", ",", RowBox[{"\"axis\"", "\[Rule]", "1"}]}], "]"}]}], ";", RowBox[{"index", "=", RowBox[{"NeuralNetworks`Private`SowNode", "[", RowBox[{"\"reshape\"", ",", "index", ",", RowBox[{"\"shape\"", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}]}], "]"}]}], ";", RowBox[{"index", "=", RowBox[{"NeuralNetworks`Private`SowNode", "[", RowBox[{"\"broadcast_axis\"", ",", "index", ",", RowBox[{"\"axis\"", "\[Rule]", "1"}], ",", RowBox[{"\"size\"", "\[Rule]", "16"}]}], "]"}]}], ";", RowBox[{"picked", "=", RowBox[{"NeuralNetworks`Private`SowNode", "[", RowBox[{"\"pick\"", ",", RowBox[{"{", RowBox[{"vectors", ",", "index"}], "}"}], ",", RowBox[{"\"axis\"", "\[Rule]", "1"}]}], "]"}]}], ";", RowBox[{"NeuralNetworks`Private`SetOutput", "[", RowBox[{"\"Output\"", ",", "picked"}], "]"}]}]}], "]"}], "&"}], ",", RowBox[{"\"Vectors\"", "\[Rule]", RowBox[{"{", RowBox[{"10", ",", "16"}], "}"}]}], ",", RowBox[{"\"Norms\"", "\[Rule]", "10"}]}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Pick", Bold], Style[ HoldForm[ NeuralNetworks`MXLayer[ Block[{$CellContext`index, $CellContext`norms, \ $CellContext`picked, $CellContext`vectors}, $CellContext`norms = NeuralNetworks`Private`GetInput[ "Norms"]; $CellContext`vectors = NeuralNetworks`Private`GetInput[ "Vectors"]; $CellContext`index = NeuralNetworks`Private`SowNode[ "argmax", $CellContext`norms, "axis" -> 1]; $CellContext`index = NeuralNetworks`Private`SowNode[ "reshape", $CellContext`index, "shape" -> {0, 1}]; $CellContext`index = NeuralNetworks`Private`SowNode[ "broadcast_axis", $CellContext`index, "axis" -> 1, "size" -> 16]; $CellContext`picked = NeuralNetworks`Private`SowNode[ "pick", {$CellContext`vectors, $CellContext`index}, "axis" -> 1]; NeuralNetworks`Private`SetOutput[ "Output", $CellContext`picked]]& , "Vectors" -> {10, 16}, "Norms" -> 10]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 8), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{ GrayLevel[0.85], EdgeForm[ GrayLevel[0.5]], DiskBox[{-2., -0.9999999999999999}, Offset[{2., 2.}, {0., 0.}]]}, TagBox[ GridBox[{{ StyleBox[ "\"Classification\"", Bold, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Classification", Bold]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 9), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ EdgeForm[ RGBColor[0.881, 0.65, 0.65]], FaceForm[ RGBColor[ 0.9206666666666666, 0.7666666666666667, 0.7666666666666667]], RectangleBox[ Offset[{-12, -12}, {-1.0000000000000002`, -2.}], Offset[{12, 12}, {-1.0000000000000002`, -2.}]]}, InsetBox[ GraphicsBox[{ Thickness[0.014925373134328358`], { GrayLevel[0.5], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{23., 91.5}, {30., 91.5}}}, CurveClosed -> {0}]}, { GrayLevel[0.5], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{37., 91.5}, {44., 91.5}}}, CurveClosed -> {0}]}, { FaceForm[{ GrayLevel[0.7], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 103.5}, {23.5, 103.5}, {23.5, 79.5}, {15.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.4], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{24., 104.}, {15., 104.}, { 15., 79.}, {24., 79.}}, {{23., 80.}, {16., 80.}, {16., 103.}, {23., 103.}}}]}, { FaceForm[{ GrayLevel[0.7], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 29.5, 103.5}, {37.5, 103.5}, {37.5, 79.5}, {29.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.4], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 104.}, {29., 104.}, { 29., 79.}, {38., 79.}}, {{37., 80.}, {30., 80.}, {30., 103.}, {37., 103.}}}]}, { FaceForm[{ GrayLevel[0.7], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 43.5, 103.5}, {51.5, 103.5}, {51.5, 79.5}, {43.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.4], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{52., 104.}, {43., 104.}, { 43., 79.}, {52., 79.}}, {{51., 80.}, {44., 80.}, {44., 103.}, {51., 103.}}}]}}, AspectRatio -> 0.7, BaseStyle -> GrayLevel[0.4], ImageMargins -> 0., ImagePadding -> 0, ImageSize -> 16, PlotRange -> All, PlotRangePadding -> 1], {-1.0000000000000002`, -2.}]}, TagBox[ GridBox[{{ StyleBox[ "\"Reconstruct\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"NetChain", "[", RowBox[{"\[LeftSkeleton]", "7", "\[RightSkeleton]"}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Reconstruct", Bold], Style[ HoldForm[ NetChain[ Skeleton[7]]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 10), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{ GrayLevel[0.85], EdgeForm[ GrayLevel[0.5]], DiskBox[{-1.2246467991473532`*^-16, -2.}, Offset[{2., 2.}, {0., 0.}]]}, TagBox[ GridBox[{{ StyleBox[ "\"Reconstruction\"", Bold, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Reconstruction", Bold]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 11), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]]}, FontSize -> 10]}, { StyleBox[{ InsetBox["\"Input\"", Offset[{0, -7}, {-9., 5.51091059616309*^-16}], {0, 1.}, Automatic, {1, 0}], InsetBox["\"ReLUConv1\"", Offset[{0, -15}, {-8., 4.898587196589413*^-16}], {0, 1.}, Automatic, {1, 0}], InsetBox[ TagBox[ TooltipBox[ "\"PrimaryCa..\"", "\"PrimaryCaps\"", TooltipStyle -> "TextStyling"], Annotation[#, "PrimaryCaps", "Tooltip"]& ], Offset[{0, -15}, {-7., 4.286263797015736*^-16}], {0, 1.}, Automatic, {1, 0}], InsetBox[ TagBox[ TooltipBox[ "\"PrimaryPr..\"", "\"PrimaryPredVects\"", TooltipStyle -> "TextStyling"], Annotation[#, "PrimaryPredVects", "Tooltip"]& ], Offset[{0, -15}, {-6., 3.6739403974420594`*^-16}], { 0, 1.}, Automatic, {1, 0}], InsetBox["\"DigitCaps\"", Offset[{0, -15}, {-4., -0.9999999999999998}], {0, 1.}, Automatic, {1, 0}], InsetBox[ TagBox[ TooltipBox[ "\"DynamicRo..\"", "\"DynamicRouting\"", TooltipStyle -> "TextStyling"], Annotation[#, "DynamicRouting", "Tooltip"]& ], Offset[{0, -15}, {-5., -0.9999999999999997}], {0, 1.}, Automatic, {1, 0}], InsetBox["\"Norm\"", Offset[{0, -15}, {-3., -0.9999999999999998}], {0, 1.}, Automatic, {1, 0}], InsetBox["\"Pick\"", Offset[{0, -13}, {-2., -1.9999999999999998`}], {0, 1.}, Automatic, {1, 0}], InsetBox[ TagBox[ TooltipBox[ "\"Classific..\"", "\"Classification\"", TooltipStyle -> "TextStyling"], Annotation[#, "Classification", "Tooltip"]& ], Offset[{0, -7}, {-2., -0.9999999999999999}], {0, 1.}, Automatic, {1, 0}], InsetBox[ TagBox[ TooltipBox[ "\"Reconstru..\"", "\"Reconstruct\"", TooltipStyle -> "TextStyling"], Annotation[#, "Reconstruct", "Tooltip"]& ], Offset[{0, -15}, {-1.0000000000000002`, -2.}], {0, 1.}, Automatic, {1, 0}], InsetBox[ TagBox[ TooltipBox[ "\"Reconstru..\"", "\"Reconstruction\"", TooltipStyle -> "TextStyling"], Annotation[#, "Reconstruction", "Tooltip"]& ], Offset[{0, -7}, {-1.2246467991473532`*^-16, -2.}], { 0, 1.}, Automatic, {1, 0}]}, StripOnInput -> False, FontColor -> GrayLevel[0.5]], StyleBox[{ InsetBox[ TemplateBox[{ "\[Cross]", "\"\[Cross]\"", "\"1\"", "\"28\"", "\"28\""}, "RowWithSeparators"], Offset[{3.367778697655222*^-16, 5.5}, {-8.4, 5.143516556418883*^-16}], {0., -0.17}, Automatic, { 1., -6.123233995736767*^-17}], InsetBox[ TemplateBox[{ "\[Cross]", "\"\[Cross]\"", "\"256\"", "\"20\"", "\"20\""}, "RowWithSeparators"], Offset[{3.367778697655222*^-16, 5.5}, {-7.4, 4.531193156845207*^-16}], {0., -0.17}, Automatic, { 1., -6.123233995736767*^-17}], InsetBox[ TemplateBox[{ "\[Cross]", "\"\[Cross]\"", "\"1152\"", "\"8\""}, "RowWithSeparators"], Offset[{3.367778697655222*^-16, 5.5}, {-6.4, 3.9188697572715305`*^-16}], {0., -0.17}, Automatic, { 1., -6.123233995736767*^-17}], InsetBox[ TemplateBox[{ "\[Cross]", "\"\[Cross]\"", "\"1152\"", "\"10\"", "\"16\""}, "RowWithSeparators"], Offset[{2.989963099218114, 4.616288624567794}, {-4.883693638516403, \ -0.14840512691569488`}], {0., -0.17}, Automatic, { 0.8393252044668715, -0.5436296544032935}], InsetBox[ TemplateBox[{ "\[Cross]", "\"\[Cross]\"", "\"1152\"", "\"10\"", "\"16\""}, "RowWithSeparators"], Offset[{3.889087296526011, 3.889087296526011}, {-5.4, -0.5999999999999996}], { 0., -0.17}, Automatic, { 0.7071067811865475, -0.7071067811865475}], InsetBox[ TemplateBox[{"\[Cross]", "\"\[Cross]\"", "\"11520\""}, "RowWithSeparators"], Offset[{6.106226635438361*^-16, 5.5}, {-4.4, -0.9999999999999998}], {0., -0.17}, Automatic, {1., -1.1102230246251565`*^-16}], InsetBox[ TemplateBox[{ "\[Cross]", "\"\[Cross]\"", "\"10\"", "\"16\""}, "RowWithSeparators"], Offset[{0., 5.5}, {-3.4, -0.9999999999999998}], { 0., -0.17}, Automatic, {1., 0.}], InsetBox[ TemplateBox[{ "\[Cross]", "\"\[Cross]\"", "\"10\"", "\"16\""}, "RowWithSeparators"], Offset[{1.1499858073915776`, 5.378432173300872}, {-2.8128207114948767`, \ -1.9773027452952463`}], {0., -0.17}, Automatic, { 0.9778967587819768, -0.20908832861665047`}], InsetBox[ TemplateBox[{"\[Cross]", "\"\[Cross]\"", "\"10\""}, "RowWithSeparators"], Offset[{6.106226635438361*^-16, 5.5}, {-2.4000000000000004`, -0.9999999999999998}], { 0., -0.17}, Automatic, {1., -1.1102230246251565`*^-16}], InsetBox[ TemplateBox[{"\[Cross]", "\"\[Cross]\"", "\"10\""}, "RowWithSeparators"], Offset[{3.889087296526011, 3.889087296526011}, {-2.4000000000000004`, \ -1.5999999999999996`}], {0., -0.17}, Automatic, { 0.7071067811865475, -0.7071067811865475}], InsetBox[ TemplateBox[{"\[Cross]", "\"\[Cross]\"", "\"16\""}, "RowWithSeparators"], Offset[{1.2212453270876724`*^-15, 5.5}, {-1.4000000000000001`, -2.}], {0., -0.17}, Automatic, {1., -2.2204460492503136`*^-16}], InsetBox[ TemplateBox[{ "\[Cross]", "\"\[Cross]\"", "\"1\"", "\"28\"", "\"28\""}, "RowWithSeparators"], Offset[{0., 5.5}, {-0.4000000000000002, -2.}], { 0., -0.17}, Automatic, {1., 0.}]}, StripOnInput -> False, FontSize -> 8, FontWeight -> "Thin", FontColor -> GrayLevel[0.7]]}, { EdgeForm[{ GrayLevel[0.5], Thickness[Large], Dashing[{0, Small}]}], FaceForm[None], PolygonBox[ Dynamic[ If[ Not[ IntegerQ[NeuralNetworks`Private`NetGraph`selection]], {}, GeneralUtilities`Graphics`PackagePrivate`makeOffsetSquare[ Part[{{-9., 5.51091059616309*^-16}, {-8., 4.898587196589413*^-16}, {-7., 4.286263797015736*^-16}, {-6., 3.6739403974420594`*^-16}, {-4., -0.9999999999999998}, \ {-5., -0.9999999999999997}, {-3., -0.9999999999999998}, {-2., \ -1.9999999999999998`}, {-2., -0.9999999999999999}, {-1.0000000000000002`, \ -2.}, {-1.2246467991473532`*^-16, -2.}}, NeuralNetworks`Private`NetGraph`selection], 3 + {0.5, 0.5} Part[{8, 24, 24, 24, 24, 24, 24, 20, 8, 24, 8}, NeuralNetworks`Private`NetGraph`selection], {-0.5, 0.5}]]]]}}, AspectRatio -> Full, BaseStyle -> { TooltipBoxOptions -> {TooltipDelay -> 0.08}}, ImageMargins -> {{0, 0}, {0, 0}}, ImagePadding -> {{28., 28.}, {28.99999999999998, 18.}}, ImageSize -> {551., 157.}, PlotRangePadding -> 0], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = None), Method -> "Preemptive", PassEventsDown -> Automatic, PassEventsUp -> True}]]}, { DynamicBox[ If[ IntegerQ[NeuralNetworks`Private`NetGraph`selection], NeuralNetworks`Private`NetGraph`vpathInfo[ Part[{ NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "ReLUConv1"], NeuralNetworks`NetPath["Nodes", "PrimaryCaps"], NeuralNetworks`NetPath["Nodes", "PrimaryPredVects"], NeuralNetworks`NetPath["Nodes", "DigitCaps"], NeuralNetworks`NetPath["Nodes", "DynamicRouting"], NeuralNetworks`NetPath["Nodes", "Norm"], NeuralNetworks`NetPath["Nodes", "Pick"], NeuralNetworks`NetPath["Outputs", "Classification"], NeuralNetworks`NetPath["Nodes", "Reconstruct"], NeuralNetworks`NetPath["Outputs", "Reconstruction"]}, NeuralNetworks`Private`NetGraph`selection], Association[ "Input" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]], Association[ "Classification" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT], "Reconstruction" -> NetDecoder["Image", Association[ "ColorSpace" -> "RGB", "MeanImage" -> None, "VarianceImage" -> None, "$Dimensions" -> {28, 28}, "$Channels" -> 1], NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]]], Association[ "ReLUConv1" -> Association[ "Type" -> "Chain", "Nodes" -> Association[ "1" -> Association[ "Type" -> "Convolution", "Arrays" -> Association["Weights" -> NeuralNetworks`TensorT[{256, 1, 9, 9}, NeuralNetworks`RealT], "Biases" -> NeuralNetworks`Nullable[ NeuralNetworks`TensorT[{256}, NeuralNetworks`RealT]]], "Parameters" -> Association["OutputChannels" -> 256, "KernelSize" -> {9, 9}, "Stride" -> {1, 1}, "PaddingSize" -> {0, 0}, "Dilation" -> {1, 1}, "Dimensionality" -> 2, "Interleaving" -> False, "$InputChannels" -> 1, "$GroupNumber" -> 1, "$InputSize" -> {28, 28}, "$OutputSize" -> {20, 20}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]]], "2" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Ramp], "$Dimensions" -> {256, 20, 20}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]]]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "2", "Outputs", "Output"]}, "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]]], "PrimaryCaps" -> Association[ "Type" -> "Chain", "Nodes" -> Association[ "1" -> Association[ "Type" -> "Convolution", "Arrays" -> Association["Weights" -> NeuralNetworks`TensorT[{256, 256, 9, 9}, NeuralNetworks`RealT], "Biases" -> NeuralNetworks`Nullable[ NeuralNetworks`TensorT[{256}, NeuralNetworks`RealT]]], "Parameters" -> Association["OutputChannels" -> 256, "KernelSize" -> {9, 9}, "Stride" -> {2, 2}, "PaddingSize" -> {0, 0}, "Dilation" -> {1, 1}, "Dimensionality" -> 2, "Interleaving" -> False, "$InputChannels" -> 256, "$GroupNumber" -> 1, "$InputSize" -> {20, 20}, "$OutputSize" -> {6, 6}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{256, 6, 6}, NeuralNetworks`RealT]]], "2" -> Association[ "Type" -> "Transpose", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[{ TwoWayRule[1, 3], TwoWayRule[1, 2]}]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{256, 6, 6}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{6, 6, 256}, NeuralNetworks`RealT]]], "3" -> Association[ "Type" -> "Reshape", "Arrays" -> Association[], "Parameters" -> Association["Dimensions" -> {1152, 8}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{6, 6, 256}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]]], "4" -> Association[ "Type" -> "Graph", "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Nodes" -> Association["1" -> Association["Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[2], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Power, NeuralNetworks`Private`ScalarSymbol[1], 2.}]]], "$Dimensions" -> {1152, 8}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[ Span[2, All]]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Sqrt, NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[3] -> {Plus, 1., NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4] -> {Divide, NeuralNetworks`Private`ScalarSymbol[2], NeuralNetworks`Private`ScalarSymbol[3]}]]], "$Dimensions" -> {1152}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152}, NeuralNetworks`RealT]]], "4" -> Association["Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[Automatic], "Level" -> 2], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1152}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]]], "5" -> Association[ "Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association[ "Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association[ "1" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "4", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "5", "Outputs", "Output"]}]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "4", "Outputs", "Output"]}, "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]]], "PrimaryPredVects" -> Association[ "Type" -> "Graph", "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association[ "2" -> Association[ "Type" -> "ConstantArray", "Arrays" -> Association["Array" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]], "Parameters" -> Association["Dimensions" -> {1152, 10, 16, 8}], "Inputs" -> Association[], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]]], "1" -> Association[ "Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[{Automatic, Automatic}], "Level" -> 2], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]]], "3" -> Association[ "Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]]], "4" -> Association[ "Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[4]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "3", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "2"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "4", "Outputs", "Output"]}], "DynamicRouting" -> Association[ "Type" -> "Chain", "Nodes" -> Association[ "1" -> Association[ "Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[2], "Level" -> 1], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{2, 1152, 10, 16}, NeuralNetworks`RealT]]], "2" -> Association[ "Type" -> "NetFold", "Arrays" -> Association[], "Parameters" -> Association["Net" -> Association["Type" -> "Graph", "Inputs" -> Association["State" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT], "Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Nodes" -> Association[ "capsule" -> Association[ "Type" -> "Graph", "Inputs" -> Association["b" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT], "uhat" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association["c" -> Association[ "Type" -> "Chain", "Nodes" -> Association["1" -> Association[ "Type" -> "Reshape", "Arrays" -> Association[], "Parameters" -> Association["Dimensions" -> {1152, 10}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Softmax", "Arrays" -> Association[], "Parameters" -> Association["Level" -> -1], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"]}, "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]], "s" -> Association["Type" -> "Graph", "Inputs" -> Association["c" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT], "uhat" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association["1" -> Association[ "Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[Automatic], "Level" -> 3], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{ 1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[1]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "c"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "uhat"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"]}], "v" -> Association[ "Type" -> "Graph", "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association["1" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[2], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Power, NeuralNetworks`Private`ScalarSymbol[1], 2.}]]], "$Dimensions" -> {10, 16}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[ Span[2, All]]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Sqrt, NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[3] -> {Plus, 1., NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4] -> {Divide, NeuralNetworks`Private`ScalarSymbol[2], NeuralNetworks`Private`ScalarSymbol[3]}]]], "$Dimensions" -> {10}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "4" -> Association["Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[Automatic], "Level" -> 2], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]], "5" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "4", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath["Nodes", "5", "Outputs", "Output"]}]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "c", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "b"], NeuralNetworks`NetPath["Nodes", "s", "Inputs", "c"] -> NeuralNetworks`NetPath["Nodes", "c", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "s", "Inputs", "uhat"] -> NeuralNetworks`NetPath["Inputs", "uhat"], NeuralNetworks`NetPath["Nodes", "v", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "s", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "v", "Outputs", "Output"]}], "dots" -> Association["Type" -> "Graph", "Inputs" -> Association["v" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT], "uhat" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Nodes" -> Association["1" -> Association[ "Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association[ "Specification" -> NeuralNetworks`ValidatedParameter[ 1152], "Level" -> 1], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[3]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "v"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "uhat"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "3", "Outputs", "Output"]}], "dots_flatten" -> Association["Type" -> "Flatten", "Arrays" -> Association[], "Parameters" -> Association["Level" -> DirectedInfinity[1]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]]], "new_b" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Plus]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "capsule", "Inputs", "b"] -> NeuralNetworks`NetPath["Inputs", "State"], NeuralNetworks`NetPath["Nodes", "new_b", "Inputs", "1"] -> NeuralNetworks`NetPath["Inputs", "State"], NeuralNetworks`NetPath[ "Nodes", "capsule", "Inputs", "uhat"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "dots", "Inputs", "uhat"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "dots", "Inputs", "v"] -> NeuralNetworks`NetPath[ "Nodes", "capsule", "Outputs", "Output"], NeuralNetworks`NetPath[ "Nodes", "dots_flatten", "Inputs", "Input"] -> NeuralNetworks`NetPath[ "Nodes", "dots", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "new_b", "Inputs", "2"] -> NeuralNetworks`NetPath[ "Nodes", "dots_flatten", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "new_b", "Outputs", "Output"]}], "$SequenceLength" -> 2, "$InputShape" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT], "$OutputShape" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{2, 1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{2, 11520}, NeuralNetworks`RealT]], "States" -> Association[ "State" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]]], "3" -> Association[ "Type" -> "SequenceLast", "Arrays" -> Association[], "Parameters" -> Association[], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{2, 11520}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]]]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "3", "Outputs", "Output"]}, "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "InteriorStates" -> Association[{2, "State"} -> NeuralNetworks`NetPath["Nodes", "2", "States", "State"]]], "DigitCaps" -> Association[ "Type" -> "Graph", "Inputs" -> Association[ "b" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT], "uhat" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association[ "c" -> Association[ "Type" -> "Chain", "Nodes" -> Association["1" -> Association["Type" -> "Reshape", "Arrays" -> Association[], "Parameters" -> Association["Dimensions" -> {1152, 10}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Softmax", "Arrays" -> Association[], "Parameters" -> Association["Level" -> -1], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "2", "Outputs", "Output"]}, "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]], "s" -> Association[ "Type" -> "Graph", "Inputs" -> Association["c" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT], "uhat" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association[ "1" -> Association[ "Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association[ "Specification" -> NeuralNetworks`ValidatedParameter[ Automatic], "Level" -> 3], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[1]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "c"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "uhat"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "3", "Outputs", "Output"]}], "v" -> Association[ "Type" -> "Graph", "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association["1" -> Association["Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[2], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Power, NeuralNetworks`Private`ScalarSymbol[1], 2.}]]], "$Dimensions" -> {10, 16}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[ Span[2, All]]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Sqrt, NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[3] -> {Plus, 1., NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4] -> {Divide, NeuralNetworks`Private`ScalarSymbol[2], NeuralNetworks`Private`ScalarSymbol[3]}]]], "$Dimensions" -> {10}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "4" -> Association["Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[Automatic], "Level" -> 2], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]], "5" -> Association[ "Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association[ "Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association[ "1" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "4", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "5", "Outputs", "Output"]}]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "c", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "b"], NeuralNetworks`NetPath["Nodes", "s", "Inputs", "c"] -> NeuralNetworks`NetPath["Nodes", "c", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "s", "Inputs", "uhat"] -> NeuralNetworks`NetPath["Inputs", "uhat"], NeuralNetworks`NetPath["Nodes", "v", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "s", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "v", "Outputs", "Output"]}], "Norm" -> Association[ "Type" -> "Chain", "Nodes" -> Association[ "1" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[2], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Power, NeuralNetworks`Private`ScalarSymbol[1], 2.}]]], "$Dimensions" -> {10, 16}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]], "2" -> Association[ "Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[ Span[2, All]]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "3" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Sqrt], "$Dimensions" -> {10}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "3", "Outputs", "Output"]}, "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "Pick" -> Association[ "Type" -> "MX", "Arrays" -> Association[], "Parameters" -> Association[ "Writer" -> NeuralNetworks`ValidatedParameter[ Block[{$CellContext`index, $CellContext`norms, \ $CellContext`picked, $CellContext`vectors}, $CellContext`norms = NeuralNetworks`Private`GetInput[ "Norms"]; $CellContext`vectors = NeuralNetworks`Private`GetInput[ "Vectors"]; $CellContext`index = NeuralNetworks`Private`SowNode[ "argmax", $CellContext`norms, "axis" -> 1]; $CellContext`index = NeuralNetworks`Private`SowNode[ "reshape", $CellContext`index, "shape" -> {0, 1}]; $CellContext`index = NeuralNetworks`Private`SowNode[ "broadcast_axis", $CellContext`index, "axis" -> 1, "size" -> 16]; $CellContext`picked = NeuralNetworks`Private`SowNode[ "pick", {$CellContext`vectors, $CellContext`index}, "axis" -> 1]; NeuralNetworks`Private`SetOutput[ "Output", $CellContext`picked]]& ]], "Inputs" -> Association[ "Vectors" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT], "Norms" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{16}, NeuralNetworks`RealT]]], "Reconstruct" -> Association[ "Type" -> "Chain", "Nodes" -> Association[ "1" -> Association[ "Type" -> "Linear", "Arrays" -> Association["Weights" -> NeuralNetworks`TensorT[{512, 16}, NeuralNetworks`RealT], "Biases" -> NeuralNetworks`Nullable[ NeuralNetworks`TensorT[{512}, NeuralNetworks`RealT]]], "Parameters" -> Association["OutputDimensions" -> {512}, "$OutputSize" -> 512, "$InputSize" -> 16, "$InputDimensions" -> {16}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{512}, NeuralNetworks`RealT]]], "2" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Ramp], "$Dimensions" -> {512}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{512}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{512}, NeuralNetworks`RealT]]], "3" -> Association[ "Type" -> "Linear", "Arrays" -> Association["Weights" -> NeuralNetworks`TensorT[{1024, 512}, NeuralNetworks`RealT], "Biases" -> NeuralNetworks`Nullable[ NeuralNetworks`TensorT[{1024}, NeuralNetworks`RealT]]], "Parameters" -> Association["OutputDimensions" -> {1024}, "$OutputSize" -> 1024, "$InputSize" -> 512, "$InputDimensions" -> {512}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{512}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1024}, NeuralNetworks`RealT]]], "4" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Ramp], "$Dimensions" -> {1024}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1024}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1024}, NeuralNetworks`RealT]]], "5" -> Association[ "Type" -> "Linear", "Arrays" -> Association["Weights" -> NeuralNetworks`TensorT[{784, 1024}, NeuralNetworks`RealT], "Biases" -> NeuralNetworks`Nullable[ NeuralNetworks`TensorT[{784}, NeuralNetworks`RealT]]], "Parameters" -> Association["OutputDimensions" -> {784}, "$OutputSize" -> 784, "$InputSize" -> 1024, "$InputDimensions" -> {1024}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1024}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{784}, NeuralNetworks`RealT]]], "6" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[LogisticSigmoid], "$Dimensions" -> {784}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{784}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{784}, NeuralNetworks`RealT]]], "7" -> Association[ "Type" -> "Reshape", "Arrays" -> Association[], "Parameters" -> Association["Dimensions" -> {1, 28, 28}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{784}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]]]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "4", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "6", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "5", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "7", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "6", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "7", "Outputs", "Output"]}, "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]]]]], GridBox[{{ ItemBox[ StyleBox["Inputs", Bold], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]], ItemBox[ StyleBox[ GraphicsBox[{}, ImageSize -> {1, 11}, BaselinePosition -> (Scaled[0.] -> Baseline)], "CacheGraphics" -> False], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]], ItemBox["", Frame -> {{False, False}, {False, GrayLevel[0.85]}}], ItemBox["", Frame -> {{False, False}, {False, GrayLevel[0.85]}}], ItemBox[ StyleBox["Outputs", Bold], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]], ItemBox[ StyleBox[ GraphicsBox[{}, ImageSize -> {1, 11}, BaselinePosition -> (Scaled[0.] -> Baseline)], "CacheGraphics" -> False], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]]}, { StyleBox[ TemplateBox[{"\"Input\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox[ TemplateBox[{"\"3-tensor\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{"\[Times]", "\"\[Times]\"", "\"1\"", "\"28\"", "\"28\""}, "RowWithSeparators"], "\"\[VeryThinSpace]\"", "\")\""}, "RowDefault"], GrayLevel[0.5], StripOnInput -> False]}, "RowDefault"], "SummaryItem"], "", "", StyleBox[ TemplateBox[{"\"Classification\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox[ TemplateBox[{"\"vector\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{"\[Times]", "\"\[Times]\"", "\"10\""}, "RowWithSeparators"], "\"\[VeryThinSpace]\"", "\")\""}, "RowDefault"], GrayLevel[0.5], StripOnInput -> False]}, "RowDefault"], "SummaryItem"]}, {"", "", "", "", StyleBox[ TemplateBox[{"\"Reconstruction\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["\"image\"", "SummaryItem"]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}]], ImageSizeCache -> {363., {19.75, 25.75}}, TrackedSymbols :> { NeuralNetworks`Private`NetGraph`selection}]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}], Initialization :> {NetGraph}]}}, BaselinePosition -> Automatic, GridBoxAlignment -> { "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> { "Columns" -> {{2}}, "Rows" -> {{Automatic}}}]}}, BaselinePosition -> {1, 1}, GridBoxAlignment -> {"Rows" -> {{Top}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> {"Columns" -> { Offset[0.], { Offset[0.5599999999999999]}, Offset[0.]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.], { Offset[0.4]}, Offset[0.]}, "RowsIndexed" -> {}}]}, Dynamic[Typeset`open], ImageSize -> Automatic], BaseStyle -> { ShowStringCharacters -> False, NumberMarks -> False, PrintPrecision -> 3, ShowSyntaxStyles -> False}, BaselinePosition -> Baseline]], StyleBox["]", "NonInterpretableSummary"]}]}, "CopyTag", DisplayFunction->(#& ), InterpretationFunction->("NetGraph[<>]"& )], False, Editable->False, SelectWithContents->True, Selectable->False]], "Output", CellChangeTimes->{ 3.7294314993802557`*^9, 3.7294327043178473`*^9, 3.729497327074215*^9, { 3.7303968116277533`*^9, 3.730396828837812*^9}, 3.730396932821198*^9, 3.730397092584581*^9, {3.730397183707252*^9, 3.730397189192515*^9}}, CellLabel->"Out[16]=",ExpressionUUID->"b9815de5-1af0-4a19-8980-ee939dc11057"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Training", "Section", CellChangeTimes->{{3.695474798960601*^9, 3.69547479969661*^9}},ExpressionUUID->"5bc6142b-c2c8-49ee-aaf4-\ 033c6d7612ae"], Cell[CellGroupData[{ Cell["Loss function", "Subsection", CellChangeTimes->{{3.729432058576727*^9, 3.729432061688283*^9}},ExpressionUUID->"dad3883c-dda6-4355-9ff7-\ 8be3d0617691"], Cell[TextData[{ "The classLoss accepts the norms of the capsule vectors and the coefficients \ ", Cell[BoxData[ FormBox[ StyleBox[ SubscriptBox["T", "c"], FontWeight->"Bold"], TraditionalForm]],ExpressionUUID-> "92f001ad-4e28-42b9-8e41-4c9a07e480e3"], " as input, storing the class label information. ", Cell[BoxData[ FormBox[ SubscriptBox["T", "c"], TraditionalForm]], FontWeight->"Bold",ExpressionUUID->"0b9f9e65-8a5a-4225-b65c-7140eddc7a02"], " is a one - hot vector, effectively used as a mask." }], "Text", CellChangeTimes->{{3.729432074237208*^9, 3.729432106259432*^9}, { 3.730397319420385*^9, 3.730397336699901*^9}},ExpressionUUID->"f046add2-5ba3-4901-a4be-\ 677c43a9545a"], Cell[BoxData[ RowBox[{ RowBox[{"classLoss", "[", RowBox[{"mPlus_", ",", "mMinus_", ",", "lambda_"}], "]"}], ":=", RowBox[{"ThreadingLayer", "[", RowBox[{ RowBox[{ RowBox[{"#1", "*", RowBox[{ RowBox[{"Max", "[", RowBox[{"0", ",", RowBox[{"mPlus", "-", "#2"}]}], "]"}], "^", "2"}]}], "+", RowBox[{"lambda", "*", RowBox[{"(", RowBox[{"1", "-", "#1"}], ")"}], "*", RowBox[{ RowBox[{"Max", "[", RowBox[{"0", ",", RowBox[{"#2", "-", "mMinus"}]}], "]"}], "^", "2"}]}]}], "&"}], "]"}]}]], "Input", CellChangeTimes->{{3.730397755311728*^9, 3.730397766582831*^9}}, CellLabel->"In[44]:=",ExpressionUUID->"2b4b46e1-8d31-4324-9e5f-21ff301b0185"], Cell["\<\ The reconstruction loss accepts the capsule output vectors and the same \ one-hot encoded mask used in the classification loss, as well as the original \ image. Since the correct label is available at training time, the selection \ of the correct capsule vector can be performed without resorting to MXLayer. \ The Dot operation between the mask and the capsule vectors effectively \ extracts the correct vector for reconstruction:\ \>", "Text", CellChangeTimes->{{3.7292542115262423`*^9, 3.729254282871291*^9}, { 3.72925564517227*^9, 3.7292556507718697`*^9}, {3.730397239116314*^9, 3.730397274900824*^9}, {3.7303973423169603`*^9, 3.73039740308451*^9}},ExpressionUUID->"ee031d5d-7a31-4f78-b10c-\ e0cb09310520"], Cell[BoxData[ RowBox[{ RowBox[{"reconstructionLoss", " ", "=", " ", RowBox[{"NetGraph", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"DotLayer", "[", "]"}], ",", "\[IndentingNewLine]", RowBox[{"LinearLayer", "[", "512", "]"}], ",", "Ramp", ",", "\[IndentingNewLine]", RowBox[{"LinearLayer", "[", "1024", "]"}], ",", "Ramp", ",", "\[IndentingNewLine]", RowBox[{"LinearLayer", "[", "784", "]"}], ",", "LogisticSigmoid", ",", "\[IndentingNewLine]", RowBox[{"ReshapeLayer", "[", RowBox[{"{", RowBox[{"1", ",", "28", ",", "28"}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"MeanSquaredLossLayer", "[", "]"}]}], "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"NetPort", "[", "\"\\"", "]"}], ",", RowBox[{"NetPort", "[", "\"\\"", "]"}]}], "}"}], "\[Rule]", RowBox[{"1", "\[Rule]", RowBox[{"2", "\[Rule]", RowBox[{"3", "\[Rule]", RowBox[{"4", "\[Rule]", RowBox[{"5", "\[Rule]", RowBox[{"6", "\[Rule]", RowBox[{"7", "\[Rule]", "8"}]}]}]}]}]}]}]}], ",", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"NetPort", "[", "\"\\"", "]"}], ",", "8"}], "}"}], "\[Rule]", "9"}]}], "}"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{3.7294322546448708`*^9}, CellLabel->"In[42]:=",ExpressionUUID->"a7c684bd-a314-4054-b456-630fec28bc8b"] }, Open ]], Cell[CellGroupData[{ Cell["Training architecture", "Subsection", CellChangeTimes->{{3.72943237496939*^9, 3.729432378114876*^9}},ExpressionUUID->"cca0cf7a-a7f6-4d35-bb04-\ 4da1337264f5"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"trainingCapsNet", "=", RowBox[{"NetGraph", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"<|", "\[IndentingNewLine]", RowBox[{ RowBox[{"\"\\"", "\[Rule]", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{"capsNet", "=", RowBox[{"NetTake", "[", RowBox[{"capsNet", ",", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}]}], "]"}]}], "}"}], ",", RowBox[{"NetGraph", "[", RowBox[{ RowBox[{"Normal", "@", "capsNet"}], ",", RowBox[{"Append", "[", RowBox[{ RowBox[{"EdgeList", "@", "capsNet"}], ",", RowBox[{"\"\\"", "\[Rule]", RowBox[{"NetPort", "[", "\"\\"", "]"}]}]}], "]"}]}], "]"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"UnitVectorLayer", "[", "10", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"classLoss", "[", RowBox[{"0.9", ",", "0.1", ",", "0.5"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"SummationLayer", "[", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", "reconstructionLoss"}]}], "\[IndentingNewLine]", "|>"}], ",", "\[IndentingNewLine]", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"NetPort", "[", "\"\\"", "]"}], "\[Rule]", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"NetPort", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"NetPort", "[", "\"\\"", "]"}], "\[Rule]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"NetPort", "[", RowBox[{"\"\\"", ",", "\"\<1\>\""}], "]"}], ",", RowBox[{"NetPort", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}]}], "}"}]}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"NetPort", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}], "\[Rule]", RowBox[{"NetPort", "[", RowBox[{"\"\\"", ",", "\"\<2\>\""}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"NetPort", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}], "\[Rule]", RowBox[{"NetPort", "[", RowBox[{"\"\\"", ",", "\"\\""}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"NetPort", "[", "\"\\"", "]"}]}], ",", RowBox[{"\"\\"", "\[Rule]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"NetPort", "[", "\"\\"", "]"}]}]}]}], "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"NetEncoder", "[", RowBox[{"{", RowBox[{"\"\\"", ",", "28", ",", "\"\\""}], "}"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"\"\\"", "\[Rule]", RowBox[{"NetEncoder", "[", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"Range", "[", RowBox[{"0", ",", "9"}], "]"}]}], "}"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellChangeTimes->{{3.729254330163499*^9, 3.729254538174765*^9}, { 3.7292545839617157`*^9, 3.729254769131728*^9}, {3.72925480836637*^9, 3.72925487868601*^9}, {3.729255106762862*^9, 3.729255137177194*^9}, { 3.729255748500198*^9, 3.729255767129727*^9}, {3.72925849604431*^9, 3.729258552855103*^9}, {3.72934008828323*^9, 3.729340092014948*^9}, { 3.729408026228978*^9, 3.729408066598827*^9}, {3.729432721262514*^9, 3.7294327223075323`*^9}, {3.730397419122459*^9, 3.730397420726241*^9}, { 3.730397516200769*^9, 3.730397554385221*^9}, {3.730397672571621*^9, 3.730397681465308*^9}, {3.7303978449271812`*^9, 3.730397905659852*^9}}, CellLabel->"In[49]:=",ExpressionUUID->"39e7263e-90a3-4828-88dd-203bcb157fc5"], Cell[BoxData[ TagBox[ TemplateBox[{RowBox[{ StyleBox[ TagBox["NetGraph", "SummaryHead"], "NonInterpretableSummary"], StyleBox["[", "NonInterpretableSummary"], DynamicModuleBox[{Typeset`open = True}, PanelBox[ PaneSelectorBox[{False -> GridBox[{{ PaneBox[ ButtonBox[ DynamicBox[ FEPrivate`FrontEndResource[ "FEBitmaps", "SquarePlusIconMedium"], ImageSizeCache -> {12., {0., 12.}}], Appearance -> None, ButtonFunction :> (Typeset`open = True), Evaluator -> Automatic, Method -> "Preemptive"], Alignment -> {Center, Center}, ImageSize -> {Automatic, 24}], OverlayBox[{ GraphicsBox[{ Thickness[0.0149], { GrayLevel[0.6], Thickness[0.03], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{1, 4, 3}}}, {{{18., 37.}, {18., 37.}, { 18.5, 27.5}, {35., 27.}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{50., 37.}, {50., 37.}, { 49.5, 27.5}, {33., 27.}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{18., 16.}, {18., 16.}, { 18.5, 25.5}, {35., 26.}}}, CurveClosed -> {0}]}, { FaceForm[ GrayLevel[0.9]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 40.5}, {22.5, 40.5}, {22.5, 33.5}, {15.5, 33.5}}}]}, { FaceForm[ GrayLevel[0.6]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 41.}, {15., 41.}, { 15., 33.}, {23., 33.}}, {{22., 34.}, {16., 34.}, {16., 40.}, {22., 40.}}}]}, { FaceForm[ GrayLevel[0.9]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 19.5}, {22.5, 19.5}, {22.5, 12.5}, {15.5, 12.5}}}]}, { FaceForm[ GrayLevel[0.6]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 20.}, {15., 20.}, { 15., 12.}, {23., 12.}}, {{22., 13.}, {16., 13.}, {16., 19.}, {22., 19.}}}]}, { FaceForm[ GrayLevel[0.9]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 30.5, 30.5}, {37.5, 30.5}, {37.5, 23.5}, {30.5, 23.5}}}]}, { FaceForm[ GrayLevel[0.6]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 31.}, {30., 31.}, { 30., 23.}, {38., 23.}}, {{37., 24.}, {31., 24.}, {31., 30.}, {37., 30.}}}]}, { FaceForm[ GrayLevel[0.9]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 45.5, 40.5}, {52.5, 40.5}, {52.5, 33.5}, {45.5, 33.5}}}]}, { FaceForm[ GrayLevel[0.6]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{53., 41.}, {45., 41.}, { 45., 33.}, {53., 33.}}, {{52., 34.}, {46., 34.}, {46., 40.}, {52., 40.}}}]}}, BaseStyle -> GrayLevel[0.6], ImageMargins -> 0, ImageSize -> {36, Automatic}, PlotRangePadding -> 0], StyleBox[ "uninitialized", LineColor -> RGBColor[0.66, 0, 0], FrontFaceColor -> RGBColor[0.66, 0, 0], BackFaceColor -> RGBColor[0.66, 0, 0], GraphicsColor -> RGBColor[0.66, 0, 0], FontFamily -> "Roboto", FontSize -> 8, FontColor -> RGBColor[0.66, 0, 0], Background -> GrayLevel[1, 0.65]]}, Alignment -> {Center, Scaled[0.0001]}], GridBox[{{ StyleBox[ TemplateBox[{"\"Number of inputs\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["2", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Number of outputs\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["2", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Number of layers\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["5", "SummaryItem"]}}, BaselinePosition -> {2, 1}, GridBoxAlignment -> { "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> { "Columns" -> {{2}}, "Rows" -> {{Automatic}}}]}}, BaselinePosition -> {1, 3}, GridBoxAlignment -> {"Rows" -> {{Top}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> {"Columns" -> { Offset[0.], { Offset[0.5599999999999999]}, Offset[0.]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.], { Offset[0.4]}, Offset[0.]}, "RowsIndexed" -> {}}], True -> GridBox[{{ PaneBox[ ButtonBox[ DynamicBox[ FEPrivate`FrontEndResource[ "FEBitmaps", "SquareMinusIconMedium"], ImageSizeCache -> {12., {0., 12.}}], Appearance -> None, ButtonFunction :> (Typeset`open = False), Evaluator -> Automatic, Method -> "Preemptive"], Alignment -> {Center, Center}, ImageSize -> {Automatic, 24}], OverlayBox[{ GraphicsBox[{ Thickness[0.0149], { GrayLevel[0.6], Thickness[0.03], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{1, 4, 3}}}, {{{18., 37.}, {18., 37.}, { 18.5, 27.5}, {35., 27.}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{50., 37.}, {50., 37.}, { 49.5, 27.5}, {33., 27.}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{18., 16.}, {18., 16.}, { 18.5, 25.5}, {35., 26.}}}, CurveClosed -> {0}]}, { FaceForm[ GrayLevel[0.9]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 40.5}, {22.5, 40.5}, {22.5, 33.5}, {15.5, 33.5}}}]}, { FaceForm[ GrayLevel[0.6]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 41.}, {15., 41.}, { 15., 33.}, {23., 33.}}, {{22., 34.}, {16., 34.}, {16., 40.}, {22., 40.}}}]}, { FaceForm[ GrayLevel[0.9]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 19.5}, {22.5, 19.5}, {22.5, 12.5}, {15.5, 12.5}}}]}, { FaceForm[ GrayLevel[0.6]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 20.}, {15., 20.}, { 15., 12.}, {23., 12.}}, {{22., 13.}, {16., 13.}, {16., 19.}, {22., 19.}}}]}, { FaceForm[ GrayLevel[0.9]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 30.5, 30.5}, {37.5, 30.5}, {37.5, 23.5}, {30.5, 23.5}}}]}, { FaceForm[ GrayLevel[0.6]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 31.}, {30., 31.}, { 30., 23.}, {38., 23.}}, {{37., 24.}, {31., 24.}, {31., 30.}, {37., 30.}}}]}, { FaceForm[ GrayLevel[0.9]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 45.5, 40.5}, {52.5, 40.5}, {52.5, 33.5}, {45.5, 33.5}}}]}, { FaceForm[ GrayLevel[0.6]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{53., 41.}, {45., 41.}, { 45., 33.}, {53., 33.}}, {{52., 34.}, {46., 34.}, {46., 40.}, {52., 40.}}}]}}, BaseStyle -> GrayLevel[0.6], ImageMargins -> 0, ImageSize -> {36, Automatic}, PlotRangePadding -> 0], StyleBox[ "uninitialized", LineColor -> RGBColor[0.66, 0, 0], FrontFaceColor -> RGBColor[0.66, 0, 0], BackFaceColor -> RGBColor[0.66, 0, 0], GraphicsColor -> RGBColor[0.66, 0, 0], FontFamily -> "Roboto", FontSize -> 8, FontColor -> RGBColor[0.66, 0, 0], Background -> GrayLevel[1, 0.65]]}, Alignment -> {Center, Scaled[0.0001]}], GridBox[{{ DynamicModuleBox[{ NeuralNetworks`Private`NetGraph`selection = None}, GridBox[{{ TagBox[ GraphicsBox[{{ GrayLevel[0.7], LineBox[{{-4., 2.4492935982947064`*^-16}, {-3., 1.8369701987210297`*^-16}}], LineBox[{{-3., 1.8369701987210297`*^-16}, {-2., 1.2246467991473532`*^-16}}], LineBox[{{-3., 1.8369701987210297`*^-16}, {-2., 1.0000000000000002`}}], LineBox[{{-4., 1.0000000000000002`}, {-3., 1.0000000000000002`}}], LineBox[{{-3., 2.}, {-2., 1.0000000000000002`}}], LineBox[{{-3., 1.0000000000000002`}, {-2., 1.2246467991473532`*^-16}}], LineBox[{{-3., 1.0000000000000002`}, {-2., 1.0000000000000002`}}], LineBox[{{-2., 1.2246467991473532`*^-16}, {-1., 6.123233995736766*^-17}}], LineBox[{{-1., 6.123233995736766*^-17}, {0., 0.}}], LineBox[{{-2., 1.0000000000000002`}, {-0.9999999999999999, 1.}}]}, { InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-3.4, 2.0818995585505003`*^-16}, {-0.25, 0}, Offset[8], {1., -6.123233995736767*^-17}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-2.4000000000000004`, 1.4695761589768238`*^-16}, {-0.25, 0}, Offset[8], {1., -6.123233995736765*^-17}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-2.4000000000000004`, 0.6000000000000002}, {-0.25, 0}, Offset[8], {1., 1.}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-3.4, 1.0000000000000002`}, {-0.25, 0}, Offset[8], {1., 0.}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-2.4000000000000004`, 1.4000000000000001`}, {-0.25, 0}, Offset[8], {1., -0.9999999999999998}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-2.4000000000000004`, 0.4000000000000002}, {-0.25, 0}, Offset[8], {1., -1.}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-2.4000000000000004`, 1.0000000000000002`}, {-0.25, 0}, Offset[8], {1., 0.}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-1.4, 8.572527594031473*^-17}, {-0.25, 0}, Offset[8], {1., -6.123233995736766*^-17}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-0.4, 2.4492935982947065`*^-17}, {-0.25, 0}, Offset[8], {1., -6.123233995736766*^-17}], InsetBox[ GraphicsBox[{ GrayLevel[0.7], PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}]}], {-1.4, 1.}, {-0.25, 0}, Offset[8], {1., -2.220446049250313*^-16}]}, { EdgeForm[ AbsoluteThickness[1]], StyleBox[{ TagBox[ TagBox[ TooltipBox[{ GrayLevel[0.85], EdgeForm[ GrayLevel[0.5]], DiskBox[{-4., 2.4492935982947064`*^-16}, Offset[{2., 2.}, {0., 0.}]]}, TagBox[ GridBox[{{ StyleBox["\"Label\"", Bold, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Label", Bold]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 1), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ EdgeForm[ GrayLevel[0.85]], FaceForm[ RGBColor[0.9, 0.9, 0.9]], RectangleBox[ Offset[{-10, -10}, {-3., 1.8369701987210297`*^-16}], Offset[{10, 10}, {-3., 1.8369701987210297`*^-16}]]}, InsetBox["\"UV\"", Offset[{0, -1}, {-3., 1.8369701987210297`*^-16}]]}, TagBox[ GridBox[{{ StyleBox["\"Mask\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"UnitVectorLayer", "[", RowBox[{"10", ",", RowBox[{"\"Input\"", "\[Rule]", RowBox[{"{", RowBox[{"Restricted", "[", RowBox[{"\"Integer\"", ",", "10"}], "]"}], "}"}]}]}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Mask", Bold], Style[ HoldForm[ UnitVectorLayer[10, "Input" -> { Restricted["Integer", 10]}]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 2), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ EdgeForm[ GrayLevel[0.85]], FaceForm[ RGBColor[0.9, 0.9, 0.9]], RectangleBox[ Offset[{-10, -10}, {-2., 1.2246467991473532`*^-16}], Offset[{10, 10}, {-2., 1.2246467991473532`*^-16}]]}, InsetBox[ StyleBox[ "\"\[NegativeVeryThinSpace]\[NegativeVeryThinSpace]#\"", StripOnInput -> False, FontFamily -> "Source Code Pro", FontSize -> 14, FontWeight -> Bold, FontSlant -> Italic, FontColor -> RGBColor[ 0.2627450980392157, 0.5372549019607843, 0.34509803921568627`]], {-2., 1.2246467991473532`*^-16}]}, TagBox[ GridBox[{{ StyleBox["\"Classify\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"ThreadingLayer", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"#1", " ", SuperscriptBox[ RowBox[{"Max", "[", RowBox[{"0", ",", RowBox[{"0.9`", "-", "#2"}]}], "]"}], "2"]}], "+", RowBox[{"0.5`", " ", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"1", "-", "#1"}], ")"}], " ", SuperscriptBox[ RowBox[{"Max", "[", RowBox[{"0", ",", RowBox[{ RowBox[{"-", "0.1`"}], "+", "#2"}]}], "]"}], "2"]}], ")"}]}]}], "&"}], ",", RowBox[{"\"Inputs\"", "\[Rule]", RowBox[{"{", RowBox[{"10", ",", "10"}], "}"}]}]}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Classify", Bold], Style[ HoldForm[ ThreadingLayer[# Max[0, Subtract[0.9, #2]]^2 + 0.5 (Subtract[1, #] Max[0, -0.1 + #2]^2)& , "Inputs" -> {10, 10}]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 3), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ EdgeForm[ RGBColor[0.881, 0.65, 0.65]], FaceForm[ RGBColor[0.9206666666666666, 0.7666666666666667, 0.7666666666666667]], RectangleBox[ Offset[{-12, -12}, {-2., 1.0000000000000002`}], Offset[{12, 12}, {-2., 1.0000000000000002`}]]}, InsetBox[ GraphicsBox[{ Thickness[0.0149], { GrayLevel[0.5], Thickness[0.03], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{1, 4, 3}}}, {{{39.192120463394616`, 30.51535353195944}, {39.192120463394616`, 30.51535353195944}, {38.69442248591872, 35.17935629818005}, {28.246036107633145`, 35.21413676830481}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{39.335627149246974`, 22.022653388846493`}, {39.335627149246974`, 22.022653388846493`}, {39.028664759644585`, 18.313538367818456`}, {28.898905902765012`, 18.118321787764348`}}}, CurveClosed -> {0}]}, GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ GrayLevel[0.7]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 40.5}, {22.5, 40.5}, {22.5, 33.5}, {15.5, 33.5}}}]}, { FaceForm[ GrayLevel[0.4]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 41.}, {15., 41.}, { 15., 33.}, {23., 33.}}, {{22., 34.}, {16., 34.}, {16., 40.}, {22., 40.}}}]}}]}], {{{{1.6209767772132715`, 0.}, { 0., 1.302327038770047}}, {-8.296516058106576, \ -14.790162389666165`}}}], GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ GrayLevel[0.7]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 19.5}, {22.5, 19.5}, {22.5, 12.5}, {15.5, 12.5}}}]}, { FaceForm[ GrayLevel[0.4]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 20.}, {15., 20.}, { 15., 12.}, {23., 12.}}, {{22., 13.}, {16., 13.}, {16., 19.}, {22., 19.}}}]}}]}], {{{{1.6446663930506598`, 0.}, { 0., 1.2828873028183188`}}, {-8.702521921403617, \ -2.012105908138385}}}], GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ GrayLevel[0.7]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 30.5, 30.5}, {37.5, 30.5}, {37.5, 23.5}, {30.5, 23.5}}}]}, { FaceForm[ GrayLevel[0.4]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 31.}, {30., 31.}, { 30., 23.}, {38., 23.}}, {{37., 24.}, {31., 24.}, {31., 30.}, {37., 30.}}}]}}]}], {{{{1.5182866155506958`, 0.}, { 0., 1.2065857650683098`}}, {-11.402865979580374`, \ -6.527851836053724}}}]}, AspectRatio -> 1, BaseStyle -> GrayLevel[0.4], ImageMargins -> 0., ImagePadding -> 0, ImageSize -> 15, PlotRange -> All, PlotRangePadding -> 0], {-2., 1.0000000000000002`}]}, TagBox[ GridBox[{{ StyleBox[ "\"Reconstruct\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"NetGraph", "[", RowBox[{ RowBox[{"\[LeftSkeleton]", "9", "\[RightSkeleton]"}], ",", RowBox[{"\[LeftSkeleton]", "12", "\[RightSkeleton]"}]}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Reconstruct", Bold], Style[ HoldForm[ NetGraph[ Skeleton[9], Skeleton[12]]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 4), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{ GrayLevel[0.85], EdgeForm[ GrayLevel[0.5]], DiskBox[{-4., 1.0000000000000002`}, Offset[{2., 2.}, {0., 0.}]]}, TagBox[ GridBox[{{ StyleBox["\"Input\"", Bold, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Input", Bold]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 5), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ EdgeForm[ RGBColor[0.881, 0.65, 0.65]], FaceForm[ RGBColor[ 0.9206666666666666, 0.7666666666666667, 0.7666666666666667]], RectangleBox[ Offset[{-12, -12}, {-3., 1.0000000000000002`}], Offset[{12, 12}, {-3., 1.0000000000000002`}]]}, InsetBox[ GraphicsBox[{ Thickness[0.0149], { GrayLevel[0.5], Thickness[0.03], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{1, 4, 3}}}, {{{39.192120463394616`, 30.51535353195944}, {39.192120463394616`, 30.51535353195944}, {38.69442248591872, 35.17935629818005}, {28.246036107633145`, 35.21413676830481}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{39.335627149246974`, 22.022653388846493`}, {39.335627149246974`, 22.022653388846493`}, {39.028664759644585`, 18.313538367818456`}, {28.898905902765012`, 18.118321787764348`}}}, CurveClosed -> {0}]}, GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ GrayLevel[0.7]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 40.5}, {22.5, 40.5}, {22.5, 33.5}, {15.5, 33.5}}}]}, { FaceForm[ GrayLevel[0.4]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 41.}, {15., 41.}, { 15., 33.}, {23., 33.}}, {{22., 34.}, {16., 34.}, {16., 40.}, {22., 40.}}}]}}]}], {{{{1.6209767772132715`, 0.}, { 0., 1.302327038770047}}, {-8.296516058106576, \ -14.790162389666165`}}}], GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ GrayLevel[0.7]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 19.5}, {22.5, 19.5}, {22.5, 12.5}, {15.5, 12.5}}}]}, { FaceForm[ GrayLevel[0.4]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 20.}, {15., 20.}, { 15., 12.}, {23., 12.}}, {{22., 13.}, {16., 13.}, {16., 19.}, {22., 19.}}}]}}]}], {{{{1.6446663930506598`, 0.}, { 0., 1.2828873028183188`}}, {-8.702521921403617, \ -2.012105908138385}}}], GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ GrayLevel[0.7]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 30.5, 30.5}, {37.5, 30.5}, {37.5, 23.5}, {30.5, 23.5}}}]}, { FaceForm[ GrayLevel[0.4]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 31.}, {30., 31.}, { 30., 23.}, {38., 23.}}, {{37., 24.}, {31., 24.}, {31., 30.}, {37., 30.}}}]}}]}], {{{{1.5182866155506958`, 0.}, { 0., 1.2065857650683098`}}, {-11.402865979580374`, \ -6.527851836053724}}}]}, AspectRatio -> 1, BaseStyle -> GrayLevel[0.4], ImageMargins -> 0., ImagePadding -> 0, ImageSize -> 15, PlotRange -> All, PlotRangePadding -> 0], {-3., 1.0000000000000002`}]}, TagBox[ GridBox[{{ StyleBox["\"CapsNet\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"NetGraph", "[", RowBox[{ RowBox[{"\[LeftSkeleton]", "6", "\[RightSkeleton]"}], ",", RowBox[{"\[LeftSkeleton]", "9", "\[RightSkeleton]"}]}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["CapsNet", Bold], Style[ HoldForm[ NetGraph[ Skeleton[6], Skeleton[9]]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 6), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ EdgeForm[ GrayLevel[0.85]], FaceForm[ RGBColor[0.9, 0.9, 0.9]], RectangleBox[ Offset[{-10, -10}, {-1., 6.123233995736766*^-17}], Offset[{10, 10}, {-1., 6.123233995736766*^-17}]]}, InsetBox["\"S\"", Offset[{0, -1}, {-1., 6.123233995736766*^-17}]]}, TagBox[ GridBox[{{ StyleBox["\"Total\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"SummationLayer", "[", RowBox[{"\"Input\"", "\[Rule]", "10"}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Total", Bold], Style[ HoldForm[ SummationLayer["Input" -> 10]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 7), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{ GrayLevel[0.85], EdgeForm[ GrayLevel[0.5]], DiskBox[{0., 0.}, Offset[{2., 2.}, {0., 0.}]]}, TagBox[ GridBox[{{ StyleBox["\"ClassLoss\"", Bold, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["ClassLoss", Bold]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 8), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{ GrayLevel[0.85], EdgeForm[ GrayLevel[0.5]], DiskBox[{-0.9999999999999999, 1.}, Offset[{2., 2.}, {0., 0.}]]}, TagBox[ GridBox[{{ StyleBox["\"RecoLoss\"", Bold, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["RecoLoss", Bold]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 9), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{ GrayLevel[0.85], EdgeForm[ GrayLevel[0.5]], DiskBox[{-3., 2.}, Offset[{2., 2.}, {0., 0.}]]}, TagBox[ GridBox[{{ StyleBox["\"Input\"", Bold, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Input", Bold]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 1), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]]}, FontSize -> 10]}, { StyleBox[{ InsetBox["\"Label\"", Offset[{0, -7}, {-4., 2.4492935982947064`*^-16}], {0, 1.}, Automatic, {1, 0}], InsetBox["\"Mask\"", Offset[{0, -13}, {-3., 1.8369701987210297`*^-16}], { 0, 1.}, Automatic, {1, 0}], InsetBox["\"Classify\"", Offset[{0, -13}, {-2., 1.2246467991473532`*^-16}], { 0, 1.}, Automatic, {1, 0}], InsetBox[ TagBox[ TooltipBox[ "\"Reconstru..\"", "\"Reconstruct\"", TooltipStyle -> "TextStyling"], Annotation[#, "Reconstruct", "Tooltip"]& ], Offset[{0, -15}, {-2., 1.0000000000000002`}], {0, 1.}, Automatic, {1, 0}], InsetBox["\"Input\"", Offset[{0, -7}, {-4., 1.0000000000000002`}], {0, 1.}, Automatic, {1, 0}], InsetBox["\"CapsNet\"", Offset[{0, -15}, {-3., 1.0000000000000002`}], {0, 1.}, Automatic, {1, 0}], InsetBox["\"Total\"", Offset[{0, -13}, {-1., 6.123233995736766*^-17}], {0, 1.}, Automatic, {1, 0}], InsetBox["\"ClassLoss\"", Offset[{0, -7}, {0., 0.}], {0, 1.}, Automatic, {1, 0}], InsetBox["\"RecoLoss\"", Offset[{0, -7}, {-0.9999999999999999, 1.}], {0, 1.}, Automatic, {1, 0}], InsetBox["\"Input\"", Offset[{0, -7}, {-3., 2.}], {0, 1.}, Automatic, {1, 0}]}, StripOnInput -> False, FontColor -> GrayLevel[0.5]], StyleBox[{ InsetBox[ SubscriptBox["\"\[DoubleStruckCapitalN]\"", "10"], Offset[{3.367778697655222*^-16, 5.5}, {-3.4, 2.0818995585505003`*^-16}], {0., -0.17}, Automatic, { 1., -6.123233995736767*^-17}], InsetBox[ TemplateBox[{"\[Cross]", "\"\[Cross]\"", "\"10\""}, "RowWithSeparators"], Offset[{3.3677786976552205`*^-16, 5.5}, {-2.4000000000000004`, 1.4695761589768238`*^-16}], { 0., -0.17}, Automatic, {1., -6.123233995736765*^-17}], InsetBox[ TemplateBox[{"\[Cross]", "\"\[Cross]\"", "\"10\""}, "RowWithSeparators"], Offset[{-3.889087296526011, 3.889087296526011}, {-2.4000000000000004`, 0.6000000000000002}], {0., -0.17}, Automatic, { 0.7071067811865475, 0.7071067811865475}], InsetBox[ TemplateBox[{ "\[Cross]", "\"\[Cross]\"", "\"1\"", "\"28\"", "\"28\""}, "RowWithSeparators"], Offset[{0., 5.5}, {-3.4, 1.0000000000000002`}], { 0., -0.17}, Automatic, {1., 0.}], InsetBox[ TemplateBox[{ "\[Cross]", "\"\[Cross]\"", "\"1\"", "\"28\"", "\"28\""}, "RowWithSeparators"], Offset[{3.889087296526011, 3.8890872965260117`}, {-2.4000000000000004`, 1.4000000000000001`}], {0., -0.17}, Automatic, { 0.7071067811865476, -0.7071067811865475}], InsetBox[ TemplateBox[{"\[Cross]", "\"\[Cross]\"", "\"10\""}, "RowWithSeparators"], Offset[{3.889087296526011, 3.889087296526011}, {-2.4000000000000004`, 0.4000000000000002}], {0., -0.17}, Automatic, { 0.7071067811865475, -0.7071067811865475}], InsetBox[ TemplateBox[{ "\[Cross]", "\"\[Cross]\"", "\"10\"", "\"16\""}, "RowWithSeparators"], Offset[{0., 5.5}, {-2.4000000000000004`, 1.0000000000000002`}], {0., -0.17}, Automatic, {1., 0.}], InsetBox[ TemplateBox[{"\[Cross]", "\"\[Cross]\"", "\"10\""}, "RowWithSeparators"], Offset[{3.3677786976552215`*^-16, 5.5}, {-1.4, 8.572527594031473*^-17}], {0., -0.17}, Automatic, { 1., -6.123233995736766*^-17}], InsetBox["\"\[DoubleStruckCapitalR]\"", Offset[{3.3677786976552215`*^-16, 5.5}, {-0.4, 2.4492935982947065`*^-17}], {0., -0.17}, Automatic, { 1., -6.123233995736766*^-17}], InsetBox["\"\[DoubleStruckCapitalR]\"", Offset[{1.2212453270876722`*^-15, 5.5}, {-1.4, 1.}], { 0., -0.17}, Automatic, {1., -2.220446049250313*^-16}]}, StripOnInput -> False, FontSize -> 8, FontWeight -> "Thin", FontColor -> GrayLevel[0.7]]}, { EdgeForm[{ GrayLevel[0.5], Thickness[Large], Dashing[{0, Small}]}], FaceForm[None], PolygonBox[ Dynamic[ If[ Not[ IntegerQ[NeuralNetworks`Private`NetGraph`selection]], {}, GeneralUtilities`Graphics`PackagePrivate`makeOffsetSquare[ Part[{{-4., 2.4492935982947064`*^-16}, {-3., 1.8369701987210297`*^-16}, {-2., 1.2246467991473532`*^-16}, {-2., 1.0000000000000002`}, {-4., 1.0000000000000002`}, {-3., 1.0000000000000002`}, {-1., 6.123233995736766*^-17}, {0., 0.}, {-0.9999999999999999, 1.}, {-3., 2.}}, NeuralNetworks`Private`NetGraph`selection], 3 + {0.5, 0.5} Part[{8, 20, 20, 24, 8, 24, 20, 8, 8, 8}, NeuralNetworks`Private`NetGraph`selection], {-0.5, 0.5}]]]]}}, AspectRatio -> Full, BaseStyle -> { TooltipBoxOptions -> {TooltipDelay -> 0.08}}, ImageMargins -> {{0, 0}, {0, 0}}, ImagePadding -> {{28., 35.5}, {28., 18.}}, ImageSize -> {283.5, 156.}, PlotRangePadding -> 0], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = None), Method -> "Preemptive", PassEventsDown -> Automatic, PassEventsUp -> True}]]}, { DynamicBox[ If[ IntegerQ[NeuralNetworks`Private`NetGraph`selection], NeuralNetworks`Private`NetGraph`vpathInfo[ Part[{ NeuralNetworks`NetPath["Inputs", "Label"], NeuralNetworks`NetPath["Nodes", "Mask"], NeuralNetworks`NetPath["Nodes", "Classify"], NeuralNetworks`NetPath["Nodes", "Reconstruct"], NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "CapsNet"], NeuralNetworks`NetPath["Nodes", "Total"], NeuralNetworks`NetPath["Outputs", "ClassLoss"], NeuralNetworks`NetPath["Outputs", "RecoLoss"]}, NeuralNetworks`Private`NetGraph`selection], Association["Input" -> NetEncoder["Image", Association[ "ImageSize" -> {28, 28}, "ColorSpace" -> "Grayscale", "ColorChannels" -> 1, "MeanImage" -> None, "VarianceImage" -> None], NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]], "Label" -> NetEncoder["Class", Association[ "Labels" -> {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, "OutputForm" -> "Index", "Count" -> 10], NeuralNetworks`TensorT[{}, NeuralNetworks`IndexIntegerT[10]]]], Association[ "RecoLoss" -> NeuralNetworks`TensorT[{}, NeuralNetworks`RealT], "ClassLoss" -> NeuralNetworks`TensorT[{}, NeuralNetworks`RealT]], Association[ "Mask" -> Association[ "Type" -> "UnitVector", "Arrays" -> Association[], "Parameters" -> Association["ClassCount" -> 10, "$Dimensions" -> {}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{}, NeuralNetworks`IndexIntegerT[10]]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "CapsNet" -> Association[ "Type" -> "Graph", "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Classification" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT], "Vectors" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association[ "ReLUConv1" -> Association[ "Type" -> "Chain", "Nodes" -> Association["1" -> Association["Type" -> "Convolution", "Arrays" -> Association["Weights" -> NeuralNetworks`TensorT[{256, 1, 9, 9}, NeuralNetworks`RealT], "Biases" -> NeuralNetworks`Nullable[ NeuralNetworks`TensorT[{256}, NeuralNetworks`RealT]]], "Parameters" -> Association[ "OutputChannels" -> 256, "KernelSize" -> {9, 9}, "Stride" -> {1, 1}, "PaddingSize" -> {0, 0}, "Dilation" -> {1, 1}, "Dimensionality" -> 2, "Interleaving" -> False, "$InputChannels" -> 1, "$GroupNumber" -> 1, "$InputSize" -> {28, 28}, "$OutputSize" -> {20, 20}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Ramp], "$Dimensions" -> {256, 20, 20}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "2", "Outputs", "Output"]}, "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]]], "PrimaryCaps" -> Association[ "Type" -> "Chain", "Nodes" -> Association["1" -> Association["Type" -> "Convolution", "Arrays" -> Association["Weights" -> NeuralNetworks`TensorT[{256, 256, 9, 9}, NeuralNetworks`RealT], "Biases" -> NeuralNetworks`Nullable[ NeuralNetworks`TensorT[{256}, NeuralNetworks`RealT]]], "Parameters" -> Association[ "OutputChannels" -> 256, "KernelSize" -> {9, 9}, "Stride" -> {2, 2}, "PaddingSize" -> {0, 0}, "Dilation" -> {1, 1}, "Dimensionality" -> 2, "Interleaving" -> False, "$InputChannels" -> 256, "$GroupNumber" -> 1, "$InputSize" -> {20, 20}, "$OutputSize" -> {6, 6}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{256, 6, 6}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Transpose", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[{ TwoWayRule[1, 3], TwoWayRule[1, 2]}]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{256, 6, 6}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{6, 6, 256}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Reshape", "Arrays" -> Association[], "Parameters" -> Association["Dimensions" -> {1152, 8}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{6, 6, 256}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]]], "4" -> Association[ "Type" -> "Graph", "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Nodes" -> Association["1" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association[ "Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[2], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Power, NeuralNetworks`Private`ScalarSymbol[1], 2.}]]], "$Dimensions" -> {1152, 8}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[ Span[2, All]]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Sqrt, NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[3] -> {Plus, 1., NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4] -> {Divide, NeuralNetworks`Private`ScalarSymbol[2], NeuralNetworks`Private`ScalarSymbol[3]}]]], "$Dimensions" -> {1152}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152}, NeuralNetworks`RealT]]], "4" -> Association["Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[Automatic], "Level" -> 2], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1152}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]]], "5" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "4", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "5", "Outputs", "Output"]}]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "4", "Outputs", "Output"]}, "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]]], "PrimaryPredVects" -> Association[ "Type" -> "Graph", "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association["2" -> Association["Type" -> "ConstantArray", "Arrays" -> Association["Array" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]], "Parameters" -> Association["Dimensions" -> {1152, 10, 16, 8}], "Inputs" -> Association[], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]]], "1" -> Association["Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[{Automatic, Automatic}], "Level" -> 2], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]]], "4" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[4]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "3", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "2"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "4", "Outputs", "Output"]}], "DynamicRouting" -> Association[ "Type" -> "Chain", "Nodes" -> Association["1" -> Association["Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[2], "Level" -> 1], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{2, 1152, 10, 16}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "NetFold", "Arrays" -> Association[], "Parameters" -> Association["Net" -> Association["Type" -> "Graph", "Inputs" -> Association["State" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT], "Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Nodes" -> Association["capsule" -> Association[ "Type" -> "Graph", "Inputs" -> Association["b" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT], "uhat" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association["c" -> Association[ "Type" -> "Chain", "Nodes" -> Association[ "1" -> Association["Type" -> "Reshape", "Arrays" -> Association[], "Parameters" -> Association[ "Dimensions" -> {1152, 10}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Softmax", "Arrays" -> Association[], "Parameters" -> Association["Level" -> -1], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"]}, "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]], "s" -> Association["Type" -> "Graph", "Inputs" -> Association["c" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT], "uhat" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association["1" -> Association[ "Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[Automatic], "Level" -> 3], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "2" -> Association[ "Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{ 1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association[ "Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[1]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "c"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "uhat"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"]}], "v" -> Association[ "Type" -> "Graph", "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association["1" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[2], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Power, NeuralNetworks`Private`ScalarSymbol[1], 2.}]]], "$Dimensions" -> {10, 16}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]], "2" -> Association[ "Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[ Span[2, All]]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "3" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Sqrt, NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[3] -> {Plus, 1., NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4] -> {Divide, NeuralNetworks`Private`ScalarSymbol[2], NeuralNetworks`Private`ScalarSymbol[3]}]]], "$Dimensions" -> {10}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "4" -> Association[ "Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[Automatic], "Level" -> 2], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]], "5" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association[ "Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "4", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath["Nodes", "5", "Outputs", "Output"]}]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "c", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "b"], NeuralNetworks`NetPath["Nodes", "s", "Inputs", "c"] -> NeuralNetworks`NetPath["Nodes", "c", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "s", "Inputs", "uhat"] -> NeuralNetworks`NetPath["Inputs", "uhat"], NeuralNetworks`NetPath["Nodes", "v", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "s", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath["Nodes", "v", "Outputs", "Output"]}], "dots" -> Association[ "Type" -> "Graph", "Inputs" -> Association["v" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT], "uhat" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Nodes" -> Association["1" -> Association[ "Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[1152], "Level" -> 1], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{ 1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[3]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "v"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "uhat"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"]}], "dots_flatten" -> Association["Type" -> "Flatten", "Arrays" -> Association[], "Parameters" -> Association["Level" -> DirectedInfinity[1]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]]], "new_b" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Plus]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "capsule", "Inputs", "b"] -> NeuralNetworks`NetPath["Inputs", "State"], NeuralNetworks`NetPath["Nodes", "new_b", "Inputs", "1"] -> NeuralNetworks`NetPath["Inputs", "State"], NeuralNetworks`NetPath[ "Nodes", "capsule", "Inputs", "uhat"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "dots", "Inputs", "uhat"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "dots", "Inputs", "v"] -> NeuralNetworks`NetPath[ "Nodes", "capsule", "Outputs", "Output"], NeuralNetworks`NetPath[ "Nodes", "dots_flatten", "Inputs", "Input"] -> NeuralNetworks`NetPath[ "Nodes", "dots", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "new_b", "Inputs", "2"] -> NeuralNetworks`NetPath[ "Nodes", "dots_flatten", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "new_b", "Outputs", "Output"]}], "$SequenceLength" -> 2, "$InputShape" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT], "$OutputShape" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{2, 1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{2, 11520}, NeuralNetworks`RealT]], "States" -> Association[ "State" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "SequenceLast", "Arrays" -> Association[], "Parameters" -> Association[], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{2, 11520}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "3", "Outputs", "Output"]}, "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "InteriorStates" -> Association[{2, "State"} -> NeuralNetworks`NetPath["Nodes", "2", "States", "State"]]], "DigitCaps" -> Association[ "Type" -> "Graph", "Inputs" -> Association["b" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT], "uhat" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association[ "c" -> Association[ "Type" -> "Chain", "Nodes" -> Association["1" -> Association[ "Type" -> "Reshape", "Arrays" -> Association[], "Parameters" -> Association["Dimensions" -> {1152, 10}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Softmax", "Arrays" -> Association[], "Parameters" -> Association["Level" -> -1], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "2", "Outputs", "Output"]}, "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]], "s" -> Association["Type" -> "Graph", "Inputs" -> Association["c" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT], "uhat" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association[ "1" -> Association[ "Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association[ "Specification" -> NeuralNetworks`ValidatedParameter[ Automatic], "Level" -> 3], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[1]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "c"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "uhat"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "3", "Outputs", "Output"]}], "v" -> Association["Type" -> "Graph", "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association["1" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association[ "Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[2], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Power, NeuralNetworks`Private`ScalarSymbol[1], 2.}]]], "$Dimensions" -> {10, 16}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[ Span[2, All]]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Sqrt, NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[3] -> {Plus, 1., NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4] -> {Divide, NeuralNetworks`Private`ScalarSymbol[2], NeuralNetworks`Private`ScalarSymbol[3]}]]], "$Dimensions" -> {10}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "4" -> Association["Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[Automatic], "Level" -> 2], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]], "5" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "4", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "5", "Outputs", "Output"]}]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "c", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "b"], NeuralNetworks`NetPath["Nodes", "s", "Inputs", "c"] -> NeuralNetworks`NetPath["Nodes", "c", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "s", "Inputs", "uhat"] -> NeuralNetworks`NetPath["Inputs", "uhat"], NeuralNetworks`NetPath["Nodes", "v", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "s", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "v", "Outputs", "Output"]}], "Norm" -> Association[ "Type" -> "Chain", "Nodes" -> Association["1" -> Association["Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[2], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Power, NeuralNetworks`Private`ScalarSymbol[1], 2.}]]], "$Dimensions" -> {10, 16}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[ Span[2, All]]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Sqrt], "$Dimensions" -> {10}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "3", "Outputs", "Output"]}, "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]]], "Edges" -> { NeuralNetworks`NetPath[ "Nodes", "ReLUConv1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath[ "Nodes", "PrimaryCaps", "Inputs", "Input"] -> NeuralNetworks`NetPath[ "Nodes", "ReLUConv1", "Outputs", "Output"], NeuralNetworks`NetPath[ "Nodes", "PrimaryPredVects", "Inputs", "Input"] -> NeuralNetworks`NetPath[ "Nodes", "PrimaryCaps", "Outputs", "Output"], NeuralNetworks`NetPath[ "Nodes", "DigitCaps", "Inputs", "uhat"] -> NeuralNetworks`NetPath[ "Nodes", "PrimaryPredVects", "Outputs", "Output"], NeuralNetworks`NetPath[ "Nodes", "DynamicRouting", "Inputs", "Input"] -> NeuralNetworks`NetPath[ "Nodes", "PrimaryPredVects", "Outputs", "Output"], NeuralNetworks`NetPath[ "Nodes", "DigitCaps", "Inputs", "b"] -> NeuralNetworks`NetPath[ "Nodes", "DynamicRouting", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Vectors"] -> NeuralNetworks`NetPath[ "Nodes", "DigitCaps", "Outputs", "Output"], NeuralNetworks`NetPath[ "Nodes", "Norm", "Inputs", "Input"] -> NeuralNetworks`NetPath[ "Nodes", "DigitCaps", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Classification"] -> NeuralNetworks`NetPath[ "Nodes", "Norm", "Outputs", "Output"]}, "InteriorStates" -> Association[{"DynamicRouting", 2, "State"} -> NeuralNetworks`NetPath[ "Nodes", "DynamicRouting", "Nodes", "2", "States", "State"]]], "Classify" -> Association[ "Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association[ "Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1], NeuralNetworks`Private`ScalarSymbol[2]}, NeuralNetworks`Private`ScalarSymbol[13], Association[ NeuralNetworks`Private`ScalarSymbol[3] -> { Subtract, 0.9, NeuralNetworks`Private`ScalarSymbol[2]}, NeuralNetworks`Private`ScalarSymbol[4] -> {Max, 0., NeuralNetworks`Private`ScalarSymbol[3]}, NeuralNetworks`Private`ScalarSymbol[5] -> {Power, NeuralNetworks`Private`ScalarSymbol[4], 2.}, NeuralNetworks`Private`ScalarSymbol[6] -> {Times, NeuralNetworks`Private`ScalarSymbol[1], NeuralNetworks`Private`ScalarSymbol[5]}, NeuralNetworks`Private`ScalarSymbol[7] -> {Subtract, 1., NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[8] -> {Plus, -0.1, NeuralNetworks`Private`ScalarSymbol[2]}, NeuralNetworks`Private`ScalarSymbol[9] -> {Max, 0., NeuralNetworks`Private`ScalarSymbol[8]}, NeuralNetworks`Private`ScalarSymbol[10] -> {Power, NeuralNetworks`Private`ScalarSymbol[9], 2.}, NeuralNetworks`Private`ScalarSymbol[11] -> {Times, NeuralNetworks`Private`ScalarSymbol[7], NeuralNetworks`Private`ScalarSymbol[10]}, NeuralNetworks`Private`ScalarSymbol[12] -> {Times, 0.5, NeuralNetworks`Private`ScalarSymbol[11]}, NeuralNetworks`Private`ScalarSymbol[13] -> {Plus, NeuralNetworks`Private`ScalarSymbol[6], NeuralNetworks`Private`ScalarSymbol[12]}]]]], "Inputs" -> Association[ "1" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "Total" -> Association[ "Type" -> "Summation", "Arrays" -> Association[], "Parameters" -> Association[], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{}, NeuralNetworks`RealT]]], "Reconstruct" -> Association[ "Type" -> "Graph", "Inputs" -> Association[ "Image" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT], "Mask" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT], "Vectors" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Loss" -> NeuralNetworks`TensorT[{}, NeuralNetworks`RealT]], "Nodes" -> Association[ "1" -> Association[ "Type" -> "Dot", "Arrays" -> Association[], "Parameters" -> Association[], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{16}, NeuralNetworks`RealT]]], "2" -> Association[ "Type" -> "Linear", "Arrays" -> Association["Weights" -> NeuralNetworks`TensorT[{512, 16}, NeuralNetworks`RealT], "Biases" -> NeuralNetworks`Nullable[ NeuralNetworks`TensorT[{512}, NeuralNetworks`RealT]]], "Parameters" -> Association["OutputDimensions" -> {512}, "$OutputSize" -> 512, "$InputSize" -> 16, "$InputDimensions" -> {16}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{512}, NeuralNetworks`RealT]]], "3" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Ramp], "$Dimensions" -> {512}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{512}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{512}, NeuralNetworks`RealT]]], "4" -> Association[ "Type" -> "Linear", "Arrays" -> Association["Weights" -> NeuralNetworks`TensorT[{1024, 512}, NeuralNetworks`RealT], "Biases" -> NeuralNetworks`Nullable[ NeuralNetworks`TensorT[{1024}, NeuralNetworks`RealT]]], "Parameters" -> Association["OutputDimensions" -> {1024}, "$OutputSize" -> 1024, "$InputSize" -> 512, "$InputDimensions" -> {512}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{512}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1024}, NeuralNetworks`RealT]]], "5" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Ramp], "$Dimensions" -> {1024}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1024}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1024}, NeuralNetworks`RealT]]], "6" -> Association[ "Type" -> "Linear", "Arrays" -> Association["Weights" -> NeuralNetworks`TensorT[{784, 1024}, NeuralNetworks`RealT], "Biases" -> NeuralNetworks`Nullable[ NeuralNetworks`TensorT[{784}, NeuralNetworks`RealT]]], "Parameters" -> Association["OutputDimensions" -> {784}, "$OutputSize" -> 784, "$InputSize" -> 1024, "$InputDimensions" -> {1024}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1024}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{784}, NeuralNetworks`RealT]]], "7" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[LogisticSigmoid], "$Dimensions" -> {784}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{784}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{784}, NeuralNetworks`RealT]]], "8" -> Association[ "Type" -> "Reshape", "Arrays" -> Association[], "Parameters" -> Association["Dimensions" -> {1, 28, 28}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{784}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]]], "9" -> Association[ "Type" -> "MeanSquaredLoss", "Arrays" -> Association[], "Parameters" -> Association["$Dimensions" -> {1, 28, 28}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT], "Target" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]], "Outputs" -> Association["Loss" -> NeuralNetworks`TensorT[{}, NeuralNetworks`RealT]]]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "9", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Image"], NeuralNetworks`NetPath["Nodes", "1", "Inputs", "1"] -> NeuralNetworks`NetPath["Inputs", "Mask"], NeuralNetworks`NetPath["Nodes", "1", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "Vectors"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "4", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "6", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "5", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "7", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "6", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "8", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "7", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "9", "Inputs", "Target"] -> NeuralNetworks`NetPath["Nodes", "8", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Loss"] -> NeuralNetworks`NetPath[ "Nodes", "9", "Outputs", "Loss"]}]]], GridBox[{{ ItemBox[ StyleBox["Inputs", Bold], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]], ItemBox[ StyleBox[ GraphicsBox[{}, ImageSize -> {1, 11}, BaselinePosition -> (Scaled[0.] -> Baseline)], "CacheGraphics" -> False], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]], ItemBox["", Frame -> {{False, False}, {False, GrayLevel[0.85]}}], ItemBox["", Frame -> {{False, False}, {False, GrayLevel[0.85]}}], ItemBox[ StyleBox["Outputs", Bold], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]], ItemBox[ StyleBox[ GraphicsBox[{}, ImageSize -> {1, 11}, BaselinePosition -> (Scaled[0.] -> Baseline)], "CacheGraphics" -> False], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]]}, { StyleBox[ TemplateBox[{"\"Input\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["\"image\"", "SummaryItem"], "", "", StyleBox[ TemplateBox[{"\"RecoLoss\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["\"real\"", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Label\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["\"class\"", "SummaryItem"], "", "", StyleBox[ TemplateBox[{"\"ClassLoss\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["\"real\"", "SummaryItem"]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}]], ImageSizeCache -> {175., {19.25, 25.25}}, TrackedSymbols :> { NeuralNetworks`Private`NetGraph`selection}]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}], Initialization :> {NetGraph}]}}, BaselinePosition -> Automatic, GridBoxAlignment -> { "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> { "Columns" -> {{2}}, "Rows" -> {{Automatic}}}]}}, BaselinePosition -> {1, 1}, GridBoxAlignment -> {"Rows" -> {{Top}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> {"Columns" -> { Offset[0.], { Offset[0.5599999999999999]}, Offset[0.]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.], { Offset[0.4]}, Offset[0.]}, "RowsIndexed" -> {}}]}, Dynamic[Typeset`open], ImageSize -> Automatic], BaseStyle -> { ShowStringCharacters -> False, NumberMarks -> False, PrintPrecision -> 3, ShowSyntaxStyles -> False}, BaselinePosition -> Baseline]], StyleBox["]", "NonInterpretableSummary"]}]}, "CopyTag", DisplayFunction->(#& ), InterpretationFunction->("NetGraph[<>]"& )], False, Editable->False, SelectWithContents->True, Selectable->False]], "Output", CellChangeTimes->{ 3.72943238799535*^9, {3.729432723040683*^9, 3.729432729809164*^9}, 3.7294973480611687`*^9, {3.730397413351364*^9, 3.730397421236713*^9}, { 3.730397529079287*^9, 3.730397554931476*^9}, {3.730397673308462*^9, 3.730397681743401*^9}, 3.7303977886105957`*^9, 3.7303978550422*^9, { 3.7303978902932787`*^9, 3.730397906275199*^9}}, CellLabel->"Out[49]=",ExpressionUUID->"03d94e8a-810b-45a8-8909-201730f20da9"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Training", "Subsection", CellChangeTimes->{{3.729432157789812*^9, 3.729432159461604*^9}},ExpressionUUID->"bfb71cd5-8bf4-45ce-b8ef-\ 70242f431699"], Cell["Obtain the training and validation data:", "Text",ExpressionUUID->"7bd40206-d6db-414b-b064-cda396f97de7"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"resource", " ", "=", " ", RowBox[{"ResourceObject", "[", "\"\\"", "]"}]}]], "Input", CellLabel->"In[50]:=",ExpressionUUID->"11033027-b784-4d86-92e6-ebd45acc256a"], Cell[BoxData[ InterpretationBox[ RowBox[{ TagBox["ResourceObject", "SummaryHead"], "[", DynamicModuleBox[{Typeset`open$$ = False, Typeset`embedState$$ = "Ready"}, TemplateBox[{PaneSelectorBox[{False -> GridBox[{{ PaneBox[ ButtonBox[ DynamicBox[ FEPrivate`FrontEndResource[ "FEBitmaps", "SquarePlusIconMedium"]], ButtonFunction :> (Typeset`open$$ = True), Appearance -> None, Evaluator -> Automatic, Method -> "Preemptive"], Alignment -> {Center, Center}, ImageSize -> Dynamic[{ Automatic, 3.5 (CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[ Magnification])}]], GraphicsBox[{ Thickness[0.011111111111111112`], StyleBox[{ FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{3.789, 7.266}, {86.20700000000001, 7.266}, {86.20700000000001, 3.266}, {3.789, 3.266}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{14.129, 54.07}, {19.878999999999998`, 54.07}, {19.878999999999998`, 15.57}, {14.129, 15.57}}}]}, FaceForm[ RGBColor[0.648987, 0.648987, 0.648987, 1.]], StripOnInput -> False], StyleBox[{ FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{24.129, 41.82}, {29.879, 41.82}, {29.879, 15.57}, {24.129, 15.57}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 33.160000000000004`, 54.07}, {38.910000000000004`, 54.07}, { 38.910000000000004`, 15.57}, {33.160000000000004`, 15.57}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{42.191, 31.781}, {47.941, 31.781}, {47.941, 15.569999999999997`}, { 42.191, 15.569999999999997`}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 51.223000000000006`, 46.875}, {56.973000000000006`, 46.875}, {56.973000000000006`, 15.57}, {51.223000000000006`, 15.57}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{60.254, 37.707}, {66.00399999999999, 37.707}, {66.00399999999999, 15.569999999999997`}, {60.254, 15.569999999999997`}}}]}, FaceForm[ RGBColor[0.274612, 0.618881, 0.810913, 1.]], StripOnInput -> False], StyleBox[{ FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 70.12899999999999, 54.07}, {75.87899999999999, 54.07}, { 75.87899999999999, 15.57}, {70.12899999999999, 15.57}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 9.879000000000001, 60.547}, {24.129, 60.547}, {24.129, 56.547}, {9.879000000000001, 56.547}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{9.871, 13.097999999999999`}, {80.121, 13.097999999999999`}, {80.121, 9.097999999999999}, {9.871, 9.097999999999999}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 65.87899999999999, 60.547}, {80.12899999999999, 60.547}, { 80.12899999999999, 56.547}, {65.87899999999999, 56.547}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{11.469000000000001`, 66.54700000000001}, {45., 82.418}, {78.398, 66.54700000000001}}, {{45., 86.73400000000001}, { 2.2230000000000003`, 66.54700000000001}, { 2.2230000000000003`, 62.547}, {87.777, 62.547}, {87.777, 66.54700000000001}}}]}, FaceForm[ RGBColor[0.648987, 0.648987, 0.648987, 1.]], StripOnInput -> False]}, AspectRatio -> 1, Axes -> False, Background -> None, Frame -> None, FrameTicks -> None, ImageSize -> {Automatic, Dynamic[ 3.5 (CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[ Magnification]), ImageSizeCache -> {45., {0., 9.}}]}], GridBox[{{ RowBox[{ TagBox["\"Name: \"", "SummaryItemAnnotation"], "\[InvisibleSpace]", TagBox[ TemplateBox[{"\"MNIST\"", "\" \"", TemplateBox[{ "\"\[RightGuillemet]\"", "https://resources.wolframcloud.com/DataRepository/\ resources/MNIST"}, "HyperlinkURL"]}, "RowDefault"], "SummaryItem"]}]}, { RowBox[{ TagBox["\"Type: \"", "SummaryItemAnnotation"], "\[InvisibleSpace]", TagBox["\"DataResource\"", "SummaryItem"]}]}, { TagBox[ DynamicModuleBox[{ResourceSystemClient`Private`len$$ = 1}, RowBox[{ TagBox["\"Description: \"", "SummaryItemAnnotation"], "\[InvisibleSpace]", TagBox[ ButtonBox[ DynamicBox[ ToBoxes[ Replace[ ResourceSystemClient`Private`snipDots[ "Database of handwritten digits commonly used for \ training image processing systems", ResourceSystemClient`Private`len$$], Except[ Blank[String]] -> Snippet[ "Database of handwritten digits commonly used for \ training image processing systems", ResourceSystemClient`Private`len$$], {0}], StandardForm]], ButtonFunction :> (ResourceSystemClient`Private`len$$ = Ceiling[ResourceSystemClient`Private`len$$ 1.5]), Appearance -> None, BaseStyle -> {}, Evaluator -> Automatic, Method -> "Preemptive"], "SummaryItem"]}], DynamicModuleValues :> {}], "SummaryItem"]}}, GridBoxAlignment -> { "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, AutoDelete -> False, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> {"Columns" -> {{2}}, "Rows" -> {{Automatic}}}, BaseStyle -> { ShowStringCharacters -> False, NumberMarks -> False, PrintPrecision -> 3, ShowSyntaxStyles -> False}]}}, GridBoxAlignment -> {"Rows" -> {{Top}}}, AutoDelete -> False, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, BaselinePosition -> {1, 1}], True -> GridBox[{{ PaneBox[ ButtonBox[ DynamicBox[ FEPrivate`FrontEndResource[ "FEBitmaps", "SquareMinusIconMedium"]], ButtonFunction :> (Typeset`open$$ = False), Appearance -> None, Evaluator -> Automatic, Method -> "Preemptive"], Alignment -> {Center, Center}, ImageSize -> Dynamic[{ Automatic, 3.5 (CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[ Magnification])}]], GraphicsBox[{ Thickness[0.011111111111111112`], StyleBox[{ FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{3.789, 7.266}, {86.20700000000001, 7.266}, {86.20700000000001, 3.266}, {3.789, 3.266}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{14.129, 54.07}, {19.878999999999998`, 54.07}, {19.878999999999998`, 15.57}, {14.129, 15.57}}}]}, FaceForm[ RGBColor[0.648987, 0.648987, 0.648987, 1.]], StripOnInput -> False], StyleBox[{ FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{24.129, 41.82}, {29.879, 41.82}, {29.879, 15.57}, {24.129, 15.57}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 33.160000000000004`, 54.07}, {38.910000000000004`, 54.07}, { 38.910000000000004`, 15.57}, {33.160000000000004`, 15.57}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{42.191, 31.781}, {47.941, 31.781}, {47.941, 15.569999999999997`}, { 42.191, 15.569999999999997`}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 51.223000000000006`, 46.875}, {56.973000000000006`, 46.875}, {56.973000000000006`, 15.57}, {51.223000000000006`, 15.57}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{60.254, 37.707}, {66.00399999999999, 37.707}, {66.00399999999999, 15.569999999999997`}, {60.254, 15.569999999999997`}}}]}, FaceForm[ RGBColor[0.274612, 0.618881, 0.810913, 1.]], StripOnInput -> False], StyleBox[{ FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 70.12899999999999, 54.07}, {75.87899999999999, 54.07}, { 75.87899999999999, 15.57}, {70.12899999999999, 15.57}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 9.879000000000001, 60.547}, {24.129, 60.547}, {24.129, 56.547}, {9.879000000000001, 56.547}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{9.871, 13.097999999999999`}, {80.121, 13.097999999999999`}, {80.121, 9.097999999999999}, {9.871, 9.097999999999999}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 65.87899999999999, 60.547}, {80.12899999999999, 60.547}, { 80.12899999999999, 56.547}, {65.87899999999999, 56.547}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{11.469000000000001`, 66.54700000000001}, {45., 82.418}, {78.398, 66.54700000000001}}, {{45., 86.73400000000001}, { 2.2230000000000003`, 66.54700000000001}, { 2.2230000000000003`, 62.547}, {87.777, 62.547}, {87.777, 66.54700000000001}}}]}, FaceForm[ RGBColor[0.648987, 0.648987, 0.648987, 1.]], StripOnInput -> False]}, AspectRatio -> 1, Axes -> False, Background -> None, Frame -> None, FrameTicks -> None, ImageSize -> {Automatic, Dynamic[ 3.5 (CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[ Magnification]), ImageSizeCache -> {45., {0., 9.}}]}], GridBox[{{ RowBox[{ TagBox["\"Name: \"", "SummaryItemAnnotation"], "\[InvisibleSpace]", TagBox[ TemplateBox[{"\"MNIST\"", "\" \"", TemplateBox[{ "\"\[RightGuillemet]\"", "https://resources.wolframcloud.com/DataRepository/\ resources/MNIST"}, "HyperlinkURL"]}, "RowDefault"], "SummaryItem"]}]}, { RowBox[{ TagBox["\"Type: \"", "SummaryItemAnnotation"], "\[InvisibleSpace]", TagBox["\"DataResource\"", "SummaryItem"]}]}, { TagBox[ DynamicModuleBox[{ResourceSystemClient`Private`len$$ = 1}, RowBox[{ TagBox["\"Description: \"", "SummaryItemAnnotation"], "\[InvisibleSpace]", TagBox[ ButtonBox[ DynamicBox[ ToBoxes[ Replace[ ResourceSystemClient`Private`snipDots[ "Database of handwritten digits commonly used for \ training image processing systems", ResourceSystemClient`Private`len$$], Except[ Blank[String]] -> Snippet[ "Database of handwritten digits commonly used for \ training image processing systems", ResourceSystemClient`Private`len$$], {0}], StandardForm]], ButtonFunction :> (ResourceSystemClient`Private`len$$ = Ceiling[ResourceSystemClient`Private`len$$ 1.5]), Appearance -> None, BaseStyle -> {}, Evaluator -> Automatic, Method -> "Preemptive"], "SummaryItem"]}], DynamicModuleValues :> {}], "SummaryItem"]}, { RowBox[{ TagBox["\"Categories: \"", "SummaryItemAnnotation"], "\[InvisibleSpace]", TagBox[ TagBox[ TemplateBox[{",", "\",\"", "\"Machine Learning\""}, "RowWithSeparators"], Short], "SummaryItem"]}]}, { RowBox[{ TagBox["\"ContentTypes: \"", "SummaryItemAnnotation"], "\[InvisibleSpace]", TagBox[ TagBox[ TemplateBox[{",", "\",\"", "\"Image\""}, "RowWithSeparators"], Short], "SummaryItem"]}]}, { RowBox[{ TagBox["\"Keywords: \"", "SummaryItemAnnotation"], "\[InvisibleSpace]", TagBox[ TagBox[ TemplateBox[{ ",", "\",\"", "\"image processing\"", "\"machine learning\"", "\"classification\"", "\"computer vision\""}, "RowWithSeparators"], Short], "SummaryItem"]}]}, { RowBox[{ TagBox["\"Documentation: \"", "SummaryItemAnnotation"], "\[InvisibleSpace]", TagBox[ TemplateBox[{ "\"https://resources.wolframcloud.com/DataRepository/\ resources/MNIST\"", "https://resources.wolframcloud.com/DataRepository/\ resources/MNIST"}, "HyperlinkURL"], "SummaryItem"]}]}, { RowBox[{ TagBox["\"Data Location: \"", "SummaryItemAnnotation"], "\[InvisibleSpace]", TagBox[ DynamicModuleBox[{ ResourceSystemClient`Private`typesetstorage$$ = ResourceSystemClient`Private`typesetstorageLocation, ResourceSystemClient`Private`info$$}, DynamicBox[ ToBoxes[ ResourceSystemClient`Private`info$$ = ResourceSystemClient`Private`resourceInfo[ "16ff8400-2ffb-4642-b626-8e583258924e"]; If[ AssociationQ[ResourceSystemClient`Private`info$$], ResourceSystemClient`Private`typesetstorage$$[ Lookup[ ResourceSystemClient`Private`info$$, "ContentElementLocations", None]], Missing["NotAvailable"]], StandardForm]], DynamicModuleValues :> {}], "SummaryItem"]}]}, { RowBox[{ TagBox["\"UUID: \"", "SummaryItemAnnotation"], "\[InvisibleSpace]", TagBox[ "\"16ff8400-2ffb-4642-b626-8e583258924e\"", "SummaryItem"]}]}, { RowBox[{ TagBox["\"Version: \"", "SummaryItemAnnotation"], "\[InvisibleSpace]", TagBox["\"1.0.0\"", "SummaryItem"]}]}, { RowBox[{ TagBox["\"Size: \"", "SummaryItemAnnotation"], "\[InvisibleSpace]", TagBox[ TemplateBox[{ "70.08008`", "\"MB\"", "megabytes", "\"Megabytes\""}, "Quantity", SyntaxForm -> Mod], "SummaryItem"]}]}, { RowBox[{ TagBox["\"Elements: \"", "SummaryItemAnnotation"], "\[InvisibleSpace]", TagBox[ TagBox[ TemplateBox[{ ",", "\",\"", "\"TestData\"", "\"TestDataset\"", "\"TrainingData\"", "\"TrainingDataset\""}, "RowWithSeparators"], Short[#, 2]& ], "SummaryItem"]}]}}, GridBoxAlignment -> { "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, AutoDelete -> False, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> {"Columns" -> {{2}}, "Rows" -> {{Automatic}}}, BaseStyle -> { ShowStringCharacters -> False, NumberMarks -> False, PrintPrecision -> 3, ShowSyntaxStyles -> False}]}}, GridBoxAlignment -> {"Rows" -> {{Top}}}, AutoDelete -> False, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, BaselinePosition -> {1, 1}]}, Dynamic[Typeset`open$$], ImageSize -> Automatic]}, "SummaryPanel"], DynamicModuleValues:>{}], "]"}], ResourceObject[ Association[ "Name" -> "MNIST", "UUID" -> "16ff8400-2ffb-4642-b626-8e583258924e", "ResourceType" -> "DataResource", "Version" -> "1.0.0", "Description" -> "Database of handwritten digits commonly used for training image \ processing systems", "RepositoryLocation" -> URL["https://www.wolframcloud.com/objects/resourcesystem/api/1.0"], "ContentSize" -> Quantity[70.08008, "Megabytes"], "ContentElements" -> { "TestData", "TestDataset", "TrainingData", "TrainingDataset"}], ResourceSystemBase -> "https://www.wolframcloud.com/objects/resourcesystem/api/1.0"], Editable->False, SelectWithContents->True, Selectable->False]], "Output", CellChangeTimes->{3.729432259940152*^9, 3.729497352079094*^9, 3.7303979157000303`*^9}, CellLabel->"Out[50]=",ExpressionUUID->"157a98f8-ab94-4ae1-9a58-1ccbfc750969"] }, Open ]], Cell[BoxData[{ RowBox[{ RowBox[{"trainingData", "=", RowBox[{"ResourceData", "[", RowBox[{"resource", ",", "\"\\""}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"testData", "=", RowBox[{"ResourceData", "[", RowBox[{"resource", ",", "\"\\""}], "]"}]}], ";"}]}], "Input", CellLabel->"In[51]:=",ExpressionUUID->"e56feb2e-624b-44ec-8e44-db886fb1f8db"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"RandomSample", "[", RowBox[{"trainingData", ",", "5"}], "]"}]], "Input", CellLabel->"In[53]:=",ExpressionUUID->"5b561034-5812-4b76-9921-c48fcaf81271"], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{ GraphicsBox[ TagBox[RasterBox[CompressedData[" 1:eJxTTMoPSmNiYGAo5gASQYnljkVFiZXBAkBOaF5xZnpeaopnXklqemqRRRJI mQwU/x9w8Pz5Dxwy1XFMzKnfsEj8WOLOz8zEzFyHKXUlnhkIgHK2mBqVgcLM 5mWJzMxbMOQkGNgsXv3/f4GJKRtDztkgHETtBurG4dJ30rjl9gKlkrBLTeVh ZtZ9iSL05/lkbyYGJiBgYDJ6hSJ1JRTqNRCxC1nmTT8nE3a5b73KcGGgXUzM ExBymxFaJMqufJ7PzHkVLmcKcQETl2Q3SPA5E1McXM4bpIXNsOUo1HJhZr+n MLnzHh4eGw4g7NgnyqyEI1z+/++Mn4xTbqAAANlDhms= "], {{0, 28}, {28, 0}}, { 0, 255}, ColorFunction->GrayLevel], BoxForm`ImageTag["Byte", ColorSpace -> Automatic, Interleaving -> None], Selectable->False], DefaultBaseStyle->"ImageGraphics", ImageSizeRaw->{28, 28}, PlotRange->{{0, 28}, {0, 28}}], "\[Rule]", "2"}], ",", RowBox[{ GraphicsBox[ TagBox[RasterBox[CompressedData[" 1:eJxTTMoPSmNiYGAo5gASQYnljkVFiZXBAkBOaF5xZnpeaopnXklqemqRRRJI mQwU/x8ooOpqk1B/4DZWua11QOCuZb/tJy7dv+ezWz7AafYrhXycchc4PHHK 6TH24pD55ssY/geHUwoZZR7h0LaeUfIqDql93JzXcEgd5WfuxCF10ZbRD4fU /0hG3+/YZf5lMxnuw6FrGaPAAVwm6jP0QFlP216iyakx7QGZ/GuClclRNKmX EuFAoiWMUW0yppnGXFW6wuwa8z9hse9GIotO/RlcrqELAAAa7Nys "], {{0, 28}, {28, 0}}, {0, 255}, ColorFunction->GrayLevel], BoxForm`ImageTag["Byte", ColorSpace -> Automatic, Interleaving -> None], Selectable->False], DefaultBaseStyle->"ImageGraphics", ImageSizeRaw->{28, 28}, PlotRange->{{0, 28}, {0, 28}}], "\[Rule]", "2"}], ",", RowBox[{ GraphicsBox[ TagBox[RasterBox[CompressedData[" 1:eJxTTMoPSmNiYGAo5gASQYnljkVFiZXBAkBOaF5xZnpeaopnXklqemqRRRJI mQwU/x9G4M+lUjEmBqayX1jk5jEDARMzs98kTLlQZmab2hproIJV6FJXmJhl Hv3//w0oqYsuF87ErLF16v//65mZJdHlJBikV4PoaiYmCXQ5PSZDMO2ORd9q Jv5Zn/7/2GnCzGyB4U4dZmYNA22QR5Iw5DbrQPzHzNyI6cGX3d3h3d1pTEyn MOUgYCcz80tccmf4mbtxyf03IFNOn4k0fT+eweRWY8j9egeTw+m//ynMOKVQ AABNTbXR "], {{0, 28}, {28, 0}}, {0, 255}, ColorFunction->GrayLevel], BoxForm`ImageTag["Byte", ColorSpace -> Automatic, Interleaving -> None], Selectable->False], DefaultBaseStyle->"ImageGraphics", ImageSizeRaw->{28, 28}, PlotRange->{{0, 28}, {0, 28}}], "\[Rule]", "9"}], ",", RowBox[{ GraphicsBox[ TagBox[RasterBox[CompressedData[" 1:eJxTTMoPSmNiYGAo5gASQYnljkVFiZXBAkBOaF5xZnpeaopnXklqemqRRRJI mQwU/x9Y0MXAmIpdZokGMxMTk+h5TJk72SxMYCCNIXVblQkKmGeiS6nBpJjc vmBKyRys210KlJuOpk0PKLYDSF9kYuLehSp1T5iJae03IOObOxPbSlS5aUxM UvfBrDAMM42YmMIhrHImpjIUqacCTEylEOYDcSZRFLl+JiYXmMN3MrGvR5OL hTuLiWkiLrk23HJXlJj4rqPJqd4CMS4mKzExpaG45SIvE5PKldevO+WBwcMy H9V/KczwkBaZ8x8NyEGjhyMBPYL+/z8fCpJKmYshQUcAALQuhIE= "], {{0, 28}, {28, 0}}, {0, 255}, ColorFunction->GrayLevel], BoxForm`ImageTag["Byte", ColorSpace -> Automatic, Interleaving -> None], Selectable->False], DefaultBaseStyle->"ImageGraphics", ImageSizeRaw->{28, 28}, PlotRange->{{0, 28}, {0, 28}}], "\[Rule]", "0"}], ",", RowBox[{ GraphicsBox[ TagBox[RasterBox[CompressedData[" 1:eJxTTMoPSmNiYGAo5gASQYnljkVFiZXBAkBOaF5xZnpeaopnXklqemqRRRJI mQwU/x9e4EE5I0M9dqkzokwaGtwrsEldE2by//kzS/MbFrltTEFf/v/fxfQB i9xqgR9A8s3FP1jk/Hm3bduWrMTUhUVuHTMTExMHP5P8LyySG5cvX37yKhPT duze+P//KpPMZ9xyirik/jcxleCUy2OaiVPOC6vfweATK265OUyO2LwHlcPp u/9hvBdxyiVr45T6PweP3NtI3HKoAADAF+ID "], {{0, 28}, {28, 0}}, {0, 255}, ColorFunction->GrayLevel], BoxForm`ImageTag["Byte", ColorSpace -> Automatic, Interleaving -> None], Selectable->False], DefaultBaseStyle->"ImageGraphics", ImageSizeRaw->{28, 28}, PlotRange->{{0, 28}, {0, 28}}], "\[Rule]", "9"}]}], "}"}]], "Output", CellChangeTimes->{3.729432275749654*^9, 3.729497361256064*^9, 3.7303979256628036`*^9}, CellLabel->"Out[53]=",ExpressionUUID->"dbf0c7e0-b62f-475f-9391-187d311d4eca"] }, Open ]], Cell[TextData[{ "Initialize the ", StyleBox["W", FontWeight->"Bold"], " matrices properly and train the net (if a GPU is available, setting \ TargetDevice -> \[OpenCurlyDoubleQuote]GPU\[CloseCurlyDoubleQuote] is \ recommended):" }], "Text", CellChangeTimes->{{3.729432287117872*^9, 3.729432310556744*^9}, { 3.7294324272975397`*^9, 3.7294324558652067`*^9}},ExpressionUUID->"54126f11-2159-4c19-8f44-\ d8fa1606873f"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"trainingCapsNetInitialized", "=", RowBox[{"NetReplacePart", "[", "\[IndentingNewLine]", RowBox[{"trainingCapsNet", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "2", ",", "\"\\""}], "}"}], "\[Rule]", RowBox[{"RandomVariate", "[", RowBox[{ RowBox[{"UniformDistribution", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1"}], "}"}], "*", "0.005"}], "]"}], ",", RowBox[{"{", RowBox[{"1152", ",", "10", ",", "16", ",", "8"}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"trained", "=", RowBox[{"NetTrain", "[", "\[IndentingNewLine]", RowBox[{ "trainingCapsNetInitialized", ",", "trainingData", ",", "\[IndentingNewLine]", RowBox[{"LossFunction", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"\"\\"", "\[Rule]", RowBox[{"Scaled", "[", "1", "]"}]}], ",", RowBox[{"\"\\"", "\[Rule]", RowBox[{"Scaled", "[", "0.392", "]"}]}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"MaxTrainingRounds", "\[Rule]", "50"}], ",", "\[IndentingNewLine]", RowBox[{"TargetDevice", "\[Rule]", "\"\\""}]}], "\[IndentingNewLine]", "]"}]}]}], "Input", CellChangeTimes->{{3.729411355329073*^9, 3.729411537889598*^9}, 3.7294127904755898`*^9, {3.729418661211649*^9, 3.729418661854598*^9}, { 3.729432356344466*^9, 3.729432367804098*^9}, {3.729432401923273*^9, 3.7294324244269037`*^9}, {3.729432465746875*^9, 3.729432471129727*^9}, { 3.729497295894433*^9, 3.729497296924407*^9}, {3.729497362972539*^9, 3.7294973631169367`*^9}, {3.730397959765552*^9, 3.7303979602824383`*^9}, 3.730440108854636*^9},ExpressionUUID->"1fe2616f-0942-48bc-a0f2-\ 7ad8c798680d"], Cell[BoxData[ TagBox[ TemplateBox[{RowBox[{ StyleBox[ TagBox["NetGraph", "SummaryHead"], "NonInterpretableSummary"], StyleBox["[", "NonInterpretableSummary"], DynamicModuleBox[{Typeset`open = False}, PanelBox[ PaneSelectorBox[{False -> GridBox[{{ PaneBox[ ButtonBox[ DynamicBox[ FEPrivate`FrontEndResource[ "FEBitmaps", "SquarePlusIconMedium"]], ButtonFunction :> (Typeset`open = True), Appearance -> None, Evaluator -> Automatic, Method -> "Preemptive"], Alignment -> {Center, Center}, ImageSize -> {Automatic, 24}], GraphicsBox[{ Thickness[0.0149], { RGBColor[0.729, 0.729, 0.729], Thickness[0.03], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{1, 4, 3}}}, {{{18., 37.}, {18., 37.}, { 18.5, 27.5}, {35., 27.}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{50., 37.}, {50., 37.}, { 49.5, 27.5}, {33., 27.}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{18., 16.}, {18., 16.}, { 18.5, 25.5}, {35., 26.}}}, CurveClosed -> {0}]}, { FaceForm[ RGBColor[0.631, 0.8160000000000001, 0.498]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{15.5, 40.5}, {22.5, 40.5}, {22.5, 33.5}, {15.5, 33.5}}}]}, { FaceForm[ RGBColor[0.40800000000000003`, 0.627, 0.196]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 41.}, {15., 41.}, {15., 33.}, {23., 33.}}, {{22., 34.}, {16., 34.}, {16., 40.}, { 22., 40.}}}]}, { FaceForm[ RGBColor[0.38, 0.753, 0.89]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{15.5, 19.5}, {22.5, 19.5}, {22.5, 12.5}, {15.5, 12.5}}}]}, { FaceForm[ RGBColor[0.24300000000000002`, 0.608, 0.71]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 20.}, {15., 20.}, {15., 12.}, {23., 12.}}, {{22., 13.}, {16., 13.}, {16., 19.}, { 22., 19.}}}]}, { FaceForm[ RGBColor[0.584, 0.51, 0.8390000000000001]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{30.5, 30.5}, {37.5, 30.5}, {37.5, 23.5}, {30.5, 23.5}}}]}, { FaceForm[ RGBColor[0.4, 0.396, 0.659]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 31.}, {30., 31.}, {30., 23.}, {38., 23.}}, {{37., 24.}, {31., 24.}, {31., 30.}, { 37., 30.}}}]}, { FaceForm[ RGBColor[0.8270000000000001, 0.41200000000000003`, 0.133]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{45.5, 40.5}, {52.5, 40.5}, {52.5, 33.5}, {45.5, 33.5}}}]}, { FaceForm[ RGBColor[0.647, 0.259, 0.08600000000000001]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{53., 41.}, {45., 41.}, {45., 33.}, {53., 33.}}, {{52., 34.}, {46., 34.}, {46., 40.}, { 52., 40.}}}]}}, ImageMargins -> 0, ImageSize -> {36, Automatic}, PlotRangePadding -> 0], GridBox[{{ StyleBox[ TemplateBox[{"\"Number of inputs\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["2", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Number of outputs\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["2", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Number of layers\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["5", "SummaryItem"]}}, BaselinePosition -> {2, 1}, GridBoxAlignment -> { "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> { "Columns" -> {{2}}, "Rows" -> {{Automatic}}}]}}, GridBoxAlignment -> {"Rows" -> {{Top}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridFrameMargins -> {{0, 0}, {0, 0}}, BaselinePosition -> {1, 3}], True -> GridBox[{{ PaneBox[ ButtonBox[ DynamicBox[ FEPrivate`FrontEndResource[ "FEBitmaps", "SquareMinusIconMedium"]], ButtonFunction :> (Typeset`open = False), Appearance -> None, Evaluator -> Automatic, Method -> "Preemptive"], Alignment -> {Center, Center}, ImageSize -> {Automatic, 24}], GraphicsBox[{ Thickness[0.0149], { RGBColor[0.729, 0.729, 0.729], Thickness[0.03], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{1, 4, 3}}}, {{{18., 37.}, {18., 37.}, { 18.5, 27.5}, {35., 27.}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{50., 37.}, {50., 37.}, { 49.5, 27.5}, {33., 27.}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{18., 16.}, {18., 16.}, { 18.5, 25.5}, {35., 26.}}}, CurveClosed -> {0}]}, { FaceForm[ RGBColor[0.631, 0.8160000000000001, 0.498]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{15.5, 40.5}, {22.5, 40.5}, {22.5, 33.5}, {15.5, 33.5}}}]}, { FaceForm[ RGBColor[0.40800000000000003`, 0.627, 0.196]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 41.}, {15., 41.}, {15., 33.}, {23., 33.}}, {{22., 34.}, {16., 34.}, {16., 40.}, { 22., 40.}}}]}, { FaceForm[ RGBColor[0.38, 0.753, 0.89]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{15.5, 19.5}, {22.5, 19.5}, {22.5, 12.5}, {15.5, 12.5}}}]}, { FaceForm[ RGBColor[0.24300000000000002`, 0.608, 0.71]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 20.}, {15., 20.}, {15., 12.}, {23., 12.}}, {{22., 13.}, {16., 13.}, {16., 19.}, { 22., 19.}}}]}, { FaceForm[ RGBColor[0.584, 0.51, 0.8390000000000001]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{30.5, 30.5}, {37.5, 30.5}, {37.5, 23.5}, {30.5, 23.5}}}]}, { FaceForm[ RGBColor[0.4, 0.396, 0.659]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 31.}, {30., 31.}, {30., 23.}, {38., 23.}}, {{37., 24.}, {31., 24.}, {31., 30.}, { 37., 30.}}}]}, { FaceForm[ RGBColor[0.8270000000000001, 0.41200000000000003`, 0.133]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{45.5, 40.5}, {52.5, 40.5}, {52.5, 33.5}, {45.5, 33.5}}}]}, { FaceForm[ RGBColor[0.647, 0.259, 0.08600000000000001]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{53., 41.}, {45., 41.}, {45., 33.}, {53., 33.}}, {{52., 34.}, {46., 34.}, {46., 40.}, { 52., 40.}}}]}}, ImageMargins -> 0, ImageSize -> {36, Automatic}, PlotRangePadding -> 0], GridBox[{{ DynamicModuleBox[{ NeuralNetworks`Private`NetGraph`selection = None}, GridBox[{{ TagBox[ GraphicsBox[{{ GrayLevel[0.7], { LineBox[{{-4., 2.4492935982947064`*^-16}, {-3., 1.8369701987210297`*^-16}}], LineBox[{{-3., 1.8369701987210297`*^-16}, {-2., 1.2246467991473532`*^-16}}], LineBox[{{-3., 1.8369701987210297`*^-16}, {-2., 1.0000000000000002`}}], LineBox[{{-4., 1.0000000000000002`}, {-3., 1.0000000000000002`}}], LineBox[{{-3., 2.}, {-2., 1.0000000000000002`}}], LineBox[{{-3., 1.0000000000000002`}, {-2., 1.2246467991473532`*^-16}}], LineBox[{{-3., 1.0000000000000002`}, {-2., 1.0000000000000002`}}], LineBox[{{-2., 1.2246467991473532`*^-16}, {-1., 6.123233995736766*^-17}}], LineBox[{{-1., 6.123233995736766*^-17}, {0., 0.}}], LineBox[{{-2., 1.0000000000000002`}, {-0.9999999999999999, 1.}}]}}, { InsetBox[ GraphicsBox[ StyleBox[ PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}], GrayLevel[0.7], StripOnInput -> False]], {-3.4, 2.0818995585505003`*^-16}, {-0.25, 0}, Offset[8], {1., -6.123233995736767*^-17}], InsetBox[ GraphicsBox[ StyleBox[ PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}], GrayLevel[0.7], StripOnInput -> False]], {-2.4000000000000004`, 1.4695761589768238`*^-16}, {-0.25, 0}, Offset[8], {1., -6.123233995736765*^-17}], InsetBox[ GraphicsBox[ StyleBox[ PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}], GrayLevel[0.7], StripOnInput -> False]], {-2.4000000000000004`, 0.6000000000000002}, {-0.25, 0}, Offset[8], {1., 1.}], InsetBox[ GraphicsBox[ StyleBox[ PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}], GrayLevel[0.7], StripOnInput -> False]], {-3.4, 1.0000000000000002`}, {-0.25, 0}, Offset[8], {1., 0.}], InsetBox[ GraphicsBox[ StyleBox[ PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}], GrayLevel[0.7], StripOnInput -> False]], {-2.4000000000000004`, 1.4000000000000001`}, {-0.25, 0}, Offset[8], {1., -0.9999999999999998}], InsetBox[ GraphicsBox[ StyleBox[ PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}], GrayLevel[0.7], StripOnInput -> False]], {-2.4000000000000004`, 0.4000000000000002}, {-0.25, 0}, Offset[8], {1., -1.}], InsetBox[ GraphicsBox[ StyleBox[ PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}], GrayLevel[0.7], StripOnInput -> False]], {-2.4000000000000004`, 1.0000000000000002`}, {-0.25, 0}, Offset[8], {1., 0.}], InsetBox[ GraphicsBox[ StyleBox[ PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}], GrayLevel[0.7], StripOnInput -> False]], {-1.4, 8.572527594031473*^-17}, {-0.25, 0}, Offset[8], {1., -6.123233995736766*^-17}], InsetBox[ GraphicsBox[ StyleBox[ PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}], GrayLevel[0.7], StripOnInput -> False]], {-0.4, 2.4492935982947065`*^-17}, {-0.25, 0}, Offset[8], {1., -6.123233995736766*^-17}], InsetBox[ GraphicsBox[ StyleBox[ PolygonBox[{{-1., 0.3333333333333333}, {0., 0.}, {-1., -0.3333333333333333}, {-0.6666666666666666, 0.}, {-1., 0.3333333333333333}}], GrayLevel[0.7], StripOnInput -> False]], {-1.4, 1.}, {-0.25, 0}, Offset[8], {1., -2.220446049250313*^-16}]}, { EdgeForm[ AbsoluteThickness[1]], FontSize -> 10, { TagBox[ TagBox[ TooltipBox[{ GrayLevel[0.85], EdgeForm[ GrayLevel[0.5]], DiskBox[{-4., 2.4492935982947064`*^-16}, Offset[{2, 2}]]}, TagBox[ GridBox[{{ StyleBox["\"Label\"", Bold, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Label", Bold]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 1), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ FaceForm[ RGBColor[0.9, 0.9, 0.9]], EdgeForm[ GrayLevel[0.85]], RectangleBox[ Offset[{-10, -10}, {-3., 1.8369701987210297`*^-16}], Offset[{10, 10}, {-3., 1.8369701987210297`*^-16}]]}, InsetBox[ FormBox["\"UV\"", TraditionalForm], Offset[{0, -1}, {-3., 1.8369701987210297`*^-16}]]}, TagBox[ GridBox[{{ StyleBox["\"Mask\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"UnitVectorLayer", "[", RowBox[{"10", ",", RowBox[{"\"Input\"", "\[Rule]", RowBox[{"{", RowBox[{"Restricted", "[", RowBox[{"\"Integer\"", ",", "10"}], "]"}], "}"}]}]}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Mask", Bold], Style[ HoldForm[ UnitVectorLayer[10, "Input" -> { Restricted["Integer", 10]}]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 2), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ FaceForm[ RGBColor[0.9, 0.9, 0.9]], EdgeForm[ GrayLevel[0.85]], RectangleBox[ Offset[{-10, -10}, {-2., 1.2246467991473532`*^-16}], Offset[{10, 10}, {-2., 1.2246467991473532`*^-16}]]}, InsetBox[ BoxData[ FormBox[ StyleBox[ "\"\[NegativeVeryThinSpace]\[NegativeVeryThinSpace]#\"", 14, Bold, Italic, FontColor -> RGBColor[0.2627450980392157, 0.5372549019607843, 0.34509803921568627`], FontFamily -> "Source Code Pro", StripOnInput -> False], TraditionalForm]], {-2., 1.2246467991473532`*^-16}]}, TagBox[ GridBox[{{ StyleBox["\"Classify\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"ThreadingLayer", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"#1", " ", SuperscriptBox[ RowBox[{"Max", "[", RowBox[{"0", ",", RowBox[{"0.9`", "-", "#2"}]}], "]"}], "2"]}], "+", RowBox[{"0.5`", " ", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"1", "-", "#1"}], ")"}], " ", SuperscriptBox[ RowBox[{"Max", "[", RowBox[{"0", ",", RowBox[{ RowBox[{"-", "0.1`"}], "+", "#2"}]}], "]"}], "2"]}], ")"}]}]}], "&"}], ",", RowBox[{"\"Inputs\"", "\[Rule]", RowBox[{"{", RowBox[{"10", ",", "10"}], "}"}]}]}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Classify", Bold], Style[ HoldForm[ ThreadingLayer[# Max[0, Subtract[0.9, #2]]^2 + 0.5 (Subtract[1, #] Max[0, -0.1 + #2]^2)& , "Inputs" -> {10, 10}]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 3), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ FaceForm[ RGBColor[0.9, 0.9, 0.9]], EdgeForm[ GrayLevel[0.85]], RectangleBox[ Offset[{-12, -12}, {-2., 1.0000000000000002`}], Offset[{12, 12}, {-2., 1.0000000000000002`}]]}, InsetBox[ GraphicsBox[{ Thickness[0.0149], { GrayLevel[0.5], Thickness[0.03], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{1, 4, 3}}}, {{{39.192120463394616`, 30.51535353195944}, {39.192120463394616`, 30.51535353195944}, {38.69442248591872, 35.17935629818005}, {28.246036107633145`, 35.21413676830481}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{39.335627149246974`, 22.022653388846493`}, {39.335627149246974`, 22.022653388846493`}, {39.028664759644585`, 18.313538367818456`}, {28.898905902765012`, 18.118321787764348`}}}, CurveClosed -> {0}]}, GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ RGBColor[0.631, 0.8160000000000001, 0.498]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 40.5}, {22.5, 40.5}, {22.5, 33.5}, {15.5, 33.5}}}]}, { FaceForm[ RGBColor[0.40800000000000003`, 0.627, 0.196]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 41.}, {15., 41.}, { 15., 33.}, {23., 33.}}, {{22., 34.}, {16., 34.}, {16., 40.}, {22., 40.}}}]}}]}], {{{{1.6209767772132715`, 0.}, { 0., 1.302327038770047}}, {-8.296516058106576, \ -14.790162389666165`}}}], GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ RGBColor[0.38, 0.753, 0.89]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 19.5}, {22.5, 19.5}, {22.5, 12.5}, {15.5, 12.5}}}]}, { FaceForm[ RGBColor[0.24300000000000002`, 0.608, 0.71]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 20.}, {15., 20.}, { 15., 12.}, {23., 12.}}, {{22., 13.}, {16., 13.}, {16., 19.}, {22., 19.}}}]}}]}], {{{{1.6446663930506598`, 0.}, { 0., 1.2828873028183188`}}, {-8.702521921403617, \ -2.012105908138385}}}], GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ RGBColor[0.584, 0.51, 0.8390000000000001]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 30.5, 30.5}, {37.5, 30.5}, {37.5, 23.5}, {30.5, 23.5}}}]}, { FaceForm[ RGBColor[0.4, 0.396, 0.659]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 31.}, {30., 31.}, { 30., 23.}, {38., 23.}}, {{37., 24.}, {31., 24.}, {31., 30.}, {37., 30.}}}]}}]}], {{{{1.5182866155506958`, 0.}, { 0., 1.2065857650683098`}}, {-11.402865979580374`, \ -6.527851836053724}}}]}, PlotRange -> All, AspectRatio -> 1, PlotRangePadding -> 0, ImagePadding -> 0, ImageSize -> 15, ImageMargins -> 0.], {-2., 1.0000000000000002`}]}, TagBox[ GridBox[{{ StyleBox[ "\"Reconstruct\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"NetGraph", "[", RowBox[{ RowBox[{"\[LeftSkeleton]", "9", "\[RightSkeleton]"}], ",", RowBox[{"\[LeftSkeleton]", "12", "\[RightSkeleton]"}]}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Reconstruct", Bold], Style[ HoldForm[ NetGraph[ Skeleton[9], Skeleton[12]]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 4), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{ GrayLevel[0.85], EdgeForm[ GrayLevel[0.5]], DiskBox[{-4., 1.0000000000000002`}, Offset[{2, 2}]]}, TagBox[ GridBox[{{ StyleBox["\"Input\"", Bold, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Input", Bold]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 5), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ FaceForm[ RGBColor[0.9, 0.9, 0.9]], EdgeForm[ GrayLevel[0.85]], RectangleBox[ Offset[{-12, -12}, {-3., 1.0000000000000002`}], Offset[{12, 12}, {-3., 1.0000000000000002`}]]}, InsetBox[ GraphicsBox[{ Thickness[0.0149], { GrayLevel[0.5], Thickness[0.03], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{1, 4, 3}}}, {{{39.192120463394616`, 30.51535353195944}, {39.192120463394616`, 30.51535353195944}, {38.69442248591872, 35.17935629818005}, {28.246036107633145`, 35.21413676830481}}}, CurveClosed -> {0}], JoinedCurveBox[{{{1, 4, 3}}}, {{{39.335627149246974`, 22.022653388846493`}, {39.335627149246974`, 22.022653388846493`}, {39.028664759644585`, 18.313538367818456`}, {28.898905902765012`, 18.118321787764348`}}}, CurveClosed -> {0}]}, GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ RGBColor[0.631, 0.8160000000000001, 0.498]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 40.5}, {22.5, 40.5}, {22.5, 33.5}, {15.5, 33.5}}}]}, { FaceForm[ RGBColor[0.40800000000000003`, 0.627, 0.196]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 41.}, {15., 41.}, { 15., 33.}, {23., 33.}}, {{22., 34.}, {16., 34.}, {16., 40.}, {22., 40.}}}]}}]}], {{{{1.6209767772132715`, 0.}, { 0., 1.302327038770047}}, {-8.296516058106576, \ -14.790162389666165`}}}], GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ RGBColor[0.38, 0.753, 0.89]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 19.5}, {22.5, 19.5}, {22.5, 12.5}, {15.5, 12.5}}}]}, { FaceForm[ RGBColor[0.24300000000000002`, 0.608, 0.71]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{23., 20.}, {15., 20.}, { 15., 12.}, {23., 12.}}, {{22., 13.}, {16., 13.}, {16., 19.}, {22., 19.}}}]}}]}], {{{{1.6446663930506598`, 0.}, { 0., 1.2828873028183188`}}, {-8.702521921403617, \ -2.012105908138385}}}], GeometricTransformationBox[ GraphicsGroupBox[{ Thickness[0.0149], GraphicsGroupBox[{{ FaceForm[ RGBColor[0.584, 0.51, 0.8390000000000001]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 30.5, 30.5}, {37.5, 30.5}, {37.5, 23.5}, {30.5, 23.5}}}]}, { FaceForm[ RGBColor[0.4, 0.396, 0.659]], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 31.}, {30., 31.}, { 30., 23.}, {38., 23.}}, {{37., 24.}, {31., 24.}, {31., 30.}, {37., 30.}}}]}}]}], {{{{1.5182866155506958`, 0.}, { 0., 1.2065857650683098`}}, {-11.402865979580374`, \ -6.527851836053724}}}]}, PlotRange -> All, AspectRatio -> 1, PlotRangePadding -> 0, ImagePadding -> 0, ImageSize -> 15, ImageMargins -> 0.], {-3., 1.0000000000000002`}]}, TagBox[ GridBox[{{ StyleBox["\"CapsNet\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"NetGraph", "[", RowBox[{ RowBox[{"\[LeftSkeleton]", "6", "\[RightSkeleton]"}], ",", RowBox[{"\[LeftSkeleton]", "9", "\[RightSkeleton]"}]}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["CapsNet", Bold], Style[ HoldForm[ NetGraph[ Skeleton[6], Skeleton[9]]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 6), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{{ FaceForm[ RGBColor[0.9, 0.9, 0.9]], EdgeForm[ GrayLevel[0.85]], RectangleBox[ Offset[{-10, -10}, {-1., 6.123233995736766*^-17}], Offset[{10, 10}, {-1., 6.123233995736766*^-17}]]}, InsetBox[ FormBox["\"S\"", TraditionalForm], Offset[{0, -1}, {-1., 6.123233995736766*^-17}]]}, TagBox[ GridBox[{{ StyleBox["\"Total\"", Bold, StripOnInput -> False]}, { StyleBox[ TagBox[ RowBox[{"SummationLayer", "[", RowBox[{"\"Input\"", "\[Rule]", "10"}], "]"}], HoldForm], FontFamily -> "Source Code Pro", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Total", Bold], Style[ HoldForm[ SummationLayer["Input" -> 10]], FontFamily -> "Source Code Pro", ShowStringCharacters -> True]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 7), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{ GrayLevel[0.85], EdgeForm[ GrayLevel[0.5]], DiskBox[{0., 0.}, Offset[{2, 2}]]}, TagBox[ GridBox[{{ StyleBox["\"ClassLoss\"", Bold, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["ClassLoss", Bold]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 8), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{ GrayLevel[0.85], EdgeForm[ GrayLevel[0.5]], DiskBox[{-0.9999999999999999, 1.}, Offset[{2, 2}]]}, TagBox[ GridBox[{{ StyleBox["\"RecoLoss\"", Bold, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["RecoLoss", Bold]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 9), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]], TagBox[ TagBox[ TooltipBox[{ GrayLevel[0.85], EdgeForm[ GrayLevel[0.5]], DiskBox[{-3., 2.}, Offset[{2, 2}]]}, TagBox[ GridBox[{{ StyleBox["\"Input\"", Bold, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]], Annotation[#, Column[{ Style["Input", Bold]}], "Tooltip"]& ], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = 1), PassEventsUp -> False, Method -> "Preemptive", PassEventsDown -> Automatic}]]}}, { StyleBox[{{ InsetBox[ FormBox["\"Label\"", TraditionalForm], Offset[{0, -7}, {-4., 2.4492935982947064`*^-16}], {0, 1.}, Automatic, {1, 0}], InsetBox[ FormBox["\"Mask\"", TraditionalForm], Offset[{0, -13}, {-3., 1.8369701987210297`*^-16}], { 0, 1.}, Automatic, {1, 0}], InsetBox[ FormBox["\"Classify\"", TraditionalForm], Offset[{0, -13}, {-2., 1.2246467991473532`*^-16}], { 0, 1.}, Automatic, {1, 0}], InsetBox[ FormBox[ TagBox[ TooltipBox[ "\"Reconstru..\"", "\"Reconstruct\"", LabelStyle -> "TextStyling"], Annotation[#, "Reconstruct", "Tooltip"]& ], TraditionalForm], Offset[{0, -15}, {-2., 1.0000000000000002`}], {0, 1.}, Automatic, {1, 0}], InsetBox[ FormBox["\"Input\"", TraditionalForm], Offset[{0, -7}, {-4., 1.0000000000000002`}], {0, 1.}, Automatic, {1, 0}], InsetBox[ FormBox["\"CapsNet\"", TraditionalForm], Offset[{0, -15}, {-3., 1.0000000000000002`}], {0, 1.}, Automatic, {1, 0}], InsetBox[ FormBox["\"Total\"", TraditionalForm], Offset[{0, -13}, {-1., 6.123233995736766*^-17}], {0, 1.}, Automatic, {1, 0}], InsetBox[ FormBox["\"ClassLoss\"", TraditionalForm], Offset[{0, -7}, {0., 0.}], {0, 1.}, Automatic, {1, 0}], InsetBox[ FormBox["\"RecoLoss\"", TraditionalForm], Offset[{0, -7}, {-0.9999999999999999, 1.}], {0, 1.}, Automatic, {1, 0}], InsetBox[ FormBox["\"Input\"", TraditionalForm], Offset[{0, -7}, {-3., 2.}], {0, 1.}, Automatic, {1, 0}]}}, FontColor -> GrayLevel[0.5], StripOnInput -> False], StyleBox[{ InsetBox[ FormBox[ SubscriptBox["\"\[DoubleStruckCapitalN]\"", "10"], TraditionalForm], Offset[{3.367778697655222*^-16, 5.5}, {-3.4, 2.0818995585505003`*^-16}], {0., -0.17}, Automatic, { 1., -6.123233995736767*^-17}], InsetBox[ FormBox[ TemplateBox[{"\[Cross]", "\"\[Cross]\"", "\"10\""}, "RowWithSeparators"], TraditionalForm], Offset[{3.3677786976552205`*^-16, 5.5}, {-2.4000000000000004`, 1.4695761589768238`*^-16}], { 0., -0.17}, Automatic, {1., -6.123233995736765*^-17}], InsetBox[ FormBox[ TemplateBox[{"\[Cross]", "\"\[Cross]\"", "\"10\""}, "RowWithSeparators"], TraditionalForm], Offset[{-3.889087296526011, 3.889087296526011}, {-2.4000000000000004`, 0.6000000000000002}], {0., -0.17}, Automatic, { 0.7071067811865475, 0.7071067811865475}], InsetBox[ FormBox[ TemplateBox[{ "\[Cross]", "\"\[Cross]\"", "\"1\"", "\"28\"", "\"28\""}, "RowWithSeparators"], TraditionalForm], Offset[{0., 5.5}, {-3.4, 1.0000000000000002`}], { 0., -0.17}, Automatic, {1., 0.}], InsetBox[ FormBox[ TemplateBox[{ "\[Cross]", "\"\[Cross]\"", "\"1\"", "\"28\"", "\"28\""}, "RowWithSeparators"], TraditionalForm], Offset[{3.889087296526011, 3.8890872965260117`}, {-2.4000000000000004`, 1.4000000000000001`}], {0., -0.17}, Automatic, { 0.7071067811865476, -0.7071067811865475}], InsetBox[ FormBox[ TemplateBox[{"\[Cross]", "\"\[Cross]\"", "\"10\""}, "RowWithSeparators"], TraditionalForm], Offset[{3.889087296526011, 3.889087296526011}, {-2.4000000000000004`, 0.4000000000000002}], {0., -0.17}, Automatic, { 0.7071067811865475, -0.7071067811865475}], InsetBox[ FormBox[ TemplateBox[{ "\[Cross]", "\"\[Cross]\"", "\"10\"", "\"16\""}, "RowWithSeparators"], TraditionalForm], Offset[{0., 5.5}, {-2.4000000000000004`, 1.0000000000000002`}], {0., -0.17}, Automatic, {1., 0.}], InsetBox[ FormBox[ TemplateBox[{"\[Cross]", "\"\[Cross]\"", "\"10\""}, "RowWithSeparators"], TraditionalForm], Offset[{3.3677786976552215`*^-16, 5.5}, {-1.4, 8.572527594031473*^-17}], {0., -0.17}, Automatic, { 1., -6.123233995736766*^-17}], InsetBox[ FormBox["\"\[DoubleStruckCapitalR]\"", TraditionalForm], Offset[{3.3677786976552215`*^-16, 5.5}, {-0.4, 2.4492935982947065`*^-17}], {0., -0.17}, Automatic, { 1., -6.123233995736766*^-17}], InsetBox[ FormBox["\"\[DoubleStruckCapitalR]\"", TraditionalForm], Offset[{1.2212453270876722`*^-15, 5.5}, {-1.4, 1.}], { 0., -0.17}, Automatic, {1., -2.220446049250313*^-16}]}, FontColor -> GrayLevel[0.7], FontSize -> 8, FontWeight -> "Thin", StripOnInput -> False]}, { FaceForm[None], EdgeForm[{ Dashing[{0, Small}], GrayLevel[0.5], Thickness[Large]}], PolygonBox[ Dynamic[ If[ Not[ IntegerQ[NeuralNetworks`Private`NetGraph`selection]], {}, GeneralUtilities`Graphics`PackagePrivate`makeOffsetSquare[ Part[{{-4., 2.4492935982947064`*^-16}, {-3., 1.8369701987210297`*^-16}, {-2., 1.2246467991473532`*^-16}, {-2., 1.0000000000000002`}, {-4., 1.0000000000000002`}, {-3., 1.0000000000000002`}, {-1., 6.123233995736766*^-17}, {0., 0.}, {-0.9999999999999999, 1.}, {-3., 2.}}, NeuralNetworks`Private`NetGraph`selection], 3 + {0.5, 0.5} Part[{8, 20, 20, 24, 8, 24, 20, 8, 8, 8}, NeuralNetworks`Private`NetGraph`selection], {-0.5, 0.5}]]]]}}, ImageSize -> {283.5, 156.}, AspectRatio -> Full, PlotRangePadding -> 0, ImagePadding -> {{28., 35.5}, {28., 18.}}, ImageMargins -> {{0, 0}, {0, 0}}, BaseStyle -> { TooltipBoxOptions -> {TooltipDelay -> 0.08}}], EventHandlerTag[{ "MouseClicked" :> ( NeuralNetworks`Private`NetGraph`selection = None), Method -> "Preemptive", PassEventsDown -> Automatic, PassEventsUp -> True}]]}, { DynamicBox[ If[ IntegerQ[NeuralNetworks`Private`NetGraph`selection], NeuralNetworks`Private`NetGraph`vpathInfo[ Part[{ NeuralNetworks`NetPath["Inputs", "Label"], NeuralNetworks`NetPath["Nodes", "Mask"], NeuralNetworks`NetPath["Nodes", "Classify"], NeuralNetworks`NetPath["Nodes", "Reconstruct"], NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "CapsNet"], NeuralNetworks`NetPath["Nodes", "Total"], NeuralNetworks`NetPath["Outputs", "ClassLoss"], NeuralNetworks`NetPath["Outputs", "RecoLoss"]}, NeuralNetworks`Private`NetGraph`selection], Association["Input" -> NetEncoder["Image", Association[ "ImageSize" -> {28, 28}, "ColorSpace" -> "Grayscale", "ColorChannels" -> 1, "MeanImage" -> None, "VarianceImage" -> None], NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]], "Label" -> NetEncoder["Class", Association[ "Labels" -> {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, "OutputForm" -> "Index", "Count" -> 10], NeuralNetworks`TensorT[{}, NeuralNetworks`IndexIntegerT[10]]]], Association[ "RecoLoss" -> NeuralNetworks`TensorT[{}, NeuralNetworks`RealT], "ClassLoss" -> NeuralNetworks`TensorT[{}, NeuralNetworks`RealT]], Association[ "Mask" -> Association[ "Type" -> "UnitVector", "Arrays" -> Association[], "Parameters" -> Association["ClassCount" -> 10, "$Dimensions" -> {}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{}, NeuralNetworks`IndexIntegerT[10]]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "CapsNet" -> Association[ "Type" -> "Graph", "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Classification" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT], "Vectors" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association[ "ReLUConv1" -> Association[ "Type" -> "Chain", "Nodes" -> Association["1" -> Association["Type" -> "Convolution", "Arrays" -> Association["Weights" -> NeuralNetworks`Private`DummyRawArray[{256, 1, 9, 9}], "Biases" -> NeuralNetworks`Private`DummyRawArray[{256}]], "Parameters" -> Association[ "OutputChannels" -> 256, "KernelSize" -> {9, 9}, "Stride" -> {1, 1}, "PaddingSize" -> {0, 0}, "Dilation" -> {1, 1}, "Dimensionality" -> 2, "Interleaving" -> False, "$InputChannels" -> 1, "$GroupNumber" -> 1, "$InputSize" -> {28, 28}, "$OutputSize" -> {20, 20}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Ramp], "$Dimensions" -> {256, 20, 20}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "2", "Outputs", "Output"]}, "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]]], "PrimaryCaps" -> Association[ "Type" -> "Chain", "Nodes" -> Association["1" -> Association["Type" -> "Convolution", "Arrays" -> Association["Weights" -> NeuralNetworks`Private`DummyRawArray[{256, 256, 9, 9}], "Biases" -> NeuralNetworks`Private`DummyRawArray[{256}]], "Parameters" -> Association[ "OutputChannels" -> 256, "KernelSize" -> {9, 9}, "Stride" -> {2, 2}, "PaddingSize" -> {0, 0}, "Dilation" -> {1, 1}, "Dimensionality" -> 2, "Interleaving" -> False, "$InputChannels" -> 256, "$GroupNumber" -> 1, "$InputSize" -> {20, 20}, "$OutputSize" -> {6, 6}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{256, 6, 6}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Transpose", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[{ TwoWayRule[1, 3], TwoWayRule[1, 2]}]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{256, 6, 6}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{6, 6, 256}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Reshape", "Arrays" -> Association[], "Parameters" -> Association["Dimensions" -> {1152, 8}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{6, 6, 256}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]]], "4" -> Association[ "Type" -> "Graph", "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Nodes" -> Association["1" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association[ "Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[2], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Power, NeuralNetworks`Private`ScalarSymbol[1], 2.}]]], "$Dimensions" -> {1152, 8}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[ Span[2, All]]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Sqrt, NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[3] -> {Plus, 1., NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4] -> {Divide, NeuralNetworks`Private`ScalarSymbol[2], NeuralNetworks`Private`ScalarSymbol[3]}]]], "$Dimensions" -> {1152}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152}, NeuralNetworks`RealT]]], "4" -> Association["Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[Automatic], "Level" -> 2], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1152}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]]], "5" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "4", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "5", "Outputs", "Output"]}]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "4", "Outputs", "Output"]}, "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{256, 20, 20}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]]], "PrimaryPredVects" -> Association[ "Type" -> "Graph", "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association["2" -> Association["Type" -> "ConstantArray", "Arrays" -> Association["Array" -> NeuralNetworks`Private`DummyRawArray[{1152, 10, 16, 8}]], "Parameters" -> Association[ "Dimensions" -> {1152, 10, 16, 8}], "Inputs" -> Association[], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]]], "1" -> Association["Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[{Automatic, Automatic}], "Level" -> 2], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 8}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]]], "4" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[4]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10, 16, 8}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "3", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "2"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "4", "Outputs", "Output"]}], "DynamicRouting" -> Association[ "Type" -> "Chain", "Nodes" -> Association["1" -> Association["Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[2], "Level" -> 1], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{2, 1152, 10, 16}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "NetFold", "Arrays" -> Association[], "Parameters" -> Association["Net" -> Association["Type" -> "Graph", "Inputs" -> Association["State" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT], "Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Nodes" -> Association["capsule" -> Association["Type" -> "Graph", "Inputs" -> Association["b" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT], "uhat" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association["c" -> Association[ "Type" -> "Chain", "Nodes" -> Association[ "1" -> Association["Type" -> "Reshape", "Arrays" -> Association[], "Parameters" -> Association[ "Dimensions" -> {1152, 10}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Softmax", "Arrays" -> Association[], "Parameters" -> Association["Level" -> -1], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"]}, "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]], "s" -> Association["Type" -> "Graph", "Inputs" -> Association["c" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT], "uhat" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association["1" -> Association[ "Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[Automatic], "Level" -> 3], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "2" -> Association[ "Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{ 1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association[ "Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[1]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "c"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "uhat"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"]}], "v" -> Association[ "Type" -> "Graph", "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association["1" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[2], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Power, NeuralNetworks`Private`ScalarSymbol[1], 2.}]]], "$Dimensions" -> {10, 16}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]], "2" -> Association[ "Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[ Span[2, All]]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "3" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Sqrt, NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[3] -> {Plus, 1., NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4] -> {Divide, NeuralNetworks`Private`ScalarSymbol[2], NeuralNetworks`Private`ScalarSymbol[3]}]]], "$Dimensions" -> {10}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "4" -> Association[ "Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[Automatic], "Level" -> 2], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]], "5" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association[ "Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "4", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath["Nodes", "5", "Outputs", "Output"]}]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "c", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "b"], NeuralNetworks`NetPath["Nodes", "s", "Inputs", "c"] -> NeuralNetworks`NetPath["Nodes", "c", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "s", "Inputs", "uhat"] -> NeuralNetworks`NetPath["Inputs", "uhat"], NeuralNetworks`NetPath["Nodes", "v", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "s", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath["Nodes", "v", "Outputs", "Output"]}], "dots" -> Association[ "Type" -> "Graph", "Inputs" -> Association["v" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT], "uhat" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Nodes" -> Association["1" -> Association[ "Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[1152], "Level" -> 1], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{ 1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[3]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "v"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "uhat"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"]}], "dots_flatten" -> Association["Type" -> "Flatten", "Arrays" -> Association[], "Parameters" -> Association["Level" -> DirectedInfinity[1]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]]], "new_b" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Plus]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "capsule", "Inputs", "b"] -> NeuralNetworks`NetPath["Inputs", "State"], NeuralNetworks`NetPath["Nodes", "new_b", "Inputs", "1"] -> NeuralNetworks`NetPath["Inputs", "State"], NeuralNetworks`NetPath[ "Nodes", "capsule", "Inputs", "uhat"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "dots", "Inputs", "uhat"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "dots", "Inputs", "v"] -> NeuralNetworks`NetPath[ "Nodes", "capsule", "Outputs", "Output"], NeuralNetworks`NetPath[ "Nodes", "dots_flatten", "Inputs", "Input"] -> NeuralNetworks`NetPath[ "Nodes", "dots", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "new_b", "Inputs", "2"] -> NeuralNetworks`NetPath[ "Nodes", "dots_flatten", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "new_b", "Outputs", "Output"]}], "$SequenceLength" -> 2, "$InputShape" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT], "$OutputShape" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{2, 1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{2, 11520}, NeuralNetworks`RealT]], "States" -> Association[ "State" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "SequenceLast", "Arrays" -> Association[], "Parameters" -> Association[], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{2, 11520}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "3", "Outputs", "Output"]}, "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "InteriorStates" -> Association[{2, "State"} -> NeuralNetworks`NetPath["Nodes", "2", "States", "State"]]], "DigitCaps" -> Association[ "Type" -> "Graph", "Inputs" -> Association["b" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT], "uhat" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association[ "c" -> Association[ "Type" -> "Chain", "Nodes" -> Association["1" -> Association[ "Type" -> "Reshape", "Arrays" -> Association[], "Parameters" -> Association["Dimensions" -> {1152, 10}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Softmax", "Arrays" -> Association[], "Parameters" -> Association["Level" -> -1], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "2", "Outputs", "Output"]}, "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{11520}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]]], "s" -> Association["Type" -> "Graph", "Inputs" -> Association["c" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT], "uhat" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association[ "1" -> Association[ "Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association[ "Specification" -> NeuralNetworks`ValidatedParameter[ Automatic], "Level" -> 3], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[1]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1152, 10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "c"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "uhat"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "3", "Outputs", "Output"]}], "v" -> Association["Type" -> "Graph", "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Nodes" -> Association["1" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association[ "Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[2], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Power, NeuralNetworks`Private`ScalarSymbol[1], 2.}]]], "$Dimensions" -> {10, 16}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[ Span[2, All]]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Sqrt, NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[3] -> {Plus, 1., NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[4] -> {Divide, NeuralNetworks`Private`ScalarSymbol[2], NeuralNetworks`Private`ScalarSymbol[3]}]]], "$Dimensions" -> {10}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "4" -> Association["Type" -> "Replicate", "Arrays" -> Association[], "Parameters" -> Association["Specification" -> NeuralNetworks`ValidatedParameter[Automatic], "Level" -> 2], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]], "5" -> Association["Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Times]], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "1"] -> NeuralNetworks`NetPath["Nodes", "4", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "5", "Outputs", "Output"]}]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "c", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "b"], NeuralNetworks`NetPath["Nodes", "s", "Inputs", "c"] -> NeuralNetworks`NetPath["Nodes", "c", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "s", "Inputs", "uhat"] -> NeuralNetworks`NetPath["Inputs", "uhat"], NeuralNetworks`NetPath["Nodes", "v", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "s", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "v", "Outputs", "Output"]}], "Norm" -> Association[ "Type" -> "Chain", "Nodes" -> Association["1" -> Association["Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[2], Association[ NeuralNetworks`Private`ScalarSymbol[2] -> {Power, NeuralNetworks`Private`ScalarSymbol[1], 2.}]]], "$Dimensions" -> {10, 16}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]]], "2" -> Association["Type" -> "Aggregation", "Arrays" -> Association[], "Parameters" -> Association["Function" -> Total, "Levels" -> NeuralNetworks`ValidatedParameter[ Span[2, All]]], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "3" -> Association["Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Sqrt], "$Dimensions" -> {10}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]]], "Edges" -> {NeuralNetworks`NetPath[ "Nodes", "1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Output"] -> NeuralNetworks`NetPath[ "Nodes", "3", "Outputs", "Output"]}, "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]]], "Edges" -> { NeuralNetworks`NetPath[ "Nodes", "ReLUConv1", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Input"], NeuralNetworks`NetPath[ "Nodes", "PrimaryCaps", "Inputs", "Input"] -> NeuralNetworks`NetPath[ "Nodes", "ReLUConv1", "Outputs", "Output"], NeuralNetworks`NetPath[ "Nodes", "PrimaryPredVects", "Inputs", "Input"] -> NeuralNetworks`NetPath[ "Nodes", "PrimaryCaps", "Outputs", "Output"], NeuralNetworks`NetPath[ "Nodes", "DigitCaps", "Inputs", "uhat"] -> NeuralNetworks`NetPath[ "Nodes", "PrimaryPredVects", "Outputs", "Output"], NeuralNetworks`NetPath[ "Nodes", "DynamicRouting", "Inputs", "Input"] -> NeuralNetworks`NetPath[ "Nodes", "PrimaryPredVects", "Outputs", "Output"], NeuralNetworks`NetPath[ "Nodes", "DigitCaps", "Inputs", "b"] -> NeuralNetworks`NetPath[ "Nodes", "DynamicRouting", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Vectors"] -> NeuralNetworks`NetPath[ "Nodes", "DigitCaps", "Outputs", "Output"], NeuralNetworks`NetPath[ "Nodes", "Norm", "Inputs", "Input"] -> NeuralNetworks`NetPath[ "Nodes", "DigitCaps", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Classification"] -> NeuralNetworks`NetPath[ "Nodes", "Norm", "Outputs", "Output"]}, "InteriorStates" -> Association[{"DynamicRouting", 2, "State"} -> NeuralNetworks`NetPath[ "Nodes", "DynamicRouting", "Nodes", "2", "States", "State"]]], "Classify" -> Association[ "Type" -> "Threading", "Arrays" -> Association[], "Parameters" -> Association[ "Function" -> NeuralNetworks`ValidatedParameter[ NeuralNetworks`Private`ScalarFunctionObject[{ NeuralNetworks`Private`ScalarSymbol[1], NeuralNetworks`Private`ScalarSymbol[2]}, NeuralNetworks`Private`ScalarSymbol[13], Association[ NeuralNetworks`Private`ScalarSymbol[3] -> { Subtract, 0.9, NeuralNetworks`Private`ScalarSymbol[2]}, NeuralNetworks`Private`ScalarSymbol[4] -> {Max, 0., NeuralNetworks`Private`ScalarSymbol[3]}, NeuralNetworks`Private`ScalarSymbol[5] -> {Power, NeuralNetworks`Private`ScalarSymbol[4], 2.}, NeuralNetworks`Private`ScalarSymbol[6] -> {Times, NeuralNetworks`Private`ScalarSymbol[1], NeuralNetworks`Private`ScalarSymbol[5]}, NeuralNetworks`Private`ScalarSymbol[7] -> {Subtract, 1., NeuralNetworks`Private`ScalarSymbol[1]}, NeuralNetworks`Private`ScalarSymbol[8] -> {Plus, -0.1, NeuralNetworks`Private`ScalarSymbol[2]}, NeuralNetworks`Private`ScalarSymbol[9] -> {Max, 0., NeuralNetworks`Private`ScalarSymbol[8]}, NeuralNetworks`Private`ScalarSymbol[10] -> {Power, NeuralNetworks`Private`ScalarSymbol[9], 2.}, NeuralNetworks`Private`ScalarSymbol[11] -> {Times, NeuralNetworks`Private`ScalarSymbol[7], NeuralNetworks`Private`ScalarSymbol[10]}, NeuralNetworks`Private`ScalarSymbol[12] -> {Times, 0.5, NeuralNetworks`Private`ScalarSymbol[11]}, NeuralNetworks`Private`ScalarSymbol[13] -> {Plus, NeuralNetworks`Private`ScalarSymbol[6], NeuralNetworks`Private`ScalarSymbol[12]}]]]], "Inputs" -> Association[ "1" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]]], "Total" -> Association[ "Type" -> "Summation", "Arrays" -> Association[], "Parameters" -> Association[], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{}, NeuralNetworks`RealT]]], "Reconstruct" -> Association[ "Type" -> "Graph", "Inputs" -> Association[ "Image" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT], "Mask" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT], "Vectors" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Loss" -> NeuralNetworks`TensorT[{}, NeuralNetworks`RealT]], "Nodes" -> Association[ "1" -> Association[ "Type" -> "Dot", "Arrays" -> Association[], "Parameters" -> Association[], "Inputs" -> Association["1" -> NeuralNetworks`TensorT[{10}, NeuralNetworks`RealT], "2" -> NeuralNetworks`TensorT[{10, 16}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{16}, NeuralNetworks`RealT]]], "2" -> Association[ "Type" -> "Linear", "Arrays" -> Association["Weights" -> NeuralNetworks`Private`DummyRawArray[{512, 16}], "Biases" -> NeuralNetworks`Private`DummyRawArray[{512}]], "Parameters" -> Association["OutputDimensions" -> {512}, "$OutputSize" -> 512, "$InputSize" -> 16, "$InputDimensions" -> {16}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{16}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{512}, NeuralNetworks`RealT]]], "3" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Ramp], "$Dimensions" -> {512}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{512}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{512}, NeuralNetworks`RealT]]], "4" -> Association[ "Type" -> "Linear", "Arrays" -> Association["Weights" -> NeuralNetworks`Private`DummyRawArray[{1024, 512}], "Biases" -> NeuralNetworks`Private`DummyRawArray[{1024}]], "Parameters" -> Association["OutputDimensions" -> {1024}, "$OutputSize" -> 1024, "$InputSize" -> 512, "$InputDimensions" -> {512}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{512}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1024}, NeuralNetworks`RealT]]], "5" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[Ramp], "$Dimensions" -> {1024}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{1024}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{1024}, NeuralNetworks`RealT]]], "6" -> Association[ "Type" -> "Linear", "Arrays" -> Association["Weights" -> NeuralNetworks`Private`DummyRawArray[{784, 1024}], "Biases" -> NeuralNetworks`Private`DummyRawArray[{784}]], "Parameters" -> Association["OutputDimensions" -> {784}, "$OutputSize" -> 784, "$InputSize" -> 1024, "$InputDimensions" -> {1024}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1024}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{784}, NeuralNetworks`RealT]]], "7" -> Association[ "Type" -> "Elementwise", "Arrays" -> Association[], "Parameters" -> Association["Function" -> NeuralNetworks`ValidatedParameter[LogisticSigmoid], "$Dimensions" -> {784}], "Inputs" -> Association["Input" -> NeuralNetworks`TensorT[{784}, NeuralNetworks`RealT]], "Outputs" -> Association[ "Output" -> NeuralNetworks`TensorT[{784}, NeuralNetworks`RealT]]], "8" -> Association[ "Type" -> "Reshape", "Arrays" -> Association[], "Parameters" -> Association["Dimensions" -> {1, 28, 28}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{784}, NeuralNetworks`RealT]], "Outputs" -> Association["Output" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]]], "9" -> Association[ "Type" -> "MeanSquaredLoss", "Arrays" -> Association[], "Parameters" -> Association["$Dimensions" -> {1, 28, 28}], "Inputs" -> Association[ "Input" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT], "Target" -> NeuralNetworks`TensorT[{1, 28, 28}, NeuralNetworks`RealT]], "Outputs" -> Association["Loss" -> NeuralNetworks`TensorT[{}, NeuralNetworks`RealT]]]], "Edges" -> { NeuralNetworks`NetPath["Nodes", "9", "Inputs", "Input"] -> NeuralNetworks`NetPath["Inputs", "Image"], NeuralNetworks`NetPath["Nodes", "1", "Inputs", "1"] -> NeuralNetworks`NetPath["Inputs", "Mask"], NeuralNetworks`NetPath["Nodes", "1", "Inputs", "2"] -> NeuralNetworks`NetPath["Inputs", "Vectors"], NeuralNetworks`NetPath["Nodes", "2", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "1", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "3", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "2", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "4", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "3", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "5", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "4", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "6", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "5", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "7", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "6", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "8", "Inputs", "Input"] -> NeuralNetworks`NetPath["Nodes", "7", "Outputs", "Output"], NeuralNetworks`NetPath["Nodes", "9", "Inputs", "Target"] -> NeuralNetworks`NetPath["Nodes", "8", "Outputs", "Output"], NeuralNetworks`NetPath["Outputs", "Loss"] -> NeuralNetworks`NetPath[ "Nodes", "9", "Outputs", "Loss"]}]]], GridBox[{{ ItemBox[ StyleBox["Inputs", Bold], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]], ItemBox[ StyleBox[ GraphicsBox[{}, ImageSize -> {1, 11}, BaselinePosition -> (Scaled[0.] -> Baseline)], "CacheGraphics" -> False], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]], ItemBox["", Frame -> {{False, False}, {False, GrayLevel[0.85]}}], ItemBox["", Frame -> {{False, False}, {False, GrayLevel[0.85]}}], ItemBox[ StyleBox["Outputs", Bold], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]], ItemBox[ StyleBox[ GraphicsBox[{}, ImageSize -> {1, 11}, BaselinePosition -> (Scaled[0.] -> Baseline)], "CacheGraphics" -> False], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]]}, { StyleBox[ TemplateBox[{"\"Input\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["\"image\"", "SummaryItem"], "", "", StyleBox[ TemplateBox[{"\"RecoLoss\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["\"real\"", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Label\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["\"class\"", "SummaryItem"], "", "", StyleBox[ TemplateBox[{"\"ClassLoss\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["\"real\"", "SummaryItem"]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}]], TrackedSymbols :> { NeuralNetworks`Private`NetGraph`selection}]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}], Initialization :> {NetGraph}]}}, BaselinePosition -> Automatic, GridBoxAlignment -> { "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> { "Columns" -> {{2}}, "Rows" -> {{Automatic}}}]}}, GridBoxAlignment -> {"Rows" -> {{Top}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridFrameMargins -> {{0, 0}, {0, 0}}, BaselinePosition -> {1, 1}]}, Dynamic[Typeset`open], ImageSize -> Automatic], BaselinePosition -> Baseline, BaseStyle -> { ShowStringCharacters -> False, NumberMarks -> False, PrintPrecision -> 3, ShowSyntaxStyles -> False}]], StyleBox["]", "NonInterpretableSummary"]}]}, "CopyTag", DisplayFunction->(#& ), InterpretationFunction->("NetGraph[<>]"& )], False, Editable->False, SelectWithContents->True, Selectable->False]], "Output", CellChangeTimes->{{3.72943325207898*^9, 3.729433277112114*^9}, 3.729497375800314*^9, 3.73039795677304*^9, 3.730397992887938*^9}, CellLabel->"Out[57]=",ExpressionUUID->"3467b946-576e-4889-9f82-cf7096fe440f"] }, Open ]] }, Open ]] }, Open ]] }, Open ]] }, WindowSize->{1855, 1056}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, FrontEndVersion->"11.3 for Linux x86 (64-bit) (March 7, 2018)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 464, 10, 134, "Title",ExpressionUUID->"cf0af03b-7c0d-44fe-a36a-801fb2cc9d1e"], Cell[CellGroupData[{ Cell[1069, 36, 163, 3, 55, "Subsection",ExpressionUUID->"20a938bc-d1c4-4bd6-a5fd-63b43d74e3fb"], Cell[CellGroupData[{ Cell[1257, 43, 166, 3, 45, "Subsubsection",ExpressionUUID->"aece8991-ede8-4c4f-b8b7-d3deda75843b"], Cell[1426, 48, 555, 11, 31, "Input",ExpressionUUID->"f9e334a7-6b84-4b97-a015-364f975bd6c8"] }, Open ]], Cell[CellGroupData[{ Cell[2018, 64, 214, 4, 45, "Subsubsection",ExpressionUUID->"278efdc3-d956-4587-8723-2a3485f9bac0"], Cell[2235, 70, 625, 12, 31, "Input",ExpressionUUID->"4997fe3c-81ac-42f4-9497-390d3d9b0fce"] }, Open ]], Cell[CellGroupData[{ Cell[2897, 87, 166, 3, 45, "Subsubsection",ExpressionUUID->"71c6cef7-94d1-4660-857a-d6696698fd69"], Cell[3066, 92, 441, 8, 31, "Input",ExpressionUUID->"908d5d25-3cee-40c2-a5c9-2b89750c8f92"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[3556, 106, 137, 3, 68, "Section",ExpressionUUID->"e6f0ec16-daa9-4151-8b11-649c83fbd9a1"], Cell[CellGroupData[{ Cell[3718, 113, 174, 3, 55, "Subsection",ExpressionUUID->"075f3fef-d0b5-4896-9f18-27f1ae7779eb"], Cell[3895, 118, 328, 7, 35, "Text",ExpressionUUID->"8fd8eddc-ad94-4e6e-a2cd-646a03eb7705"], Cell[4226, 127, 1459, 36, 216, "Input",ExpressionUUID->"cbac4d5d-63a0-4539-9313-7250a189ce3b"], Cell[5688, 165, 666, 18, 39, "Text",ExpressionUUID->"e3c127e8-82c8-4941-b7c7-53cc0c5b62e8"], Cell[6357, 185, 2317, 56, 262, "Input",ExpressionUUID->"a3201696-1c29-48c9-ae1d-93b8d41966fa"], Cell[8677, 243, 642, 17, 39, "Text",ExpressionUUID->"f36fef8c-50ea-403f-8280-3103a072a08e"], Cell[9322, 262, 1333, 32, 216, "Input",ExpressionUUID->"1a37a15b-26cc-4e99-9406-ee225c38c95b"], Cell[10658, 296, 1093, 29, 62, "Text",ExpressionUUID->"beeb2da4-fef6-4911-929b-01e509928fd3"], Cell[11754, 327, 2981, 68, 400, "Input",ExpressionUUID->"8a82d98d-c89f-4d02-bf22-bd403691fcfc"], Cell[14738, 397, 1067, 25, 62, "Text",ExpressionUUID->"de1d5806-8610-4588-8619-29252b8a5c74"], Cell[15808, 424, 852, 19, 124, "Input",ExpressionUUID->"c5fef86a-d329-4f01-8730-f269477e743b"], Cell[16663, 445, 440, 9, 35, "Text",ExpressionUUID->"1d97e187-072b-4ad6-b198-2d5ea1ab6924"], Cell[CellGroupData[{ Cell[17128, 458, 2380, 55, 285, "Input",ExpressionUUID->"12059e77-936f-407d-adf5-195c2abe4266"], Cell[19511, 515, 50849, 1021, 223, "Output",ExpressionUUID->"73ec9834-9900-48e8-a5f7-a628b8b0f5f5"] }, Open ]], Cell[70375, 1539, 359, 7, 35, "Text",ExpressionUUID->"8a5e4e5d-d369-44cd-88c8-a39de849d06c"], Cell[70737, 1548, 972, 21, 216, "Input",ExpressionUUID->"6f48898a-83c0-48ce-bedd-740e196fcd09"] }, Open ]], Cell[CellGroupData[{ Cell[71746, 1574, 217, 4, 55, "Subsection",ExpressionUUID->"b2a30602-d81a-4151-bf0b-89c8180222fe"], Cell[71966, 1580, 554, 16, 78, "Input",ExpressionUUID->"03271dbd-100c-4095-b1e3-93da02134fc1"] }, Open ]], Cell[CellGroupData[{ Cell[72557, 1601, 234, 4, 55, "Subsection",ExpressionUUID->"791564d7-bbb0-42be-870f-225e70c83a2d"], Cell[CellGroupData[{ Cell[72816, 1609, 4481, 101, 446, "Input",ExpressionUUID->"b18d2a82-5625-4591-8934-425aa7e19f32"], Cell[77300, 1712, 141402, 2690, 247, "Output",ExpressionUUID->"b9815de5-1af0-4a19-8980-ee939dc11057"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[218763, 4409, 152, 3, 68, "Section",ExpressionUUID->"5bc6142b-c2c8-49ee-aaf4-033c6d7612ae"], Cell[CellGroupData[{ Cell[218940, 4416, 161, 3, 55, "Subsection",ExpressionUUID->"dad3883c-dda6-4355-9ff7-8be3d0617691"], Cell[219104, 4421, 713, 19, 35, "Text",ExpressionUUID->"f046add2-5ba3-4901-a4be-677c43a9545a"], Cell[219820, 4442, 748, 21, 31, "Input",ExpressionUUID->"2b4b46e1-8d31-4324-9e5f-21ff301b0185"], Cell[220571, 4465, 729, 12, 58, "Text",ExpressionUUID->"ee031d5d-7a31-4f78-b10c-e0cb09310520"], Cell[221303, 4479, 1712, 42, 262, "Input",ExpressionUUID->"a7c684bd-a314-4054-b456-630fec28bc8b"] }, Open ]], Cell[CellGroupData[{ Cell[223052, 4526, 168, 3, 55, "Subsection",ExpressionUUID->"cca0cf7a-a7f6-4d35-bb04-4da1337264f5"], Cell[CellGroupData[{ Cell[223245, 4533, 4374, 95, 423, "Input",ExpressionUUID->"39e7263e-90a3-4828-88dd-203bcb157fc5"], Cell[227622, 4630, 119785, 2180, 245, "Output",ExpressionUUID->"03d94e8a-810b-45a8-8909-201730f20da9"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[347456, 6816, 156, 3, 55, "Subsection",ExpressionUUID->"bfb71cd5-8bf4-45ce-b8ef-70242f431699"], Cell[347615, 6821, 111, 0, 35, "Text",ExpressionUUID->"7bd40206-d6db-414b-b064-cda396f97de7"], Cell[CellGroupData[{ Cell[347751, 6825, 198, 3, 31, "Input",ExpressionUUID->"11033027-b784-4d86-92e6-ebd45acc256a"], Cell[347952, 6830, 19132, 382, 79, "Output",ExpressionUUID->"157a98f8-ab94-4ae1-9a58-1ccbfc750969"] }, Open ]], Cell[367099, 7215, 415, 10, 55, "Input",ExpressionUUID->"e56feb2e-624b-44ec-8e44-db886fb1f8db"], Cell[CellGroupData[{ Cell[367539, 7229, 178, 3, 31, "Input",ExpressionUUID->"5b561034-5812-4b76-9921-c48fcaf81271"], Cell[367720, 7234, 3782, 91, 47, "Output",ExpressionUUID->"dbf0c7e0-b62f-475f-9391-187d311d4eca"] }, Open ]], Cell[371517, 7328, 424, 11, 35, "Text",ExpressionUUID->"54126f11-2159-4c19-8f44-d8fa1606873f"], Cell[CellGroupData[{ Cell[371966, 7343, 1971, 44, 239, "Input",ExpressionUUID->"1fe2616f-0942-48bc-a0f2-7ad8c798680d"], Cell[373940, 7389, 119170, 2164, 77, "Output",ExpressionUUID->"3467b946-576e-4889-9f82-cf7096fe440f"] }, Open ]] }, Open ]] }, Open ]] }, Open ]] } ] *)