(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 11.3' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 139867, 3515] NotebookOptionsPosition[ 131816, 3365] NotebookOutlinePosition[ 132172, 3382] CellTagsIndexPosition[ 132129, 3379] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["GloVe 200-Dimensional Word Vectors Trained on Tweets", \ "ResourceExampleTitle", ShowCellBracket->False, CellMargins->{{27, Inherited}, {10, 30}}, CellGroupingRules->{"TitleGrouping", 0}, PageBreakBelow->False, ShowAutoSpellCheck->False, LineSpacing->{1, 4}, MenuSortingValue->1100, MenuCommandKey->"1", FontFamily->"Source Sans Pro SemiBold", FontSize->32, FontTracking->-0.5, FontColor->RGBColor[{ Rational[31, 85], Rational[146, 255], Rational[11, 85]}]], Cell["Represent words as vectors", "ResourceExampleSubtitle", ShowCellBracket->False, CellMargins->{{27, Inherited}, {0, 0}}, CellGroupingRules->{"TitleGrouping", 10}, PageBreakBelow->False, ShowAutoSpellCheck->False, CounterIncrements->"Subtitle", MenuSortingValue->1550, FontFamily->"Source Sans Pro Light", FontSize->26, FontSlant->Italic, FontColor->RGBColor[{ Rational[1, 3], Rational[1, 3], Rational[1, 3]}]], Cell[CellGroupData[{ Cell["Resource retrieval", "Subsection"], Cell["Get the pre-trained net:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"NetModel", "[", "\"\\"", "]"}]], "Input", CellChangeTimes->{3.713712265065423*^9, 3.713712438999467*^9, 3.713712513945034*^9}, CellLabel->"In[112]:="], Cell[BoxData[ TagBox[ TemplateBox[{RowBox[{ StyleBox[ TagBox["EmbeddingLayer", "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}], GraphicsBox[ GraphicsComplexBox[{{0, 0}, {-0.5, 1}, {0.5, 1}, {1.5, 1}, {1, 0}}, {{ Opacity[0.3], LineBox[{{1, 2}, {1, 3}, {1, 4}, {5, 2}, {5, 3}, {5, 4}}]}, { RGBColor[0.33, 0.33, 0.33], AbsolutePointSize[5], PointBox[{1, 5, 2, 3, 4}]}}], ImageSize -> 37], GridBox[{{ StyleBox[ TemplateBox[{"\"Output dimension\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["200", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Class count\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["1193515", "SummaryItem"]}}, BaselinePosition -> Automatic, 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.]}, "Rows" -> { Offset[0.], { Offset[0.4]}, Offset[0.]}}], 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}], GraphicsBox[ GraphicsComplexBox[{{0, 0}, {-0.5, 1}, {0.5, 1}, {1.5, 1}, {1, 0}}, {{ Opacity[0.3], LineBox[{{1, 2}, {1, 3}, {1, 4}, {5, 2}, {5, 3}, {5, 4}}]}, { RGBColor[0.33, 0.33, 0.33], AbsolutePointSize[5], PointBox[{1, 5, 2, 3, 4}]}}], ImageSize -> 37], GridBox[{{ ItemBox[ StyleBox["Parameters", FontWeight -> Bold]], ItemBox[""]}, { StyleBox[ TemplateBox[{"\"Output dimension\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["200", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Class count\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["1193515", "SummaryItem"]}, { ItemBox[ StyleBox["Arrays", FontWeight -> Bold], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]], ItemBox[ StyleBox[ GraphicsBox[{}, BaselinePosition -> (Scaled[0.] -> Baseline), ImageSize -> {1, 11}], CacheGraphics -> False], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]]}, { StyleBox[ TemplateBox[{"\"Weights\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox[ TemplateBox[{"\"matrix\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{ "\[Times]", "\"\[Times]\"", "\"1193515\"", "\"200\""}, "RowWithSeparators"], "\"\[VeryThinSpace]\"", "\")\""}, "RowDefault"], GrayLevel[0.5], StripOnInput -> False]}, "RowDefault"], "SummaryItem"]}, { ItemBox[ StyleBox["Ports", FontWeight -> Bold], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]], ItemBox[ StyleBox[ GraphicsBox[{}, BaselinePosition -> (Scaled[0.] -> Baseline), ImageSize -> {1, 11}], CacheGraphics -> False], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]]}, { StyleBox[ TemplateBox[{"\"Input\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["\"string\"", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Output\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox[ TemplateBox[{"\"matrix\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{"\[Times]", "\"\[Times]\"", StyleBox["\"n\"", Italic, StripOnInput -> False], "\"200\""}, "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}}}]}}, BaselinePosition -> {1, 3}, GridBoxAlignment -> {"Rows" -> {{Top}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> {"Columns" -> { Offset[0.], { Offset[0.5599999999999999]}, Offset[0.]}, "Rows" -> { Offset[0.], { Offset[0.4]}, Offset[0.]}}]}, Dynamic[Typeset`open], ImageSize -> Automatic], BaseStyle -> { ShowStringCharacters -> False, NumberMarks -> False, PrintPrecision -> 3, ShowSyntaxStyles -> False}, BaselinePosition -> Baseline]], StyleBox["]", "NonInterpretableSummary"]}]}, "CopyTag", DisplayFunction->(#& ), InterpretationFunction->("EmbeddingLayer[<>]"& )], False, Editable->False, SelectWithContents->True, Selectable->False]], "Output", CellChangeTimes->{{3.713707064306293*^9, 3.713707069030796*^9}, { 3.713712267745913*^9, 3.713712273389896*^9}, 3.7143234671021442`*^9, 3.715340688500143*^9, 3.7290198475097933`*^9, 3.735059423426785*^9, 3.7513807132361307`*^9, 3.753639628413926*^9, 3.761566380846403*^9}, CellLabel->"Out[112]="] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Basic usage", "Subsection", CellChangeTimes->{{3.724505518596184*^9, 3.724505518738172*^9}}], Cell["Use the net to obtain a list of word vectors:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"vectors", "=", RowBox[{ RowBox[{ "NetModel", "[", "\"\\"", "]"}], "[", "\"\\"", "]"}]}]], "Input", CellChangeTimes->{3.7137122784550734`*^9, 3.713712439005827*^9, 3.713712513949595*^9}, CellLabel->"In[113]:=", CellID->547578203], Cell[BoxData[ InterpretationBox[ TagBox[ FrameBox[GridBox[{ { ItemBox[ TagBox[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.34683001041412354`", ",", RowBox[{"-", "0.1961199939250946`"}], ",", RowBox[{"-", "0.34922999143600464`"}], ",", RowBox[{"-", "0.28158000111579895`"}], ",", RowBox[{"-", "0.7562699913978577`"}], ",", RowBox[{"-", "0.04003499820828438`"}], ",", "0.5342199802398682`", ",", "0.0015327000292018056`", ",", RowBox[{"-", "0.21963000297546387`"}], ",", RowBox[{"-", "0.567080020904541`"}], ",", RowBox[{"-", "0.0751120001077652`"}], ",", "0.3907400071620941`", ",", "0.19201000034809113`", ",", "0.04804600030183792`", ",", TemplateBox[{"172"}, "OutputSizeLimit`Skeleton"], ",", RowBox[{"-", "0.7038999795913696`"}], ",", "0.019613999873399734`", ",", "0.008275800384581089`", ",", "0.32030001282691956`", ",", "0.003505100030452013`", ",", "0.3312999904155731`", ",", "0.1532599925994873`", ",", RowBox[{"-", "0.2200700044631958`"}], ",", RowBox[{"-", "0.4570100009441376`"}], ",", RowBox[{"-", "0.017719000577926636`"}], ",", RowBox[{"-", "0.6199700236320496`"}], ",", RowBox[{"-", "0.5207300186157227`"}], ",", "0.08229400217533112`", ",", RowBox[{"-", "0.5447800159454346`"}]}], "}"}], ",", RowBox[{"{", TemplateBox[{"1"}, "OutputSizeLimit`Skeleton"], "}"}]}], "}"}], Short[#, 10]& ], BaseStyle->{Deployed -> False}, StripOnInput->False]}, {GridBox[{ { PaneBox[ TagBox[ TooltipBox[ StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource[ "FEStrings", "sizeBriefExplanation"], StandardForm], ImageSizeCache->{59., {2., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLText", StripOnInput->False], StyleBox[ DynamicBox[ ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeExplanation"], StandardForm]], DynamicUpdating -> True, LineIndent -> 0, LinebreakAdjustments -> {1., 100, 0, 0, 0}, LineSpacing -> {1, 2}, StripOnInput -> False]], Annotation[#, Style[ Dynamic[ FEPrivate`FrontEndResource["FEStrings", "sizeExplanation"]], DynamicUpdating -> True, LineIndent -> 0, LinebreakAdjustments -> {1., 100, 0, 0, 0}, LineSpacing -> {1, 2}], "Tooltip"]& ], Alignment->Center, BaselinePosition->Baseline, ImageSize->{Automatic, {25, Full}}], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowLess"], StandardForm], ImageSizeCache->{54., {0., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControl", StripOnInput->False], True-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowLess"], StandardForm]], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControlActive", StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], Alignment->Center, FrameMargins->0, ImageSize->{Automatic, {25, Full}}], Appearance->None, BaselinePosition->Baseline, ButtonFunction:>OutputSizeLimit`ButtonFunction[ OutputSizeLimit`Defer, 113, 31494039627119166959, 10/2], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], StandardForm], ImageSizeCache->{62., {0., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControl", StripOnInput->False], True-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], StandardForm]], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControlActive", StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], Alignment->Center, FrameMargins->0, ImageSize->{Automatic, {25, Full}}], Appearance->None, BaselinePosition->Baseline, ButtonFunction:>OutputSizeLimit`ButtonFunction[ OutputSizeLimit`Defer, 113, 31494039627119166959, 10 2], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowAll"], StandardForm], ImageSizeCache->{45., {0., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControl", StripOnInput->False], True-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowAll"], StandardForm]], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControlActive", StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], Alignment->Center, FrameMargins->0, ImageSize->{Automatic, {25, Full}}], Appearance->None, BaselinePosition->Baseline, ButtonFunction:>OutputSizeLimit`ButtonFunction[ OutputSizeLimit`Defer, 113, 31494039627119166959, Infinity], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], StandardForm], ImageSizeCache->{82., {0., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControl", StripOnInput->False], True-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], StandardForm]], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControlActive", StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], Alignment->Center, FrameMargins->0, ImageSize->{Automatic, {25, Full}}], Appearance->None, BaselinePosition->Baseline, ButtonFunction:>FrontEndExecute[{ FrontEnd`SetOptions[ FrontEnd`$FrontEnd, FrontEnd`PreferencesSettings -> {"Page" -> "Advanced"}], FrontEnd`FrontEndToken["PreferencesDialog"]}], Evaluator->None, Method->"Preemptive"]} }, AutoDelete->False, FrameStyle->GrayLevel[0.85], GridBoxDividers->{"Columns" -> {False, {True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{2}}}]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{False}}, "Rows" -> {{False}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{1.}}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "Rows" -> { Offset[0.2], Offset[1.2], { Offset[0.4]}, Offset[0.2]}}], BaseStyle->"OutputSizeLimit", FrameMargins->{{12, 12}, {0, 15}}, FrameStyle->GrayLevel[0.85], RoundingRadius->5, StripOnInput->False], Deploy, DefaultBaseStyle->"Deploy"], If[31494039627119166959 === $SessionID, Out[113], Message[ MessageName[Syntax, "noinfoker"]]; Missing["NotAvailable"]; Null]]], "Output", CellChangeTimes->{3.7137070715637283`*^9, 3.714323511696659*^9, 3.7153406928022337`*^9, 3.729019854047447*^9, 3.751380745955681*^9, 3.753639658342537*^9, 3.761496527433482*^9, 3.761566410542365*^9}, CellLabel->"Out[113]="] }, Open ]], Cell["Obtain the dimensions of the vectors:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Dimensions", "[", "vectors", "]"}]], "Input", CellLabel->"In[114]:="], Cell[BoxData[ RowBox[{"{", RowBox[{"2", ",", "200"}], "}"}]], "Output", CellChangeTimes->{3.7137070716262693`*^9, 3.714323514744547*^9, 3.715340692881034*^9, 3.729019854156458*^9, 3.751380746012342*^9, 3.753639658386244*^9, 3.761566410599701*^9}, CellLabel->"Out[114]="] }, Open ]], Cell[TextData[{ "Use the embedding layer inside a ", Cell[BoxData[ ButtonBox["NetChain", BaseStyle->"Link", ButtonData->"ref/NetChain"]], "InlineFormula"], ":" }], "Text", CellChangeTimes->{{3.724175556813367*^9, 3.724175587082573*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"chain", "=", RowBox[{"NetChain", "[", RowBox[{"{", RowBox[{ RowBox[{ "NetModel", "[", "\"\\"", "]"}], ",", RowBox[{"LongShortTermMemoryLayer", "[", "10", "]"}]}], "}"}], "]"}]}]], "Input", CellChangeTimes->{3.71371228345632*^9, 3.71371243900952*^9, 3.713712513956407*^9}, CellLabel->"In[115]:=", CellID->429988564], Cell[BoxData[ TagBox[ TemplateBox[{RowBox[{ StyleBox[ TagBox["NetChain", "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}], OverlayBox[{ GraphicsBox[{ Thickness[0.014925373134328358`], { GrayLevel[0.6], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{23., 91.5}, {30., 91.5}}}, CurveClosed -> {0}]}, { GrayLevel[0.6], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{37., 91.5}, {44., 91.5}}}, CurveClosed -> {0}]}, { FaceForm[{ GrayLevel[0.9], 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.6], 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.9], 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.6], 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.9], 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.6], 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.}}}]}, { FaceForm[{ GrayLevel[0.6], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}}}, {{{28., 91.5}, { 25., 95.}, {25., 88.}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}}}, {{{42., 91.5}, { 39., 95.}, {39., 88.}}}]}}, ImageMargins -> 0, ImageSize -> {36, Automatic}, PlotRangePadding -> 0, BaseStyle -> GrayLevel[0.6]], StyleBox["uninitialized", RGBColor[0.66, 0, 0], FontSize -> 8, FontFamily -> "Roboto", 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["\"string\"", "SummaryItem"]}, { StyleBox[ TemplateBox[{ TemplateBox[{ StyleBox["\"Output\"", GrayLevel[0], StripOnInput -> False], "\" \"", "\"port\""}, "RowDefault"], "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox[ TemplateBox[{"\"matrix\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{"\[Times]", "\"\[Times]\"", StyleBox["\"n\"", Italic, StripOnInput -> False], "\"10\""}, "RowWithSeparators"], "\"\[VeryThinSpace]\"", "\")\""}, "RowDefault"], GrayLevel[0.5], StripOnInput -> False]}, "RowDefault"], "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Number of layers\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["2", "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}], OverlayBox[{ GraphicsBox[{ Thickness[0.014925373134328358`], { GrayLevel[0.6], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{23., 91.5}, {30., 91.5}}}, CurveClosed -> {0}]}, { GrayLevel[0.6], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{37., 91.5}, {44., 91.5}}}, CurveClosed -> {0}]}, { FaceForm[{ GrayLevel[0.9], 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.6], 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.9], 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.6], 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.9], 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.6], 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.}}}]}, { FaceForm[{ GrayLevel[0.6], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}}}, {{{28., 91.5}, { 25., 95.}, {25., 88.}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}}}, {{{42., 91.5}, { 39., 95.}, {39., 88.}}}]}}, ImageMargins -> 0, ImageSize -> {36, Automatic}, PlotRangePadding -> 0, BaseStyle -> GrayLevel[0.6]], StyleBox["uninitialized", RGBColor[0.66, 0, 0], FontSize -> 8, FontFamily -> "Roboto", Background -> GrayLevel[1, 0.65]]}, Alignment -> {Center, Scaled[0.0001]}], GridBox[{{ TagBox[ GridBox[{{"\"\"", "\"Input\"", TagBox[ GridBox[{{"\"string\""}, { TemplateBox[{"\"vector of \"", StyleBox["\"n\"", Italic, StripOnInput -> False], "\" \"", TemplateBox[{"\"indices\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"range\"", "\":\"", "\" \"", TemplateBox[{"1", "\"..\"", "1193515"}, "RowDefault"], "\"\[VeryThinSpace]\"", "\")\""}, "RowDefault"], GrayLevel[0.5], StripOnInput -> False]}, "RowDefault"]}, "RowDefault"]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, BaselinePosition -> 2, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]}, { StyleBox["\"1\"", GrayLevel[0.5], StripOnInput -> False], StyleBox["EmbeddingLayer", GrayLevel[0], StripOnInput -> False], TemplateBox[{"\"matrix\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{"\[Times]", "\"\[Times]\"", StyleBox["\"n\"", Italic, StripOnInput -> False], "\"200\""}, "RowWithSeparators"], "\"\[VeryThinSpace]\"", "\")\""}, "RowDefault"], GrayLevel[0.5], StripOnInput -> False]}, "RowDefault"]}, { StyleBox["\"2\"", GrayLevel[0.5], StripOnInput -> False], StyleBox["LongShortTermMemoryLayer", RGBColor[0.66, 0, 0], StripOnInput -> False], TemplateBox[{"\"matrix\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{"\[Times]", "\"\[Times]\"", StyleBox["\"n\"", Italic, StripOnInput -> False], "\"10\""}, "RowWithSeparators"], "\"\[VeryThinSpace]\"", "\")\""}, "RowDefault"], GrayLevel[0.5], StripOnInput -> False]}, "RowDefault"]}, { "\"\"", "\"Output\"", TemplateBox[{"\"matrix\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{"\[Times]", "\"\[Times]\"", StyleBox["\"n\"", Italic, StripOnInput -> False], "\"10\""}, "RowWithSeparators"], "\"\[VeryThinSpace]\"", "\")\""}, "RowDefault"], GrayLevel[0.5], StripOnInput -> False]}, "RowDefault"]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> False, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> {"Columns" -> {{1.1}}}], "Grid"]}}, 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->("NetChain[<>]"& )], False, Editable->False, SelectWithContents->True, Selectable->False]], "Output", CellChangeTimes->{3.713707071802706*^9, 3.714323517420988*^9, 3.715340693117001*^9, 3.729019855865629*^9, 3.751380746066992*^9, 3.753639659254118*^9, 3.761566410630046*^9}, CellLabel->"Out[115]="] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Feature visualization", "Subsection", CellChangeTimes->{{3.724505522098176*^9, 3.7245055222749357`*^9}}], Cell["Create two lists of related words:", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"animals", "=", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ";"}]], "Input", CellLabel->"In[116]:="], Cell[BoxData[ RowBox[{ RowBox[{"fruits", "=", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ";"}]], "Input", CellLabel->"In[117]:="], Cell["\<\ Visualize relationships between the words using the net as a feature \ extractor:\ \>", "Text", CellID->2141353759], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"FeatureSpacePlot", "[", RowBox[{ RowBox[{"Join", "[", RowBox[{"animals", ",", "fruits"}], "]"}], ",", RowBox[{"FeatureExtractor", "\[Rule]", RowBox[{ "NetModel", "[", "\"\\"", "]"}]}]}], "]"}]], "Input", CellChangeTimes->{3.713712288233203*^9, 3.713712439018612*^9, 3.713712513963525*^9}, CellLabel->"In[118]:=", CellID->1277887787], Cell[BoxData[ GraphicsBox[{{}, { {Opacity[0], PointBox[CompressedData[" 1:eJwlkksoRGEUxz8zagaJMY1HDX2GMMoKzUpus5BnuAuahbqJBUNDEclj8shC kkiNBVOSDUlI8rrJYzHKgprYuMVYICKPjMeY83frdvp9/3PO9z/n3uRah1iv YoxlBF+Kwce5an3ID0b3mpgoB6NSMX1PLHt9/j06X1k/Ab8GwqCnu56JnS8b b6Sz4yE1nfO2BR0iNzOB9JHNCGKp0OKjPOd8G+qZ9kxDOuv+jYeubdJQdM81 hoKnwrSkC3Yb+kkjfbfw17AeTSyP5T0Rs2wH/PKjyEPqz6vmDNC/z+/34LdM C30/9QP57avQebUInc2n6JEfJb+iXvhNIBZKW94xX+EodKU/B/NJCVf/8xst YGaZjEW/pYpo8svvxlUU3U8lmEPeUkcRy2+tt9Rfme0Px15McT7ss0ATi7qd DtTLuUbUC712BX7aF+Ohbx8GiIWhAbByYr4GV9p0yP/pwnfi3BoDVmd9YT6r 3Yg9K2kq8uOsOfbTvZLn+4Yizzbo4XeiJwA/MyL6s+H3T+z7dBe+hEHzM/6D 004DsZTr8kJvtmI+LtqX0XepLgn9DoouKV+a2I7DvOXeC/j1Zz4iz1T8v2/P WYjwByz2uWM= "]]}, { {Opacity[0]}, {}}, { {Opacity[0]}, {}}}, {{}, {{}, {InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Alligator\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {0.8831422328948975, -7.3307671546936035}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Ant\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {0.8625873923301697, -1.6811139583587646}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Bear\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {0.22429485619068146, -3.249978542327881}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Bee\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {1.0998915433883667, -1.3574090003967285}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Bird\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-2.4403209686279297, -4.413528919219971}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Camel\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {2.020080804824829, -3.4655981063842773}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Cat\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-0.662998378276825, -3.1819562911987305}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Cheetah\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {2.9780426025390625, -6.2485198974609375}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Chicken\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-2.9277503490448, -2.552069902420044}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Chimpanzee\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {3.004681348800659, -4.337323188781738}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Cow\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {0.7030693888664246, -4.177160739898682}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Crocodile\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {0.9762648344039917, -7.358592987060547}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Deer\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-0.16448284685611725, -5.409508228302002}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Dog\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-0.8697494268417358, -3.038064479827881}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Dolphin\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {1.4464741945266724, -5.425251007080078}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Duck\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-0.8538013100624084, -4.784809112548828}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Eagle\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-1.2968900203704834, -6.498291492462158}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Elephant\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {1.402416467666626, -4.887971878051758}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Fish\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-2.4006402492523193, -3.2339351177215576}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Fly\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-2.4019105434417725, -5.644741058349609}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Apple\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {4.078785419464111, 2.3212473392486572}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Apricot\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-2.5370781421661377, 3.8768229484558105}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Avocado\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-0.7014111280441284, 3.313781499862671}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Banana\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {0.659074068069458, 5.507105827331543}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Blackberry\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {4.116932392120361, 2.2637743949890137}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Blueberry\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-0.5131217241287231, 6.168415546417236}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Cherry\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-1.985775113105774, 6.1284379959106445}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Coconut\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-0.5988525748252869, 4.337224006652832}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Cranberry\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-1.6550266742706299, 4.564575672149658}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Grape\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-1.6984894275665283, 7.104743957519531}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Turnip\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-2.26898193359375, 1.673673152923584}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Mango\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {0.6558586955070496, 4.770702838897705}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Melon\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {1.9681583642959595, 6.080683708190918}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Papaya\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {1.6226873397827148, 4.186338901519775}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Peach\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-1.0726358890533447, 5.367979526519775}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Pineapple\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {0.36872610449790955, 3.907435655593872}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Raspberry\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {0.06136566773056984, 7.598317623138428}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Strawberry\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-0.41075244545936584, 5.9341559410095215}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Ribes\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-0.4037665128707886, 0.9427462816238403}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Fig\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-1.2680991888046265, 2.22841477394104}, {0, 0}]}}}}, AspectRatio->1, Axes->{False, False}, AxesLabel->{None, None}, AxesOrigin->{0, 0}, DisplayFunction->Identity, Frame->{{False, False}, {False, False}}, FrameLabel->{{None, None}, {None, None}}, FrameTicks->{{Automatic, Automatic}, {Automatic, Automatic}}, GridLines->{None, None}, GridLinesStyle->Directive[ GrayLevel[0.5, 0.4]], Method->{ "OptimizePlotMarkers" -> True, "CoordinatesToolOptions" -> {"DisplayFunction" -> ({ (Identity[#]& )[ Part[#, 1]], (Identity[#]& )[ Part[#, 2]]}& ), "CopiedValueFunction" -> ({ (Identity[#]& )[ Part[#, 1]], (Identity[#]& )[ Part[#, 2]]}& )}}, PlotRange->All, PlotRangePadding->{{ Scaled[0.05], Scaled[0.05]}, { Scaled[0.05], Scaled[0.05]}}, Ticks->{Automatic, Automatic}]], "Output", CellChangeTimes->{3.713707076414583*^9, 3.714323523729671*^9, 3.715340693636847*^9, 3.729019862937336*^9, 3.7536396597322063`*^9, 3.761566411156096*^9}, CellLabel->"Out[118]="] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Word analogies", "Subsection", CellChangeTimes->{{3.724505525778796*^9, 3.7245055258907423`*^9}}], Cell["Get the pre-trained net:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"net", "=", RowBox[{ "NetModel", "[", "\"\\"", "]"}]}]], "Input", CellChangeTimes->{3.713712292248629*^9, 3.7137124390246687`*^9, 3.7137125139715033`*^9}, CellLabel->"In[119]:=", CellID->1834105916], Cell[BoxData[ TagBox[ TemplateBox[{RowBox[{ StyleBox[ TagBox["EmbeddingLayer", "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[ GraphicsComplexBox[{{0, 0}, {-0.5, 1}, {0.5, 1}, {1.5, 1}, {1, 0}}, {{ Opacity[0.3], LineBox[{{1, 2}, {1, 3}, {1, 4}, {5, 2}, {5, 3}, {5, 4}}]}, { AbsolutePointSize[5], RGBColor[0.33, 0.33, 0.33], PointBox[{1, 5, 2, 3, 4}]}}], ImageSize -> 37], GridBox[{{ StyleBox[ TemplateBox[{"\"Output dimension\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["200", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Class count\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["1193515", "SummaryItem"]}}, 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, 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[ GraphicsComplexBox[{{0, 0}, {-0.5, 1}, {0.5, 1}, {1.5, 1}, {1, 0}}, {{ Opacity[0.3], LineBox[{{1, 2}, {1, 3}, {1, 4}, {5, 2}, {5, 3}, {5, 4}}]}, { AbsolutePointSize[5], RGBColor[0.33, 0.33, 0.33], PointBox[{1, 5, 2, 3, 4}]}}], ImageSize -> 37], GridBox[{{ ItemBox[ StyleBox["Parameters", Bold]], ItemBox[""]}, { StyleBox[ TemplateBox[{"\"Output dimension\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["200", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Class count\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["1193515", "SummaryItem"]}, { ItemBox[ StyleBox["Arrays", 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[{"\"Weights\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox[ TemplateBox[{"\"matrix\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{ "\[Times]", "\"\[Times]\"", "\"1193515\"", "\"200\""}, "RowWithSeparators"], "\"\[VeryThinSpace]\"", "\")\""}, "RowDefault"], GrayLevel[0.5], StripOnInput -> False]}, "RowDefault"], "SummaryItem"]}, { 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[{"\"Input\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["\"string\"", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Output\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox[ TemplateBox[{"\"matrix\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{"\[Times]", "\"\[Times]\"", StyleBox["\"n\"", Italic, StripOnInput -> False], "\"200\""}, "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}]}, Dynamic[Typeset`open], ImageSize -> Automatic], BaselinePosition -> Baseline, BaseStyle -> { ShowStringCharacters -> False, NumberMarks -> False, PrintPrecision -> 3, ShowSyntaxStyles -> False}]], StyleBox["]", "NonInterpretableSummary"]}]}, "CopyTag", DisplayFunction->(#& ), InterpretationFunction->("EmbeddingLayer[<>]"& )], False, Editable->False, SelectWithContents->True, Selectable->False]], "Output", CellChangeTimes->{3.713707086414114*^9, 3.714323533141268*^9, 3.715340693794436*^9, 3.7290198645424967`*^9, 3.7513807461320477`*^9, 3.753639659779921*^9, 3.761566411169709*^9}, CellLabel->"Out[119]="] }, Open ]], Cell["Get a list of words:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"words", "=", RowBox[{ RowBox[{"NetExtract", "[", RowBox[{"net", ",", "\"\\""}], "]"}], "[", RowBox[{"[", "\"\\"", "]"}], "]"}]}]], "Input", CellLabel->"In[120]:="], Cell[BoxData[ InterpretationBox[ TagBox[ FrameBox[GridBox[{ { ItemBox[ TagBox[ RowBox[{"{", RowBox[{"\<\"\"\>", ",", "\<\".\"\>", ",", "\<\":\"\>", ",", "\<\"rt\"\>", ",", "\<\",\"\>", ",", "\<\"\"\>", ",", "\<\"\"\>", ",", "\<\"\"\>", ",", "\<\"\"\>", ",", "\<\"!\"\>", ",", "\<\"i\"\>", ",", "\<\"a\"\>", ",", "\<\"\\\"\"\>", ",", "\<\"the\"\>", ",", "\<\"?\"\>", ",", "\<\"you\"\>", ",", "\<\"to\"\>", ",", "\<\"(\"\>", ",", "\<\"\"\>", ",", "\<\"\"\>", ",", "\<\")\"\>", ",", TemplateBox[{"1193472"}, "OutputSizeLimit`Skeleton"], ",", "\<\"\:fed3\:064e\:fefc\"\>", ",", "\<\"\:fed7\:fef3\:062f\"\>", ",", "\<\"\:fedf\:0647\:0622\"\>", ",", "\<\"\:fedf\:06c1\:0651\"\>", ",", "\<\"\:feeb\:064e\:feac\:fe8d\"\>", ",", "\<\"\:fef7\:fee7\:fef2\"\>", ",", "\<\"\:ff19\:6708\:ff19\:65e5\:306f\:30ab\:30fc\:30cd\:30eb\ \:306e\:8a95\:751f\:65e5\"\>", ",", "\<\"\:ff42\:3075\:3041\:3044\:3068\:3063\"\>", ",", "\<\"\:ff47\:ff41\:ff4d\:ff45\"\>", ",", "\<\"\:ff71\:ff91\:ff88\:ff7c\:ff71\"\>", ",", "\<\"\:ff74\:ff74\"\>", ",", "\<\"\:ff76\:ff9e\:ff98\:ff76\:ff9e\:ff98\"\>", ",", "\<\"\:ff77\:ff72\"\>", ",", "\<\"\:ff79\:ff9e\:ff7c\:ff6f\"\>", ",", "\<\"\:ff83\:ff8d\:ff8d\:ff9f\:ff9b\:ff6f\"\>", ",", "\<\"\:ff83\:ff9e\:ff93\"\>", ",", "\<\"\:ff8a\:ff9e\:ff72\:ff8a\:ff9e\:ff70\:ff72\"\>", ",", "\<\"\:ff8a\:ff9f\:ff9d\:ff81\"\>", ",", "\<\"\:ff94\:ff92\:ff80\:ff8f\:ff74\"\>", ",", "\<\"\:ff96\:ff72\:ff7c\:ff6e\:ff6f\"\>", ",", "\<\"\:ff9f\:ff9f\:ff9f\:ff75\:ff94\:ff7d\:ff90\:ff70\"\>"}], "}"}], Short[#, 5]& ], BaseStyle->{Deployed -> False}, StripOnInput->False]}, {GridBox[{ { PaneBox[ TagBox[ TooltipBox[ StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource[ "FEStrings", "sizeBriefExplanation"], StandardForm], ImageSizeCache->{59., {2., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLText", StripOnInput->False], StyleBox[ DynamicBox[ ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeExplanation"], StandardForm]], DynamicUpdating -> True, LineIndent -> 0, LinebreakAdjustments -> {1., 100, 0, 0, 0}, LineSpacing -> {1, 2}, StripOnInput -> False]], Annotation[#, Style[ Dynamic[ FEPrivate`FrontEndResource["FEStrings", "sizeExplanation"]], DynamicUpdating -> True, LineIndent -> 0, LinebreakAdjustments -> {1., 100, 0, 0, 0}, LineSpacing -> {1, 2}], "Tooltip"]& ], Alignment->Center, BaselinePosition->Baseline, ImageSize->{Automatic, {25, Full}}], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowLess"], StandardForm], ImageSizeCache->{54., {0., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControl", StripOnInput->False], True-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowLess"], StandardForm]], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControlActive", StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], Alignment->Center, FrameMargins->0, ImageSize->{Automatic, {25, Full}}], Appearance->None, BaselinePosition->Baseline, ButtonFunction:>OutputSizeLimit`ButtonFunction[ OutputSizeLimit`Defer, 120, 31494039627119166959, 5/2], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], StandardForm], ImageSizeCache->{62., {0., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControl", StripOnInput->False], True-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], StandardForm]], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControlActive", StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], Alignment->Center, FrameMargins->0, ImageSize->{Automatic, {25, Full}}], Appearance->None, BaselinePosition->Baseline, ButtonFunction:>OutputSizeLimit`ButtonFunction[ OutputSizeLimit`Defer, 120, 31494039627119166959, 5 2], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowAll"], StandardForm], ImageSizeCache->{45., {0., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControl", StripOnInput->False], True-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowAll"], StandardForm]], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControlActive", StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], Alignment->Center, FrameMargins->0, ImageSize->{Automatic, {25, Full}}], Appearance->None, BaselinePosition->Baseline, ButtonFunction:>OutputSizeLimit`ButtonFunction[ OutputSizeLimit`Defer, 120, 31494039627119166959, Infinity], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], StandardForm], ImageSizeCache->{82., {0., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControl", StripOnInput->False], True-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], StandardForm]], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControlActive", StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], Alignment->Center, FrameMargins->0, ImageSize->{Automatic, {25, Full}}], Appearance->None, BaselinePosition->Baseline, ButtonFunction:>FrontEndExecute[{ FrontEnd`SetOptions[ FrontEnd`$FrontEnd, FrontEnd`PreferencesSettings -> {"Page" -> "Advanced"}], FrontEnd`FrontEndToken["PreferencesDialog"]}], Evaluator->None, Method->"Preemptive"]} }, AutoDelete->False, FrameStyle->GrayLevel[0.85], GridBoxDividers->{"Columns" -> {False, {True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{2}}}]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{False}}, "Rows" -> {{False}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{1.}}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "Rows" -> { Offset[0.2], Offset[1.2], { Offset[0.4]}, Offset[0.2]}}], BaseStyle->"OutputSizeLimit", FrameMargins->{{12, 12}, {0, 15}}, FrameStyle->GrayLevel[0.85], RoundingRadius->5, StripOnInput->False], Deploy, DefaultBaseStyle->"Deploy"], If[31494039627119166959 === $SessionID, Out[120], Message[ MessageName[Syntax, "noinfoker"]]; Missing["NotAvailable"]; Null]]], "Output", CellChangeTimes->{3.713707087038406*^9, 3.714323535132731*^9, 3.7153406955654497`*^9, 3.7513807480041513`*^9, 3.75363966146809*^9, 3.761566412849701*^9}, CellLabel->"Out[120]="] }, Open ]], Cell["Obtain the vectors:", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"vecs", "=", RowBox[{"Normal", "@", RowBox[{ RowBox[{"NetExtract", "[", RowBox[{"net", ",", "\"\\""}], "]"}], "[", RowBox[{"[", RowBox[{"1", ";;", RowBox[{"-", "2"}]}], "]"}], "]"}]}]}], ";"}]], "Input", CellChangeTimes->{{3.751380553865698*^9, 3.751380554968046*^9}}, CellLabel->"In[121]:="], Cell["\<\ Create an association whose keys are words and whose values are vectors:\ \>", "Text", CellID->2068968093], Cell[BoxData[ RowBox[{ RowBox[{"word2vec", "=", RowBox[{"AssociationThread", "[", RowBox[{"words", "\[Rule]", "vecs"}], "]"}]}], ";"}]], "Input", CellLabel->"In[122]:="], Cell["Find the eight nearest words to \"king\":", "Text", CellChangeTimes->{{3.724505530386622*^9, 3.724505530850807*^9}}, CellID->2132013242], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Nearest", "[", RowBox[{"word2vec", ",", RowBox[{"word2vec", "[", "\"\\"", "]"}], ",", "8"}], "]"}]], "Input",\ CellLabel->"In[123]:=", CellID->377600698], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"king\"\>", ",", "\<\"prince\"\>", ",", "\<\"aka\"\>", ",", "\<\"queen\"\>", ",", "\<\"kings\"\>", ",", "\<\"jack\"\>", ",", "\<\"mr.\"\>", ",", "\<\"a.k.a\"\>"}], "}"}]], "Output", CellChangeTimes->{3.713707089826395*^9, 3.7143235417465687`*^9, 3.7153407020112743`*^9, 3.751380755432095*^9, 3.753639680105713*^9, 3.761566432025997*^9}, CellLabel->"Out[123]="] }, Open ]], Cell["Man is to king as woman is to:", "Text", CellID->595861456], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Nearest", "[", RowBox[{"word2vec", ",", RowBox[{ RowBox[{"word2vec", "[", "\"\\"", "]"}], "-", RowBox[{"word2vec", "[", "\"\\"", "]"}], "+", RowBox[{"word2vec", "[", "\"\\"", "]"}]}], ",", "5"}], "]"}]], "Input", CellLabel->"In[124]:=", CellID->927245031], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"king\"\>", ",", "\<\"queen\"\>", ",", "\<\"woman\"\>", ",", "\<\"prince\"\>", ",", "\<\"elizabeth\"\>"}], "}"}]], "Output", CellChangeTimes->{3.7137070908926897`*^9, 3.714323544029669*^9, 3.715340704300455*^9, 3.7513807580312777`*^9, 3.753639682897374*^9, 3.761566435235156*^9}, CellLabel->"Out[124]="] }, Open ]], Cell["France is to Paris as Germany is to:", "Text", CellID->1413396266], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Nearest", "[", RowBox[{"word2vec", ",", RowBox[{ RowBox[{"word2vec", "[", "\"\\"", "]"}], "-", RowBox[{"word2vec", "[", "\"\\"", "]"}], "+", RowBox[{"word2vec", "[", "\"\\"", "]"}]}], ",", "5"}], "]"}]], "Input", CellLabel->"In[125]:=", CellID->1331835622], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"berlin\"\>", ",", "\<\"germany\"\>", ",", "\<\"paris\"\>", ",", "\<\"london\"\>", ",", "\<\"frankfurt\"\>"}], "}"}]], "Output", CellChangeTimes->{3.713707091862473*^9, 3.714323546182372*^9, 3.71534070673984*^9, 3.751380760643951*^9, 3.753639685030068*^9, 3.761566437387998*^9}, CellLabel->"Out[125]="] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Net information", "Subsection", CellChangeTimes->{{3.7259790342745*^9, 3.7259790377150373`*^9}}], Cell["Inspect the number of parameters of all arrays in the net:", "Text", CellChangeTimes->{{3.725979178627933*^9, 3.7259791789799137`*^9}, { 3.7259792303321257`*^9, 3.725979245908435*^9}, {3.730020487832671*^9, 3.730020494904923*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"NetInformation", "[", RowBox[{ RowBox[{ "NetModel", "[", "\"\\"", "]"}], ",", "\"\\""}], "]"}]], "Input", CellChangeTimes->{3.735312389159643*^9}, CellLabel->"In[126]:="], Cell[BoxData[ RowBox[{"\[LeftAssociation]", RowBox[{ RowBox[{"{", "\<\"Weights\"\>", "}"}], "\[Rule]", "238703000"}], "\[RightAssociation]"}]], "Output", CellChangeTimes->{3.733052474940061*^9, 3.735312394314186*^9, 3.751380760697473*^9, 3.753639685073681*^9, 3.761566437454032*^9}, CellLabel->"Out[126]="] }, Open ]], Cell["Obtain the total number of parameters:", "Text", CellChangeTimes->{{3.725979366532411*^9, 3.725979381541073*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"NetInformation", "[", RowBox[{ RowBox[{ "NetModel", "[", "\"\\"", "]"}], ",", "\"\\""}], "]"}]], "Input", CellChangeTimes->{3.735312387495173*^9}, CellLabel->"In[127]:="], Cell[BoxData["238703000"], "Output", CellChangeTimes->{3.733052474988936*^9, 3.735312394378457*^9, 3.751380760737619*^9, 3.753639685105442*^9, 3.761566437492584*^9}, CellLabel->"Out[127]="] }, Open ]], Cell["Obtain the layer type counts:", "Text", CellChangeTimes->{{3.725979260148272*^9, 3.725979271188596*^9}, 3.725979320962792*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"NetInformation", "[", RowBox[{ RowBox[{ "NetModel", "[", "\"\\"", "]"}], ",", "\"\\""}], "]"}]], "Input", CellChangeTimes->{3.735312379798967*^9}, CellLabel->"In[128]:="], Cell[BoxData[ RowBox[{"\[LeftAssociation]", RowBox[{"EmbeddingLayer", "\[Rule]", "1"}], "\[RightAssociation]"}]], "Output", CellChangeTimes->{3.733052475040373*^9, 3.735312394431295*^9, 3.7513807607452*^9, 3.75363968511718*^9, 3.761566437507914*^9}, CellLabel->"Out[128]="] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Export to MXNet", "Subsection"], Cell[TextData[{ Cell[BoxData[ ButtonBox["Export", BaseStyle->"Link", ButtonData->"ref/Export"]], "InlineFormula"], " the net into a format that can be opened in MXNet:" }], "Text", CellChangeTimes->{3.724505543140728*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"jsonPath", "=", RowBox[{"Export", "[", RowBox[{ RowBox[{"FileNameJoin", "[", RowBox[{"{", RowBox[{"$TemporaryDirectory", ",", "\"\\""}], "}"}], "]"}], ",", RowBox[{ "NetModel", "[", "\"\\"", "]"}], ",", "\"\\""}], "]"}]}]], "Input", CellChangeTimes->{3.713712302144353*^9, 3.7137124390312243`*^9, 3.713712513980206*^9}, CellLabel->"In[129]:="], Cell[BoxData["\<\"/private/var/folders/pz/94mxs33x2l512z6wtjbthvy0000_ck/T/\ net.json\"\>"], "Output", CellChangeTimes->{3.713707095322916*^9, 3.714323564302721*^9, 3.715340708968343*^9, 3.7290198956456065`*^9, 3.733236268604539*^9, 3.751380762961007*^9, 3.753639687503735*^9, 3.761566439950624*^9}, CellLabel->"Out[129]="] }, Open ]], Cell[TextData[{ Cell[BoxData[ ButtonBox["Export", BaseStyle->"Link", ButtonData->"ref/Export"]], "InlineFormula"], " also creates a ", StyleBox["net.params ", FontSlant->"Italic"], "file containing parameters:" }], "Text", CellChangeTimes->{3.72450554518927*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"paramPath", "=", RowBox[{"FileNameJoin", "[", RowBox[{"{", RowBox[{ RowBox[{"DirectoryName", "[", "jsonPath", "]"}], ",", "\"\\""}], "}"}], "]"}]}]], "Input", CellLabel->"In[130]:="], Cell[BoxData["\<\"/private/var/folders/pz/94mxs33x2l512z6wtjbthvy0000_ck/T/\ net.params\"\>"], "Output", CellChangeTimes->{3.713707095539467*^9, 3.714323564414598*^9, 3.715340709043128*^9, 3.72901989577662*^9, 3.7332362686612473`*^9, 3.751380763028739*^9, 3.753639687547361*^9, 3.761566440012312*^9}, CellLabel->"Out[130]="] }, Open ]], Cell["Get the size of the parameter file:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"FileByteCount", "[", "paramPath", "]"}]], "Input", CellLabel->"In[131]:="], Cell[BoxData["954812087"], "Output", CellChangeTimes->{3.713707095600053*^9, 3.714323564483035*^9, 3.715340709106938*^9, 3.7290198958836308`*^9, 3.7332362686970577`*^9, 3.751380763060946*^9, 3.753639687580035*^9, 3.761566440063375*^9}, CellLabel->"Out[131]="] }, Open ]], Cell["\<\ The size is similar to the byte count of the resource object:\ \>", "Text", CellChangeTimes->{{3.7154457251907387`*^9, 3.715445729229764*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{ "ResourceObject", "[", "\"\\"", "]"}], "[", "\"\\"", "]"}]], "Input", CellChangeTimes->{3.713712308632401*^9, 3.713712439037232*^9, 3.71371251398592*^9}, CellLabel->"In[132]:="], Cell[BoxData["967787185"], "Output", CellChangeTimes->{3.713707095771419*^9, 3.714323564848089*^9, 3.715340709251217*^9, 3.7290198959966416`*^9, 3.7332362687295628`*^9, 3.751380763068449*^9, 3.753639687590975*^9, 3.7615664401196404`*^9}, CellLabel->"Out[132]="] }, Open ]], Cell["Represent the MXNet net as a graph:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Import", "[", RowBox[{"jsonPath", ",", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}]}], "]"}]], "Input", CellLabel->"In[133]:="], Cell[BoxData[ TemplateBox[{GraphicsBox[{{ GrayLevel[0.8], { LineBox[{{0.31251000000000007`, -1.9375300000000002`}, { 1.31251, -1.9375300000000002`}}], LineBox[{{0.31251000000000007`, -0.31251}, { 1.31251, -0.31251000000000007`}}], LineBox[{{1.31251, -0.31251000000000007`}, {2.31251, -1.31251}}], LineBox[{{1.31251, -1.31251}, {2.31251, -1.31251}}], LineBox[{{2.31251, -1.31251}, {3.31251, -1.31251}}]}}, { InsetBox[ GraphicsBox[ StyleBox[ LineBox[{{-1., 1.}, {0., 0.}, {-1., -1.}}], GrayLevel[0.7], StripOnInput -> False]], { 0.91251, -1.9375300000000002`}, {-0.25, 0}, Offset[8], {1., 0.}], InsetBox[ GraphicsBox[ StyleBox[ LineBox[{{-1., 1.}, {0., 0.}, {-1., -1.}}], GrayLevel[0.7], StripOnInput -> False]], { 0.91251, -0.31251000000000007`}, {-0.25, 0}, Offset[8], {1., -5.551115123125783*^-17}], InsetBox[ GraphicsBox[ StyleBox[ LineBox[{{-1., 1.}, {0., 0.}, {-1., -1.}}], GrayLevel[0.7], StripOnInput -> False]], { 1.91251, -0.91251}, {-0.25, 0}, Offset[8], {1., -1.}], InsetBox[ GraphicsBox[ StyleBox[ LineBox[{{-1., 1.}, {0., 0.}, {-1., -1.}}], GrayLevel[0.7], StripOnInput -> False]], { 1.91251, -1.31251}, {-0.25, 0}, Offset[8], {1., 0.}], InsetBox[ GraphicsBox[ StyleBox[ LineBox[{{-1., 1.}, {0., 0.}, {-1., -1.}}], GrayLevel[0.7], StripOnInput -> False]], { 2.91251, -1.31251}, {-0.25, 0}, Offset[8], {1., 0.}]}, { GrayLevel[0], { TagBox[ TooltipBox[{ AbsolutePointSize[4], GrayLevel[0.5], PointBox[{0.31251000000000007`, -0.31251}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "0"}, { StyleBox["\"name\"", Bold, StripOnInput -> False], "\"Input\""}, { 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], "Input"}, { 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[{0.31251000000000007`, -1.9375300000000002`}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "1"}, { StyleBox["\"name\"", Bold, StripOnInput -> False], "\"seq_0\""}, { 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], "seq_0"}, { 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.08, 1, 0.7], PointBox[{1.31251, -1.9375300000000002`}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "2"}, { StyleBox["\"name\"", Bold, StripOnInput -> False], "\"seq_0$0\""}, { StyleBox["\"op\"", Bold, StripOnInput -> False], "\"identity\""}, { StyleBox["\"param\"", Bold, StripOnInput -> False], RowBox[{"\[LeftAssociation]", "\[RightAssociation]"}]}, { StyleBox["\"attrs\"", Bold, StripOnInput -> False], RowBox[{"\[LeftAssociation]", "\[RightAssociation]"}]}, { 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], "seq_0$0"}, { Style["op", Bold], "identity"}, { Style["param", Bold], Association[]}, { Style["attrs", Bold], Association[]}, { 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[4], GrayLevel[0.5], PointBox[{1.31251, -1.31251}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "3"}, { StyleBox["\"name\"", Bold, StripOnInput -> False], "\"Weights\""}, { 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], 3}, { Style["name", Bold], "Weights"}, { 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.5, 0.33, 0.69], PointBox[{1.31251, -0.31251000000000007`}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "4"}, { StyleBox["\"name\"", Bold, StripOnInput -> False], "\"\""}, { StyleBox["\"op\"", Bold, StripOnInput -> False], "\"_PlusScalar\""}, { StyleBox["\"param\"", Bold, StripOnInput -> False], RowBox[{"\[LeftAssociation]", "\[RightAssociation]"}]}, { StyleBox["\"attrs\"", Bold, StripOnInput -> False], TagBox[ GridBox[{{ StyleBox["\"scalar\"", Bold, StripOnInput -> False], StyleBox[ "\"-1.0\"", 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[{"0", ",", "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], ""}, { Style["op", Bold], "_PlusScalar"}, { Style["param", Bold], Association[]}, { Style["attrs", Bold], Grid[{{ Style["scalar", Bold], Style["-1.0", ShowStringCharacters -> True]}}, Alignment -> Left, Spacings -> {1.1, 0.5}, Dividers -> Center, FrameStyle -> GrayLevel[0.85]]}, { Style["inputs", Bold], {{0, 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.17, 1, 0.5], PointBox[{2.31251, -1.31251}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "5"}, { StyleBox["\"name\"", Bold, StripOnInput -> False], "\"\""}, { StyleBox["\"op\"", Bold, StripOnInput -> False], "\"Embedding\""}, { StyleBox["\"param\"", Bold, StripOnInput -> False], RowBox[{"\[LeftAssociation]", "\[RightAssociation]"}]}, { StyleBox["\"attrs\"", Bold, StripOnInput -> False], TagBox[ GridBox[{{ StyleBox["\"output_dim\"", Bold, StripOnInput -> False], StyleBox[ "\"200\"", ShowStringCharacters -> True, StripOnInput -> False]}, { StyleBox["\"input_dim\"", Bold, StripOnInput -> False], StyleBox[ "\"1193515\"", ShowStringCharacters -> True, StripOnInput -> False]}, { StyleBox["\"dtype\"", Bold, StripOnInput -> False], StyleBox[ "\"float32\"", 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[{"4", ",", "0", ",", "0"}], "}"}], ",", 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], 5}, { Style["name", Bold], ""}, { Style["op", Bold], "Embedding"}, { Style["param", Bold], Association[]}, { Style["attrs", Bold], Grid[{{ Style["output_dim", Bold], Style["200", ShowStringCharacters -> True]}, { Style["input_dim", Bold], Style["1193515", ShowStringCharacters -> True]}, { Style["dtype", Bold], Style["float32", ShowStringCharacters -> True]}}, Alignment -> Left, Spacings -> {1.1, 0.5}, Dividers -> Center, FrameStyle -> GrayLevel[0.85]]}, { Style["inputs", Bold], {{4, 0, 0}, {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.08, 1, 0.7], PointBox[{3.31251, -1.31251}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "6"}, { StyleBox["\"name\"", Bold, StripOnInput -> False], "\"Output\""}, { StyleBox["\"op\"", Bold, StripOnInput -> False], "\"identity\""}, { StyleBox["\"param\"", Bold, StripOnInput -> False], RowBox[{"\[LeftAssociation]", "\[RightAssociation]"}]}, { StyleBox["\"attrs\"", Bold, StripOnInput -> False], RowBox[{"\[LeftAssociation]", "\[RightAssociation]"}]}, { StyleBox["\"inputs\"", Bold, StripOnInput -> False], RowBox[{"{", RowBox[{"{", RowBox[{"5", ",", "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], 6}, { Style["name", Bold], "Output"}, { Style["op", Bold], "identity"}, { Style["param", Bold], Association[]}, { Style["attrs", Bold], Association[]}, { Style["inputs", Bold], {{5, 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"]& ]}}, StyleBox[{{ InsetBox[ FormBox["0", TraditionalForm], Offset[{0, 5}, {0.31251000000000007`, -0.31251}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["1", TraditionalForm], Offset[{0, 5}, {0.31251000000000007`, -1.9375300000000002`}], { 0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["2", TraditionalForm], Offset[{0, 6}, {1.31251, -1.9375300000000002`}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["3", TraditionalForm], Offset[{0, 5}, {1.31251, -1.31251}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["4", TraditionalForm], Offset[{0, 6}, {1.31251, -0.31251000000000007`}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["5", TraditionalForm], Offset[{0, 6}, {2.31251, -1.31251}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["6", TraditionalForm], Offset[{0, 6}, {3.31251, -1.31251}], {0., -0.17}, Automatic, {1, 0}]}}, FontSize -> 7, StripOnInput -> False]}, ImageSize -> {198., 99.101}, AspectRatio -> Full, PlotRangePadding -> 0, ImagePadding -> {{24., 24.}, {6, 11.849999999999996`}}, ImageMargins -> 0, BaseStyle -> {TooltipBoxOptions -> {TooltipDelay -> 0.08}}],FormBox[ FormBox[ TemplateBox[{ "\"Tensor\"", "\"identity\"", "\"_PlusScalar\"", "\"Embedding\""}, "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.08, 1, 0.7], AbsolutePointSize[6]], { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], Hue[0.08, 1, 0.7], 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], Hue[0.5, 0.33, 0.69], AbsolutePointSize[6]], { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], Hue[0.5, 0.33, 0.69], 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.17, 1, 0.5], AbsolutePointSize[6]], { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], Hue[0.17, 1, 0.5], 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"], "\"\""}}, 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.08, 1, 0.7], RectangleBox[{0, -1}, {2, 1}]}}, DefaultBaseStyle -> "ColorSwatchGraphics", AspectRatio -> 1, Frame -> True, FrameStyle -> Hue[0.07999999999999999, 1., 0.4666666666666667], FrameTicks -> None, PlotRangePadding -> None, ImageSize -> Dynamic[{ Automatic, 1.35 (CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[ Magnification])}]], StyleBox[ RowBox[{"Hue", "[", RowBox[{"0.08`", ",", "1", ",", "0.7`"}], "]"}], 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.08, 1, 0.7]; 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.08, 1, 0.7], 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.5, 0.33, 0.69], RectangleBox[{0, -1}, {2, 1}]}}, DefaultBaseStyle -> "ColorSwatchGraphics", AspectRatio -> 1, Frame -> True, FrameStyle -> Hue[0.5, 0.33, 0.45999999999999996`], FrameTicks -> None, PlotRangePadding -> None, ImageSize -> Dynamic[{ Automatic, 1.35 (CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[ Magnification])}]], StyleBox[ RowBox[{"Hue", "[", RowBox[{"0.5`", ",", "0.33`", ",", "0.69`"}], "]"}], 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.5, 0.33, 0.69]; 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.5, 0.33, 0.69], 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.17, 1, 0.5], RectangleBox[{0, -1}, {2, 1}]}}, DefaultBaseStyle -> "ColorSwatchGraphics", AspectRatio -> 1, Frame -> True, FrameStyle -> Hue[0.17, 1., 0.33333333333333337`], FrameTicks -> None, PlotRangePadding -> None, ImageSize -> Dynamic[{ Automatic, 1.35 (CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[ Magnification])}]], StyleBox[ RowBox[{"Hue", "[", RowBox[{"0.17`", ",", "1", ",", "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 = Hue[0.17, 1, 0.5]; 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.17, 1, 0.5], Editable -> False, Selectable -> False], ",", RowBox[{"AbsolutePointSize", "[", "6", "]"}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{#, ",", #2, ",", #3, ",", #4}], "}"}], ",", 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}]& ), Editable->True, InterpretationFunction->(RowBox[{"Legended", "[", RowBox[{#, ",", RowBox[{"Placed", "[", RowBox[{#2, ",", "Below"}], "]"}]}], "]"}]& )]], "Output", CellChangeTimes->{3.713707095961337*^9, 3.714323564943707*^9, 3.715340709313732*^9, 3.7290198988709292`*^9, 3.7332362687902203`*^9, 3.7513807632042294`*^9, 3.7536396876670856`*^9, 3.761566440214445*^9}, CellLabel->"Out[133]="] }, Open ]] }, Open ]] }, Open ]] }, WindowSize->Automatic, WindowMargins->Automatic, OutputSizeLimit->10000, CellContext->"Global`", FrontEndVersion->"11.3 for Linux x86 (64-bit) (March 6, 2018)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 489, 16, 70, "ResourceExampleTitle",ExpressionUUID->"db57fda4-1f97-4ac0-91c9-6d0d3688b021", CellGroupingRules->{"TitleGrouping", 0}, PageBreakBelow->False], Cell[1072, 40, 439, 14, 70, "ResourceExampleSubtitle",ExpressionUUID->"877237bd-02ef-4b77-9b0e-b19a3c1a1c67", CellGroupingRules->{"TitleGrouping", 10}, PageBreakBelow->False, CounterIncrements->"Subtitle"], Cell[CellGroupData[{ Cell[1536, 58, 40, 0, 70, "Subsection",ExpressionUUID->"82ad305d-41c0-4ebd-9031-920921cf698d"], Cell[1579, 60, 40, 0, 70, "Text",ExpressionUUID->"abdb70b6-ba7b-4764-b050-790c8f80b2dc"], Cell[CellGroupData[{ Cell[1644, 64, 240, 6, 70, "Input",ExpressionUUID->"732b2f77-e286-482c-94aa-5f948c9480b8"], Cell[1887, 72, 8353, 180, 70, "Output",ExpressionUUID->"fbfea5f4-e399-4698-ada6-cb21f58e8cea"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[10289, 258, 99, 1, 70, "Subsection",ExpressionUUID->"8696347a-2347-417b-8e26-550d57c046ef"], Cell[10391, 261, 61, 0, 70, "Text",ExpressionUUID->"27a4ce61-3d40-4a84-aaf9-d20ef89515f2"], Cell[CellGroupData[{ Cell[10477, 265, 345, 10, 70, "Input",ExpressionUUID->"790bbd10-25f9-444c-8dd3-32e0ed8e2198", CellID->547578203], Cell[10825, 277, 10351, 256, 70, "Output",ExpressionUUID->"f8ebfa7b-8fcc-46d6-b931-ab620561fca1"] }, Open ]], Cell[21191, 536, 53, 0, 70, "Text",ExpressionUUID->"30fc5c55-57f0-4ae3-9629-99f51b5f5910"], Cell[CellGroupData[{ Cell[21269, 540, 94, 2, 70, "Input",ExpressionUUID->"5c4a199a-e0a0-43aa-bf87-bc9c80637b4d"], Cell[21366, 544, 282, 6, 70, "Output",ExpressionUUID->"fcfcc8eb-9f6a-4721-88c6-926f777c2ae5"] }, Open ]], Cell[21663, 553, 248, 8, 70, "Text",ExpressionUUID->"5e80210f-52d2-4371-bd1a-878744ba5e55"], Cell[CellGroupData[{ Cell[21936, 565, 444, 14, 70, "Input",ExpressionUUID->"f6ad2c68-6e9c-4c51-951e-64ad54586fb0", CellID->429988564], Cell[22383, 581, 15443, 321, 70, "Output",ExpressionUUID->"3f798d0f-792a-43ad-8b24-ff046cc22618"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[37875, 908, 111, 1, 70, "Subsection",ExpressionUUID->"a50af000-b062-46ee-8cde-b85de777b72e"], Cell[37989, 911, 50, 0, 70, "Text",ExpressionUUID->"dc4384ee-d7c4-4558-97bd-5a303ead19bf"], Cell[38042, 913, 613, 12, 70, "Input",ExpressionUUID->"292f0b0a-4a6e-41fe-8078-4e51c0666ae4"], Cell[38658, 927, 641, 12, 70, "Input",ExpressionUUID->"1ac5a62d-3fde-49c8-97a6-883b21eb4f8e"], Cell[39302, 941, 126, 4, 70, "Text",ExpressionUUID->"6ffa633a-543a-447c-ab7a-e1816862c553", CellID->2141353759], Cell[CellGroupData[{ Cell[39453, 949, 453, 13, 70, "Input",ExpressionUUID->"90825c49-eeac-40f9-8227-9183b2eb3b6a", CellID->1277887787], Cell[39909, 964, 28417, 888, 70, "Output",ExpressionUUID->"7092be52-aa1b-4467-b47e-82aba5dc4d15"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[68375, 1858, 104, 1, 70, "Subsection",ExpressionUUID->"9190fa45-8e34-4c82-9a26-b9eb96e5607a"], Cell[68482, 1861, 40, 0, 70, "Text",ExpressionUUID->"946e565a-6ff7-4ede-b62c-20bcb4b55a49"], Cell[CellGroupData[{ Cell[68547, 1865, 295, 9, 70, "Input",ExpressionUUID->"ca3e6167-a43d-4849-b20e-76e05f2fc335", CellID->1834105916], Cell[68845, 1876, 7678, 165, 70, "Output",ExpressionUUID->"ae0e869e-c564-4b79-a79d-2e5aedcfe5a2"] }, Open ]], Cell[76538, 2044, 36, 0, 70, "Text",ExpressionUUID->"d1bd7711-3818-4458-894f-aecca49d8770"], Cell[CellGroupData[{ Cell[76599, 2048, 220, 6, 70, "Input",ExpressionUUID->"88c80cb1-fe98-4815-8031-f85ef356f326"], Cell[76822, 2056, 10546, 260, 70, "Output",ExpressionUUID->"d483f916-223d-4efb-b9e1-b746b68c4806"] }, Open ]], Cell[87383, 2319, 35, 0, 70, "Text",ExpressionUUID->"cf61daac-ed3c-48b6-b810-0df91359ba3f"], Cell[87421, 2321, 380, 11, 70, "Input",ExpressionUUID->"da497daa-c4ca-4ce8-8b34-f3e7e530b981"], Cell[87804, 2334, 117, 3, 70, "Text",ExpressionUUID->"7df86141-52a3-4b48-9e80-99a26a35adb1", CellID->2068968093], Cell[87924, 2339, 182, 5, 70, "Input",ExpressionUUID->"44cebd9e-a3a6-47ac-8d6c-8fc6856a282a"], Cell[88109, 2346, 144, 2, 70, "Text",ExpressionUUID->"519530cb-ee33-4c5e-a283-b02df21787f3", CellID->2132013242], Cell[CellGroupData[{ Cell[88278, 2352, 194, 6, 70, "Input",ExpressionUUID->"4a3920be-9ae5-453a-9cca-a2fa1d7ec3f5", CellID->377600698], Cell[88475, 2360, 419, 8, 70, "Output",ExpressionUUID->"17461baf-7c62-4d19-8b73-60a175fa995b"] }, Open ]], Cell[88909, 2371, 66, 1, 70, "Text",ExpressionUUID->"217928c6-9e37-4375-a546-86bfe0957bf4", CellID->595861456], Cell[CellGroupData[{ Cell[89000, 2376, 326, 9, 70, "Input",ExpressionUUID->"6c4c78ff-7c07-4216-9982-7fcc6a19c962", CellID->927245031], Cell[89329, 2387, 358, 7, 70, "Output",ExpressionUUID->"c4c3e080-066a-497a-9ad5-5d2ab75c60a8"] }, Open ]], Cell[89702, 2397, 73, 1, 70, "Text",ExpressionUUID->"eda5f842-b506-4b33-8164-4bb066592926", CellID->1413396266], Cell[CellGroupData[{ Cell[89800, 2402, 333, 9, 70, "Input",ExpressionUUID->"0e43800f-cd07-4a5a-856b-318b2aa913ab", CellID->1331835622], Cell[90136, 2413, 357, 7, 70, "Output",ExpressionUUID->"3eac79ee-f990-48ed-826c-87a7e4159633"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[90542, 2426, 103, 1, 70, "Subsection",ExpressionUUID->"e21cee49-3268-4321-94ac-2e3d68e2008b"], Cell[90648, 2429, 242, 3, 70, "Text",ExpressionUUID->"459f255a-4854-4e0b-9e1e-60f222fcec41"], Cell[CellGroupData[{ Cell[90915, 2436, 291, 8, 70, "Input",ExpressionUUID->"95fc7b53-625e-4b46-ae78-f57d7dbe9dff"], Cell[91209, 2446, 321, 7, 70, "Output",ExpressionUUID->"21af3762-3534-40a2-9e45-2e8296480a2a"] }, Open ]], Cell[91545, 2456, 120, 1, 70, "Text",ExpressionUUID->"56f5348d-3f1c-408b-bc5c-6e116a238311"], Cell[CellGroupData[{ Cell[91690, 2461, 295, 8, 70, "Input",ExpressionUUID->"228e1a94-0c19-49c5-8a81-84301431f6d5"], Cell[91988, 2471, 194, 3, 70, "Output",ExpressionUUID->"5af07c2b-bd3c-45e8-8172-11d84cdf050f"] }, Open ]], Cell[92197, 2477, 137, 2, 70, "Text",ExpressionUUID->"12d64494-c6e9-4c56-8cc6-21ea274337d6"], Cell[CellGroupData[{ Cell[92359, 2483, 287, 8, 70, "Input",ExpressionUUID->"24023903-d691-4a26-a97a-a6aafb634f23"], Cell[92649, 2493, 285, 6, 70, "Output",ExpressionUUID->"cc381d68-0b22-4841-bd90-64b7f76e289b"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[92983, 2505, 37, 0, 70, "Subsection",ExpressionUUID->"5dd96eb1-874d-42e8-8ba8-13e7f42ea31c"], Cell[93023, 2507, 232, 7, 70, "Text",ExpressionUUID->"dde47179-c387-41b7-bbe2-decca90f9421"], Cell[CellGroupData[{ Cell[93280, 2518, 495, 14, 70, "Input",ExpressionUUID->"0aa6c2e3-1a7f-4478-a8ff-53cfac318af4"], Cell[93778, 2534, 331, 5, 70, "Output",ExpressionUUID->"33e462f6-9883-44d6-bef2-bc80ea686ba9"] }, Open ]], Cell[94124, 2542, 277, 10, 70, "Text",ExpressionUUID->"9149d716-e320-4306-a1e2-af193fbf4343"], Cell[CellGroupData[{ Cell[94426, 2556, 243, 7, 70, "Input",ExpressionUUID->"ba511437-4f2e-4a05-b1b1-9ff0383a4314"], Cell[94672, 2565, 332, 5, 70, "Output",ExpressionUUID->"db61a5e8-844c-4e1d-9121-34e7d11316a2"] }, Open ]], Cell[95019, 2573, 51, 0, 70, "Text",ExpressionUUID->"26519580-251f-4310-a16c-40d2231ebf00"], Cell[CellGroupData[{ Cell[95095, 2577, 99, 2, 70, "Input",ExpressionUUID->"15edef81-f088-4e07-89ff-351a537b2365"], Cell[95197, 2581, 267, 4, 70, "Output",ExpressionUUID->"9a271267-73f3-4428-b853-139f0c6eeb72"] }, Open ]], Cell[95479, 2588, 153, 3, 70, "Text",ExpressionUUID->"a8ea8e27-94f2-47d9-bb86-b92825f29a35"], Cell[CellGroupData[{ Cell[95657, 2595, 293, 8, 70, "Input",ExpressionUUID->"9588fbf6-c8ee-4fc2-93a6-ada4ee5438d2"], Cell[95953, 2605, 269, 4, 70, "Output",ExpressionUUID->"355c308e-98ea-463c-8817-a8536daa8750"] }, Open ]], Cell[96237, 2612, 51, 0, 70, "Text",ExpressionUUID->"d22c78d3-7acb-42d1-9942-56df52348dd4"], Cell[CellGroupData[{ Cell[96313, 2616, 198, 6, 70, "Input",ExpressionUUID->"cb55f799-7cb5-4a24-ad49-87e8ca961c37"], Cell[96514, 2624, 35262, 736, 70, "Output",ExpressionUUID->"b8998d32-2003-4484-8e84-c5c7c24c2aae"] }, Open ]] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)