(* 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[ 138417, 3485] NotebookOptionsPosition[ 130368, 3335] NotebookOutlinePosition[ 130724, 3352] CellTagsIndexPosition[ 130681, 3349] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["\<\ GloVe 100-Dimensional Word Vectors Trained on Wikipedia and Gigaword 5 Data\ \>", "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.714480792034876*^9, 3.724434250646715*^9}, CellLabel->"In[68]:="], 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["100", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Class count\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["400001", "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["100", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Class count\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["400001", "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]\"", "\"400001\"", "\"100\""}, "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], "\"100\""}, "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.714480852524563*^9, 3.715339882309394*^9, 3.729019496303855*^9, 3.7350592815543737`*^9, 3.75138037536586*^9, 3.753639194909301*^9, 3.7615662060297337`*^9}, CellLabel->"Out[68]="] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Basic usage", "Subsection", CellChangeTimes->{{3.724434127478545*^9, 3.7244341278600473`*^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.714480792038705*^9, 3.724434250649605*^9}, CellLabel->"In[69]:=", CellID->547578203], Cell[BoxData[ InterpretationBox[ TagBox[ FrameBox[GridBox[{ { ItemBox[ TagBox[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ "0.26688000559806824`", ",", "0.3963199853897095`", ",", "0.6169000267982483`", ",", RowBox[{"-", "0.7745100259780884`"}], ",", RowBox[{"-", "0.1039000004529953`"}], ",", "0.2669700086116791`", ",", "0.27880001068115234`", ",", TemplateBox[{"86"}, "OutputSizeLimit`Skeleton"], ",", "0.13734999299049377`", ",", "0.42232000827789307`", ",", RowBox[{"-", "0.6127899885177612`"}], ",", RowBox[{"-", "0.38486000895500183`"}], ",", "0.3584200143814087`", ",", RowBox[{"-", "0.4846400022506714`"}], ",", "0.3072800040245056`"}], "}"}], ",", TemplateBox[{"1"}, "OutputSizeLimit`Skeleton"]}], "}"}], Short[#, 5]& ], BaseStyle->{Deployed -> False}, StripOnInput->False]}, {GridBox[{ { PaneBox[ TagBox[ TooltipBox[ StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource[ "FEStrings", "sizeBriefExplanation"], StandardForm], ImageSizeCache->{33., {15., 9.}}], 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, 69, 31494039627119166959, 5/2], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], StandardForm], ImageSizeCache->{32., {15., 9.}}], 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, 69, 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, 69, 31494039627119166959, Infinity], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], StandardForm], ImageSizeCache->{45., {15., 9.}}], 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[69], Message[ MessageName[Syntax, "noinfoker"]]; Missing["NotAvailable"]; Null]]], "Output", CellChangeTimes->{3.7137070715637283`*^9, 3.714480891104162*^9, 3.715339883850363*^9, 3.7290194978051558`*^9, 3.7513803846623163`*^9, 3.753639203794191*^9, 3.7614964397070427`*^9, 3.76156621472959*^9}, CellLabel->"Out[69]="] }, Open ]], Cell["Obtain the dimensions of the vectors:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Dimensions", "[", "vectors", "]"}]], "Input", CellLabel->"In[70]:="], Cell[BoxData[ RowBox[{"{", RowBox[{"2", ",", "100"}], "}"}]], "Output", CellChangeTimes->{3.7137070716262693`*^9, 3.714480891212768*^9, 3.715339883939921*^9, 3.729019497892173*^9, 3.751380384742755*^9, 3.75363920383574*^9, 3.761566214786996*^9}, CellLabel->"Out[70]="] }, 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.714480792042469*^9, 3.7244342506520844`*^9}, CellLabel->"In[71]:=", 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", "\"..\"", "400001"}, "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], "\"100\""}, "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.714480891488317*^9, 3.7153398843691473`*^9, 3.7290194979951935`*^9, 3.7513803847905807`*^9, 3.753639204042698*^9, 3.7615662148276453`*^9}, CellLabel->"Out[71]="] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Feature visualization", "Subsection", CellChangeTimes->{{3.724434134211779*^9, 3.724434134644095*^9}}], Cell["Create two lists of related words:", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"animals", "=", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ";"}]], "Input", CellLabel->"In[72]:="], Cell[BoxData[ RowBox[{ RowBox[{"fruits", "=", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ";"}]], "Input", CellLabel->"In[73]:="], 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.714480792052701*^9, 3.724434250654739*^9}, CellLabel->"In[74]:=", CellID->1277887787], Cell[BoxData[ GraphicsBox[{{}, { {Opacity[0], PointBox[CompressedData[" 1:eJwlUksoRGEY/Y07xmA8G48RXSuTFKMmk0fuhoUdshDlzkhhYVLkkaahxkI0 xMpjTMRNHqthIXGLhTRLkWwusxCTSSaPUNzvzK3b17nn+853/vPfIoezuVvD GDOrL1X14afXMgS1Kr7jozq1+qsiWsLi3corYcFsNxKWIxUaWa3uzYY48BPm P+Ldx8WYd/c+JhPPm6L4riyevZzSgl29gXh2sox51mJNAK73XRMvHuz8Uj8L tKcS7z8ypxDvr5h8JZ7f/sK8wHkN0Dd+pwMH27ZoTnySsrHfw71Rv6AZx7y4 5+TQHypNg/+GoTDxypzEQX92OJF48aIqD/1LM1rgubHYeSrXP6A3f8nA27QZ xMvhqVzofa2mIA9jmQm+LTcRnOO9DbpCZxA5KQu7OvTdHgaIl32GLOxZki4I 86NF+dB1OJ4xL1nTMV8T0MAH581EbmXWJOjpDsCzkvMg8rFH4YulDiJ3vnUk B+fusemon2+Uo8jZMwM/7kITcpT3N+BXLBhg6Pf2/uD+xc+Y//ydB/i11yYR VjyWeOy/L0+D/45qBfdv60EO/oluPe5V74rldOVC7sJkXwi5h6Qw/ot+Zxz0 m7qShX80/q5L "]]}, { {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], {4.4058003425598145, 0.10444062203168869}, {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], {2.7413227558135986, 1.0382951498031616}, {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], {5.344880104064941, -2.274869441986084}, {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], {2.1594953536987305, 1.947389006614685}, {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], {4.28880500793457, -3.4879941940307617}, {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], {1.9968510866165161, -0.9301247000694275}, {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], {3.6297225952148438, -2.3260459899902344}, {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.7760372161865234, -0.353410005569458}, {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], {1.7919210195541382, -3.7947769165039062}, {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.5198872089385986, -1.031786561012268}, {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], {3.7464163303375244, -3.6948323249816895}, {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], {4.244221210479736, 0.04365385323762894}, {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], {5.663976192474365, -1.1261038780212402}, {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], {3.560551166534424, -2.554529905319214}, {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], {3.8969175815582275, -0.8580659627914429}, {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], {2.5818192958831787, -3.058375597000122}, {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], {6.3074049949646, -2.6936538219451904}, {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], {4.369691371917725, -1.4146037101745605}, {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.098909854888916, -4.25509786605835}, {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], {6.131758689880371, -3.577134609222412}, {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], {-6.545980453491211, 0.9637687802314758}, {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], {-3.043924331665039, 2.2247910499572754}, {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], {-2.959266424179077, 0.08091506361961365}, {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], {-4.763300895690918, 0.1926148384809494}, {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], {-6.782688617706299, 0.8245099782943726}, {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], {-4.052394866943359, 2.338005542755127}, {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], {-4.639665603637695, 3.275968551635742}, {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], {-4.176787853240967, -0.22473645210266113}, {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], {-4.487675189971924, 1.9658336639404297}, {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], {-5.867512226104736, 2.9025423526763916}, {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], {-1.2344456911087036, 2.1936137676239014}, {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], {-3.637753486633301, 0.957480788230896}, {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], {-2.055231809616089, 1.7132712602615356}, {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], {-3.1207897663116455, 0.583387017250061}, {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], {-3.2799715995788574, 2.3991811275482178}, {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], {-3.8988683223724365, 0.507246196269989}, {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], {-3.550889015197754, 3.1745636463165283}, {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], {-4.373081207275391, 3.936929225921631}, {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.606751561164856, 0.8642444014549255}, {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], {-2.179410696029663, 3.423494815826416}, {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.714480919983284*^9, 3.7153398856453953`*^9, 3.7290194987443433`*^9, 3.753639204363512*^9, 3.761566215178876*^9}, CellLabel->"Out[74]="] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Word analogies", "Subsection", CellChangeTimes->{{3.7244341404672537`*^9, 3.724434140675521*^9}}], Cell["Get the pre-trained net:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"net", "=", RowBox[{ "NetModel", "[", "\"\\"", "]"}]}]], "Input", CellChangeTimes->{3.7144807920704403`*^9, 3.724434250656979*^9}, CellLabel->"In[75]:=", 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["100", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Class count\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["400001", "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["100", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Class count\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["400001", "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]\"", "\"400001\"", "\"100\""}, "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], "\"100\""}, "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.714480924967935*^9, 3.715339886117283*^9, 3.72901949882936*^9, 3.751380384862597*^9, 3.753639204377137*^9, 3.7615662151923237`*^9}, CellLabel->"Out[75]="] }, Open ]], Cell["Get a list of words:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"words", "=", RowBox[{ RowBox[{"NetExtract", "[", RowBox[{"net", ",", "\"\\""}], "]"}], "[", RowBox[{"[", "\"\\"", "]"}], "]"}]}]], "Input", CellLabel->"In[76]:="], Cell[BoxData[ InterpretationBox[ TagBox[ FrameBox[GridBox[{ { ItemBox[ TagBox[ RowBox[{"{", RowBox[{"\<\"the\"\>", ",", "\<\",\"\>", ",", "\<\".\"\>", ",", "\<\"of\"\>", ",", "\<\"to\"\>", ",", "\<\"and\"\>", ",", "\<\"in\"\>", ",", "\<\"a\"\>", ",", "\<\"\\\"\"\>", ",", "\<\"'s\"\>", ",", "\<\"for\"\>", ",", "\<\"-\"\>", ",", "\<\"that\"\>", ",", "\<\"on\"\>", ",", "\<\"is\"\>", ",", "\<\"was\"\>", ",", "\<\"said\"\>", ",", "\<\"with\"\>", ",", "\<\"he\"\>", ",", "\<\"as\"\>", ",", TemplateBox[{"399960"}, "OutputSizeLimit`Skeleton"], ",", "\<\"whirlow\"\>", ",", "\<\"wanz\"\>", ",", "\<\"t22\"\>", ",", "\<\"slann\"\>", ",", "\<\"kunimoto\"\>", ",", "\<\"altares\"\>", ",", "\<\"cipolletti\"\>", ",", "\<\"sherwoods\"\>", ",", "\<\"sullana\"\>", ",", "\<\"29km\"\>", ",", "\<\"sigarms\"\>", ",", "\<\"katuna\"\>", ",", "\<\"aqm\"\>", ",", "\<\"1.3775\"\>", ",", "\<\"corythosaurus\"\>", ",", "\<\"chanty\"\>", ",", "\<\"kronik\"\>", ",", "\<\"rolonda\"\>", ",", "\<\"zsombor\"\>", ",", "\<\"sandberger\"\>"}], "}"}], Short[#, 5]& ], BaseStyle->{Deployed -> False}, StripOnInput->False]}, {GridBox[{ { PaneBox[ TagBox[ TooltipBox[ StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource[ "FEStrings", "sizeBriefExplanation"], StandardForm], ImageSizeCache->{33., {15., 9.}}], 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, 76, 31494039627119166959, 5/2], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], StandardForm], ImageSizeCache->{32., {15., 9.}}], 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, 76, 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, 76, 31494039627119166959, Infinity], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], StandardForm], ImageSizeCache->{45., {15., 9.}}], 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[76], Message[ MessageName[Syntax, "noinfoker"]]; Missing["NotAvailable"]; Null]]], "Output", CellChangeTimes->{3.713707087038406*^9, 3.714480925581077*^9, 3.715339886765654*^9, 3.751380385379869*^9, 3.753639204887917*^9, 3.761566215684054*^9}, CellLabel->"Out[76]="] }, 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.751380363268773*^9, 3.751380364243476*^9}}, CellLabel->"In[77]:="], 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[78]:="], Cell["Find the eight nearest words to \"king\":", "Text", CellChangeTimes->{{3.724434144963472*^9, 3.7244341459404163`*^9}}, CellID->2132013242], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Nearest", "[", RowBox[{"word2vec", ",", RowBox[{"word2vec", "[", "\"\\"", "]"}], ",", "8"}], "]"}]], "Input",\ CellLabel->"In[79]:=", CellID->377600698], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"king\"\>", ",", "\<\"prince\"\>", ",", "\<\"queen\"\>", ",", "\<\"monarch\"\>", ",", "\<\"brother\"\>", ",", "\<\"uncle\"\>", ",", "\<\"nephew\"\>", ",", "\<\"son\"\>"}], "}"}]], "Output", CellChangeTimes->{3.713707089826395*^9, 3.714480926859291*^9, 3.715339888009239*^9, 3.75138038677232*^9, 3.753639206014077*^9, 3.7615662168511963`*^9}, CellLabel->"Out[79]="] }, 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[80]:=", CellID->927245031], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"king\"\>", ",", "\<\"queen\"\>", ",", "\<\"monarch\"\>", ",", "\<\"throne\"\>", ",", "\<\"elizabeth\"\>"}], "}"}]], "Output", CellChangeTimes->{3.7137070908926897`*^9, 3.7144809272909307`*^9, 3.71533988849832*^9, 3.751380387261651*^9, 3.753639206454568*^9, 3.761566217306555*^9}, CellLabel->"Out[80]="] }, 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[81]:=", CellID->1331835622], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"berlin\"\>", ",", "\<\"frankfurt\"\>", ",", "\<\"vienna\"\>", ",", "\<\"munich\"\>", ",", "\<\"hamburg\"\>"}], "}"}]], "Output", CellChangeTimes->{3.713707091862473*^9, 3.714480927687042*^9, 3.715339888915481*^9, 3.751380387812191*^9, 3.753639206860993*^9, 3.761566217775818*^9}, CellLabel->"Out[81]="] }, 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.735312646349991*^9}, CellLabel->"In[82]:="], Cell[BoxData[ RowBox[{"\[LeftAssociation]", RowBox[{ RowBox[{"{", "\<\"Weights\"\>", "}"}], "\[Rule]", "40000100"}], "\[RightAssociation]"}]], "Output", CellChangeTimes->{3.733052474940061*^9, 3.735312648425655*^9, 3.751380387852376*^9, 3.753639206869638*^9, 3.7615662177847023`*^9}, CellLabel->"Out[82]="] }, 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.735312644574452*^9}, CellLabel->"In[83]:="], Cell[BoxData["40000100"], "Output", CellChangeTimes->{3.733052474988936*^9, 3.735312648478936*^9, 3.75138038788128*^9, 3.753639206890645*^9, 3.761566217810534*^9}, CellLabel->"Out[83]="] }, 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.7353126427018957`*^9}, CellLabel->"In[84]:="], Cell[BoxData[ RowBox[{"\[LeftAssociation]", RowBox[{"EmbeddingLayer", "\[Rule]", "1"}], "\[RightAssociation]"}]], "Output", CellChangeTimes->{3.733052475040373*^9, 3.735312648523232*^9, 3.751380387889464*^9, 3.75363920691407*^9, 3.761566217819229*^9}, CellLabel->"Out[84]="] }, 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.724434158646514*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"jsonPath", "=", RowBox[{"Export", "[", RowBox[{ RowBox[{"FileNameJoin", "[", RowBox[{"{", RowBox[{"$TemporaryDirectory", ",", "\"\\""}], "}"}], "]"}], ",", RowBox[{ "NetModel", "[", "\"\\"", "]"}], ",", "\"\\""}], "]"}]}]], "Input", CellChangeTimes->{3.714480792098606*^9, 3.724434250659758*^9}, CellLabel->"In[85]:="], Cell[BoxData["\<\"/private/var/folders/pz/94mxs33x2l512z6wtjbthvy0000_ck/T/\ net.json\"\>"], "Output", CellChangeTimes->{3.713707095322916*^9, 3.714480945423411*^9, 3.715339889380846*^9, 3.729019504712537*^9, 3.733235509613888*^9, 3.751380388300791*^9, 3.753639207247712*^9, 3.761566218187467*^9}, CellLabel->"Out[85]="] }, 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.72443416310926*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"paramPath", "=", RowBox[{"FileNameJoin", "[", RowBox[{"{", RowBox[{ RowBox[{"DirectoryName", "[", "jsonPath", "]"}], ",", "\"\\""}], "}"}], "]"}]}]], "Input", CellLabel->"In[86]:="], Cell[BoxData["\<\"/private/var/folders/pz/94mxs33x2l512z6wtjbthvy0000_ck/T/\ net.params\"\>"], "Output", CellChangeTimes->{3.713707095539467*^9, 3.714480945500595*^9, 3.715339889485461*^9, 3.7290195047975535`*^9, 3.733235509848782*^9, 3.751380388308573*^9, 3.753639207285675*^9, 3.761566218197309*^9}, CellLabel->"Out[86]="] }, Open ]], Cell["Get the size of the parameter file:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"FileByteCount", "[", "paramPath", "]"}]], "Input", CellLabel->"In[87]:="], Cell[BoxData["160000487"], "Output", CellChangeTimes->{3.713707095600053*^9, 3.714480945557835*^9, 3.715339889556106*^9, 3.7290195048825703`*^9, 3.733235509879668*^9, 3.7513803883382883`*^9, 3.753639207307749*^9, 3.761566218222829*^9}, CellLabel->"Out[87]="] }, Open ]], Cell["\<\ The size is similar to the byte count of the resource object:\ \>", "Text", CellChangeTimes->{{3.715445685159902*^9, 3.715445687798326*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{ "ResourceObject", "[", "\"\\"", "]"}], "[", "\"\\"", "]"}]], "Input", CellChangeTimes->{3.714480792106745*^9, 3.724434250662046*^9}, CellLabel->"In[88]:="], Cell[BoxData["163036277"], "Output", CellChangeTimes->{3.713707095771419*^9, 3.714480945716543*^9, 3.71533988985673*^9, 3.7290195049695883`*^9, 3.7332355099107237`*^9, 3.7513803883459663`*^9, 3.753639207316231*^9, 3.761566218264288*^9}, CellLabel->"Out[88]="] }, Open ]], Cell["Represent the MXNet net as a graph:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Import", "[", RowBox[{"jsonPath", ",", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}]}], "]"}]], "Input", CellLabel->"In[89]:="], 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[ "\"100\"", ShowStringCharacters -> True, StripOnInput -> False]}, { StyleBox["\"input_dim\"", Bold, StripOnInput -> False], StyleBox[ "\"400001\"", 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["100", ShowStringCharacters -> True]}, { Style["input_dim", Bold], Style["400001", 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.7144809457965307`*^9, 3.715339889987197*^9, 3.729019507639122*^9, 3.733235510051509*^9, 3.751380388459228*^9, 3.753639207372046*^9, 3.7615662183290863`*^9}, CellLabel->"Out[89]="] }, 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, 518, 17, 70, "ResourceExampleTitle",ExpressionUUID->"cf2d3545-519e-41e1-b71f-31c103a001a2", CellGroupingRules->{"TitleGrouping", 0}, PageBreakBelow->False], Cell[1101, 41, 439, 14, 70, "ResourceExampleSubtitle",ExpressionUUID->"22b95cc2-64ad-4e45-a85d-67480b45ec6c", CellGroupingRules->{"TitleGrouping", 10}, PageBreakBelow->False, CounterIncrements->"Subtitle"], Cell[CellGroupData[{ Cell[1565, 59, 40, 0, 70, "Subsection",ExpressionUUID->"e0d1812f-f62c-415e-a328-dfc94f2aeb2a"], Cell[1608, 61, 40, 0, 70, "Text",ExpressionUUID->"86932cac-b95c-4f05-9783-58920de0d1cf"], Cell[CellGroupData[{ Cell[1673, 65, 236, 5, 70, "Input",ExpressionUUID->"ec0c3b17-48d9-4700-97e7-6f7b27c6ad4a"], Cell[1912, 72, 8300, 180, 70, "Output",ExpressionUUID->"28b39b00-b7a6-4cc5-8c59-8223a8bc271a"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[10261, 258, 101, 1, 70, "Subsection",ExpressionUUID->"2bcc2a70-552a-46f5-b461-38dc023f0e61"], Cell[10365, 261, 61, 0, 70, "Text",ExpressionUUID->"3f82ce99-872f-4f1b-9065-7bfcba4fac74"], Cell[CellGroupData[{ Cell[10451, 265, 338, 9, 70, "Input",ExpressionUUID->"fa35d607-798f-4222-8724-0893953c3c94", CellID->547578203], Cell[10792, 276, 9617, 245, 70, "Output",ExpressionUUID->"19aab4ad-d479-4180-a6b3-108964574d49"] }, Open ]], Cell[20424, 524, 53, 0, 70, "Text",ExpressionUUID->"ad265a4d-b936-4e88-87a4-d5a195604367"], Cell[CellGroupData[{ Cell[20502, 528, 93, 2, 70, "Input",ExpressionUUID->"579ea186-d5cd-45ce-92d9-dab7f1d49377"], Cell[20598, 532, 280, 6, 70, "Output",ExpressionUUID->"afd9692c-3f2d-4c9f-9973-b179df5ef3a3"] }, Open ]], Cell[20893, 541, 248, 8, 70, "Text",ExpressionUUID->"67b41f8f-948f-4743-9cb4-bb8dbbc4c3d4"], Cell[CellGroupData[{ Cell[21166, 553, 441, 13, 70, "Input",ExpressionUUID->"a724a107-5cbd-47d3-ab7f-0fa825e6c8df", CellID->429988564], Cell[21610, 568, 15449, 321, 70, "Output",ExpressionUUID->"c26dc93f-4f37-4448-9bbb-75a8b65050f3"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[37108, 895, 109, 1, 70, "Subsection",ExpressionUUID->"d396df35-38f7-4711-bcf3-468848c30fac"], Cell[37220, 898, 50, 0, 70, "Text",ExpressionUUID->"746dee79-c157-4739-997e-64e821392ad5"], Cell[37273, 900, 612, 12, 70, "Input",ExpressionUUID->"6bd996ba-67b8-49dd-8456-2059682f4f63"], Cell[37888, 914, 640, 12, 70, "Input",ExpressionUUID->"274914ff-546c-4814-824d-86d5ac51dbd6"], Cell[38531, 928, 126, 4, 70, "Text",ExpressionUUID->"4d82d161-b351-45bb-9ba8-c3759bab1ff4", CellID->2141353759], Cell[CellGroupData[{ Cell[38682, 936, 446, 12, 70, "Input",ExpressionUUID->"811a948b-db10-4588-80a5-e2350c981c10", CellID->1277887787], Cell[39131, 950, 28410, 888, 70, "Output",ExpressionUUID->"90625ae6-ed45-4c87-be53-e597a5e19246"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[67590, 1844, 104, 1, 70, "Subsection",ExpressionUUID->"44810662-1229-4838-88a8-8929486949af"], Cell[67697, 1847, 40, 0, 70, "Text",ExpressionUUID->"a0b4c96e-09be-409c-b394-dd9a261f7768"], Cell[CellGroupData[{ Cell[67762, 1851, 288, 8, 70, "Input",ExpressionUUID->"3f6fbbf3-d919-4040-b94f-2ff4f9dc089e", CellID->1834105916], Cell[68053, 1861, 7671, 165, 70, "Output",ExpressionUUID->"c644b4b6-7ea1-4164-9e85-957fbcd6ea94"] }, Open ]], Cell[75739, 2029, 36, 0, 70, "Text",ExpressionUUID->"b07dbb4d-e2b6-41cc-9490-877054992671"], Cell[CellGroupData[{ Cell[75800, 2033, 219, 6, 70, "Input",ExpressionUUID->"3c57871d-d67a-471b-8201-6e8f916e9dac"], Cell[76022, 2041, 9863, 246, 70, "Output",ExpressionUUID->"f3e88246-fa4a-4048-9da0-12c52a5b2e03"] }, Open ]], Cell[85900, 2290, 35, 0, 70, "Text",ExpressionUUID->"c991f898-cd9d-4041-bd96-bf43cbec45f2"], Cell[85938, 2292, 379, 11, 70, "Input",ExpressionUUID->"8e266962-3ae0-49e2-a448-2eae5caba6cc"], Cell[86320, 2305, 117, 3, 70, "Text",ExpressionUUID->"745d2fd9-741d-42e7-9d00-4865ecff981d", CellID->2068968093], Cell[86440, 2310, 181, 5, 70, "Input",ExpressionUUID->"1405297b-eb7c-499c-bc4d-029c22961bd1"], Cell[86624, 2317, 146, 2, 70, "Text",ExpressionUUID->"268f9476-5748-47d1-b56e-3ca1ad242c56", CellID->2132013242], Cell[CellGroupData[{ Cell[86795, 2323, 193, 6, 70, "Input",ExpressionUUID->"b0aa0dad-19f1-468b-a6f7-243abc236c0c", CellID->377600698], Cell[86991, 2331, 423, 8, 70, "Output",ExpressionUUID->"f26c367d-e2b1-4980-a379-218580025643"] }, Open ]], Cell[87429, 2342, 66, 1, 70, "Text",ExpressionUUID->"5cf186fb-9681-4504-8504-caa488aea080", CellID->595861456], Cell[CellGroupData[{ Cell[87520, 2347, 325, 9, 70, "Input",ExpressionUUID->"57ed101a-1467-41d9-8c9e-d4e0b060a385", CellID->927245031], Cell[87848, 2358, 358, 7, 70, "Output",ExpressionUUID->"2c6aa703-6fc7-4cd6-982b-a02412d9bcc5"] }, Open ]], Cell[88221, 2368, 73, 1, 70, "Text",ExpressionUUID->"23c1f91e-50cf-45ec-897e-5a563b132280", CellID->1413396266], Cell[CellGroupData[{ Cell[88319, 2373, 332, 9, 70, "Input",ExpressionUUID->"9893a50a-9cb8-4673-b1e4-ef7409d146b6", CellID->1331835622], Cell[88654, 2384, 358, 7, 70, "Output",ExpressionUUID->"89bdb116-ff59-41da-acb8-b7fad7095f48"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[89061, 2397, 103, 1, 70, "Subsection",ExpressionUUID->"c5658829-823e-4261-8f70-4c86f006e508"], Cell[89167, 2400, 242, 3, 70, "Text",ExpressionUUID->"07b5dcb5-d08e-44b2-94bc-8a284bc2a5a1"], Cell[CellGroupData[{ Cell[89434, 2407, 311, 8, 70, "Input",ExpressionUUID->"9fb817ef-b30d-4ecf-8ce0-f113a5b28927"], Cell[89748, 2417, 321, 7, 70, "Output",ExpressionUUID->"c6d5c86e-bdaa-47a0-8df7-bbe92a7a720f"] }, Open ]], Cell[90084, 2427, 120, 1, 70, "Text",ExpressionUUID->"fdf4b2a5-33c7-401c-9952-4127d5aaf618"], Cell[CellGroupData[{ Cell[90229, 2432, 317, 9, 70, "Input",ExpressionUUID->"e71a78ea-8662-4dac-a7fe-b08c20854f91"], Cell[90549, 2443, 191, 3, 70, "Output",ExpressionUUID->"ec8d108a-05b2-4e23-91fc-bbbda4ac8ef1"] }, Open ]], Cell[90755, 2449, 137, 2, 70, "Text",ExpressionUUID->"e05a795d-7cb3-423c-841c-6f45047cd2c5"], Cell[CellGroupData[{ Cell[90917, 2455, 309, 8, 70, "Input",ExpressionUUID->"bc6b7257-573e-484e-9292-d0de8ddf4b7d"], Cell[91229, 2465, 286, 6, 70, "Output",ExpressionUUID->"bce5f281-ebdd-47ec-bb75-f1f63d5e23bc"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[91564, 2477, 37, 0, 70, "Subsection",ExpressionUUID->"1f61365a-8df7-4120-b583-4f691c307437"], Cell[91604, 2479, 232, 7, 70, "Text",ExpressionUUID->"33a628c5-da3f-4c45-9ab5-b543dd34c652"], Cell[CellGroupData[{ Cell[91861, 2490, 487, 13, 70, "Input",ExpressionUUID->"e1c031a8-42a3-4d7a-8059-a6888b22f5ba"], Cell[92351, 2505, 328, 5, 70, "Output",ExpressionUUID->"3ebb9c60-1d66-429a-a5ad-3989c93fb9ab"] }, Open ]], Cell[92694, 2513, 277, 10, 70, "Text",ExpressionUUID->"8c496c6f-eedc-4a23-99c1-1d60134ff076"], Cell[CellGroupData[{ Cell[92996, 2527, 242, 7, 70, "Input",ExpressionUUID->"c6a55c2e-c9b1-4e41-bb4d-22debdb11c7a"], Cell[93241, 2536, 332, 5, 70, "Output",ExpressionUUID->"499e54de-4c20-4062-adf4-0b0075fcce0c"] }, Open ]], Cell[93588, 2544, 51, 0, 70, "Text",ExpressionUUID->"85411492-8275-4c78-a80a-a41122d92384"], Cell[CellGroupData[{ Cell[93664, 2548, 98, 2, 70, "Input",ExpressionUUID->"762b1ed9-1ffc-4e55-8db5-bb8efd68ebbd"], Cell[93765, 2552, 266, 4, 70, "Output",ExpressionUUID->"e79a58df-cfb2-4eb6-9f42-19710f74504f"] }, Open ]], Cell[94046, 2559, 151, 3, 70, "Text",ExpressionUUID->"6a597130-e003-4435-9d31-17934ce3e768"], Cell[CellGroupData[{ Cell[94222, 2566, 290, 7, 70, "Input",ExpressionUUID->"6d50f9d2-a542-4720-880e-890b5895c017"], Cell[94515, 2575, 267, 4, 70, "Output",ExpressionUUID->"336bf156-146e-4445-9770-3134009436e2"] }, Open ]], Cell[94797, 2582, 51, 0, 70, "Text",ExpressionUUID->"159ae36d-05b4-4bb5-b7bf-aba5ac3e9c7f"], Cell[CellGroupData[{ Cell[94873, 2586, 197, 6, 70, "Input",ExpressionUUID->"8b8c72d6-089c-4df8-9235-31d8eb15e4e6"], Cell[95073, 2594, 35255, 736, 70, "Output",ExpressionUUID->"d99140fe-2338-414e-94a9-d22301f41557"] }, Open ]] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)