(* 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[ 139474, 3511] NotebookOptionsPosition[ 131425, 3361] NotebookOutlinePosition[ 131781, 3378] CellTagsIndexPosition[ 131738, 3375] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["GloVe 50-Dimensional Word Vectors Trained on Tweets", \ "ResourceExampleTitle", ShowCellBracket->False, CellMargins->{{27, Inherited}, {10, 30}}, CellGroupingRules->{"TitleGrouping", 0}, PageBreakBelow->False, ShowAutoSpellCheck->False, LineSpacing->{1, 4}, MenuSortingValue->1100, MenuCommandKey->"1", FontFamily->"Source Sans Pro SemiBold", FontSize->32, FontTracking->-0.5, FontColor->RGBColor[{ Rational[31, 85], Rational[146, 255], Rational[11, 85]}]], Cell["Represent words as vectors", "ResourceExampleSubtitle", ShowCellBracket->False, CellMargins->{{27, Inherited}, {0, 0}}, CellGroupingRules->{"TitleGrouping", 10}, PageBreakBelow->False, ShowAutoSpellCheck->False, CounterIncrements->"Subtitle", MenuSortingValue->1550, FontFamily->"Source Sans Pro Light", FontSize->26, FontSlant->Italic, FontColor->RGBColor[{ Rational[1, 3], Rational[1, 3], Rational[1, 3]}]], Cell[CellGroupData[{ Cell["Resource retrieval", "Subsection"], Cell["Get the pre-trained net:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"NetModel", "[", "\"\\"", "]"}]], "Input", CellChangeTimes->{ 3.713712265065423*^9, 3.713712438999467*^9, 3.713712513945034*^9, { 3.713712563877982*^9, 3.713712590866459*^9}}, CellLabel->"In[46]:="], 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["50", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Class count\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["1193515", "SummaryItem"]}}, BaselinePosition -> Automatic, GridBoxAlignment -> { "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> { "Columns" -> {{2}}, "Rows" -> {{Automatic}}}]}}, BaselinePosition -> {1, 3}, GridBoxAlignment -> {"Rows" -> {{Top}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> {"Columns" -> { Offset[0.], { Offset[0.5599999999999999]}, Offset[0.]}, "Rows" -> { Offset[0.], { Offset[0.4]}, Offset[0.]}}], True -> GridBox[{{ PaneBox[ ButtonBox[ DynamicBox[ FEPrivate`FrontEndResource[ "FEBitmaps", "SquareMinusIconMedium"], ImageSizeCache -> {12., {0., 12.}}], Appearance -> None, ButtonFunction :> (Typeset`open = False), Evaluator -> Automatic, Method -> "Preemptive"], Alignment -> {Center, Center}, ImageSize -> {Automatic, 24}], GraphicsBox[ GraphicsComplexBox[{{0, 0}, {-0.5, 1}, {0.5, 1}, {1.5, 1}, {1, 0}}, {{ Opacity[0.3], LineBox[{{1, 2}, {1, 3}, {1, 4}, {5, 2}, {5, 3}, {5, 4}}]}, { RGBColor[0.33, 0.33, 0.33], AbsolutePointSize[5], PointBox[{1, 5, 2, 3, 4}]}}], ImageSize -> 37], GridBox[{{ ItemBox[ StyleBox["Parameters", FontWeight -> Bold]], ItemBox[""]}, { StyleBox[ TemplateBox[{"\"Output dimension\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["50", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Class count\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["1193515", "SummaryItem"]}, { ItemBox[ StyleBox["Arrays", FontWeight -> Bold], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]], ItemBox[ StyleBox[ GraphicsBox[{}, BaselinePosition -> (Scaled[0.] -> Baseline), ImageSize -> {1, 11}], CacheGraphics -> False], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]]}, { StyleBox[ TemplateBox[{"\"Weights\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox[ TemplateBox[{"\"matrix\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{ "\[Times]", "\"\[Times]\"", "\"1193515\"", "\"50\""}, "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], "\"50\""}, "RowWithSeparators"], "\"\[VeryThinSpace]\"", "\")\""}, "RowDefault"], GrayLevel[0.5], StripOnInput -> False]}, "RowDefault"], "SummaryItem"]}}, BaselinePosition -> {2, 1}, GridBoxAlignment -> { "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> { "Columns" -> {{2}}, "Rows" -> {{Automatic}}}]}}, BaselinePosition -> {1, 3}, GridBoxAlignment -> {"Rows" -> {{Top}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> {"Columns" -> { Offset[0.], { Offset[0.5599999999999999]}, Offset[0.]}, "Rows" -> { Offset[0.], { Offset[0.4]}, Offset[0.]}}]}, Dynamic[Typeset`open], ImageSize -> Automatic], BaseStyle -> { ShowStringCharacters -> False, NumberMarks -> False, PrintPrecision -> 3, ShowSyntaxStyles -> False}, BaselinePosition -> Baseline]], StyleBox["]", "NonInterpretableSummary"]}]}, "CopyTag", DisplayFunction->(#& ), InterpretationFunction->("EmbeddingLayer[<>]"& )], False, Editable->False, SelectWithContents->True, Selectable->False]], "Output", CellChangeTimes->{{3.713707064306293*^9, 3.713707069030796*^9}, { 3.713712267745913*^9, 3.713712273389896*^9}, 3.7144139245247517`*^9, 3.7144148863826427`*^9, 3.7290349140823565`*^9, 3.735061233040863*^9, 3.75138018350863*^9, 3.7536391239090557`*^9, 3.761566104230947*^9}, CellLabel->"Out[46]="] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Basic usage", "Subsection", CellChangeTimes->{{3.724526625833316*^9, 3.724526634869561*^9}}], Cell["Use the net to obtain a list of word vectors:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"vectors", "=", RowBox[{ RowBox[{ "NetModel", "[", "\"\\"", "]"}], "[", "\"\\"", "]"}]}]], "Input", CellChangeTimes->{ 3.7137122784550734`*^9, 3.713712439005827*^9, 3.713712513949595*^9, { 3.7137125638817987`*^9, 3.7137125908699293`*^9}}, CellLabel->"In[47]:=", CellID->547578203], Cell[BoxData[ InterpretationBox[ TagBox[ FrameBox[GridBox[{ { ItemBox[ TagBox[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.2875100076198578`", ",", "0.3132300078868866`", ",", RowBox[{"-", "0.293179988861084`"}], ",", "0.17199000716209412`", ",", RowBox[{"-", "0.6923199892044067`"}], ",", RowBox[{"-", "0.4593000113964081`"}], ",", "1.336400032043457`", ",", TemplateBox[{"36"}, "OutputSizeLimit`Skeleton"], ",", "0.9651399850845337`", ",", RowBox[{"-", "0.18213999271392822`"}], ",", "0.3773300051689148`", ",", RowBox[{"-", "0.19621999561786652`"}], ",", RowBox[{"-", "0.12230999767780304`"}], ",", RowBox[{"-", "0.10496000200510025`"}], ",", "0.4538800120353699`"}], "}"}], ",", 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->{59., {2., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLText", StripOnInput->False], StyleBox[ DynamicBox[ ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeExplanation"], StandardForm]], DynamicUpdating -> True, LineIndent -> 0, LinebreakAdjustments -> {1., 100, 0, 0, 0}, LineSpacing -> {1, 2}, StripOnInput -> False]], Annotation[#, Style[ Dynamic[ FEPrivate`FrontEndResource["FEStrings", "sizeExplanation"]], DynamicUpdating -> True, LineIndent -> 0, LinebreakAdjustments -> {1., 100, 0, 0, 0}, LineSpacing -> {1, 2}], "Tooltip"]& ], Alignment->Center, BaselinePosition->Baseline, ImageSize->{Automatic, {25, Full}}], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowLess"], StandardForm], ImageSizeCache->{54., {0., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControl", StripOnInput->False], True-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowLess"], StandardForm]], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControlActive", StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], Alignment->Center, FrameMargins->0, ImageSize->{Automatic, {25, Full}}], Appearance->None, BaselinePosition->Baseline, ButtonFunction:>OutputSizeLimit`ButtonFunction[ OutputSizeLimit`Defer, 47, 31494039627119166959, 5/2], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], StandardForm], ImageSizeCache->{62., {0., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControl", StripOnInput->False], True-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], StandardForm]], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControlActive", StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], Alignment->Center, FrameMargins->0, ImageSize->{Automatic, {25, Full}}], Appearance->None, BaselinePosition->Baseline, ButtonFunction:>OutputSizeLimit`ButtonFunction[ OutputSizeLimit`Defer, 47, 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, 47, 31494039627119166959, Infinity], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], StandardForm], ImageSizeCache->{82., {0., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControl", StripOnInput->False], True-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], StandardForm]], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControlActive", StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], Alignment->Center, FrameMargins->0, ImageSize->{Automatic, {25, Full}}], Appearance->None, BaselinePosition->Baseline, ButtonFunction:>FrontEndExecute[{ FrontEnd`SetOptions[ FrontEnd`$FrontEnd, FrontEnd`PreferencesSettings -> {"Page" -> "Advanced"}], FrontEnd`FrontEndToken["PreferencesDialog"]}], Evaluator->None, Method->"Preemptive"]} }, AutoDelete->False, FrameStyle->GrayLevel[0.85], GridBoxDividers->{"Columns" -> {False, {True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{2}}}]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{False}}, "Rows" -> {{False}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{1.}}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "Rows" -> { Offset[0.2], Offset[1.2], { Offset[0.4]}, Offset[0.2]}}], BaseStyle->"OutputSizeLimit", FrameMargins->{{12, 12}, {0, 15}}, FrameStyle->GrayLevel[0.85], RoundingRadius->5, StripOnInput->False], Deploy, DefaultBaseStyle->"Deploy"], If[31494039627119166959 === $SessionID, Out[47], Message[ MessageName[Syntax, "noinfoker"]]; Missing["NotAvailable"]; Null]]], "Output", CellChangeTimes->{3.7137070715637283`*^9, 3.714413931380006*^9, 3.7144148934073563`*^9, 3.729034919932357*^9, 3.751380215591419*^9, 3.753639152938036*^9, 3.7614964178208933`*^9, 3.761566133520335*^9}, CellLabel->"Out[47]="] }, Open ]], Cell["Obtain the dimensions of the vectors:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Dimensions", "[", "vectors", "]"}]], "Input", CellLabel->"In[48]:="], Cell[BoxData[ RowBox[{"{", RowBox[{"2", ",", "50"}], "}"}]], "Output", CellChangeTimes->{3.7137070716262693`*^9, 3.714413931482553*^9, 3.7144148934976997`*^9, 3.729034919947957*^9, 3.7513802156501093`*^9, 3.75363915298346*^9, 3.7615661335827503`*^9}, CellLabel->"Out[48]="] }, Open ]], Cell[TextData[{ "Use the embedding layer inside a ", Cell[BoxData[ ButtonBox["NetChain", BaseStyle->"Link", ButtonData->"ref/NetChain"]], "InlineFormula"], ":" }], "Text", CellChangeTimes->{{3.724175556813367*^9, 3.724175587082573*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"chain", "=", RowBox[{"NetChain", "[", RowBox[{"{", RowBox[{ RowBox[{ "NetModel", "[", "\"\\"", "]"}], ",", RowBox[{"LongShortTermMemoryLayer", "[", "10", "]"}]}], "}"}], "]"}]}]], "Input", CellChangeTimes->{ 3.71371228345632*^9, 3.71371243900952*^9, 3.713712513956407*^9, { 3.7137125638855352`*^9, 3.7137125908736973`*^9}}, CellLabel->"In[49]:=", CellID->429988564], Cell[BoxData[ TagBox[ TemplateBox[{RowBox[{ StyleBox[ TagBox["NetChain", "SummaryHead"], "NonInterpretableSummary"], StyleBox["[", "NonInterpretableSummary"], DynamicModuleBox[{Typeset`open = False}, PanelBox[ PaneSelectorBox[{False -> GridBox[{{ PaneBox[ ButtonBox[ DynamicBox[ FEPrivate`FrontEndResource[ "FEBitmaps", "SquarePlusIconMedium"]], ButtonFunction :> (Typeset`open = True), Appearance -> None, Evaluator -> Automatic, Method -> "Preemptive"], Alignment -> {Center, Center}, ImageSize -> {Automatic, 24}], OverlayBox[{ GraphicsBox[{ Thickness[0.014925373134328358`], { GrayLevel[0.6], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{23., 91.5}, {30., 91.5}}}, CurveClosed -> {0}]}, { GrayLevel[0.6], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{37., 91.5}, {44., 91.5}}}, CurveClosed -> {0}]}, { FaceForm[{ GrayLevel[0.9], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 103.5}, {23.5, 103.5}, {23.5, 79.5}, {15.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.6], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{24., 104.}, {15., 104.}, { 15., 79.}, {24., 79.}}, {{23., 80.}, {16., 80.}, {16., 103.}, {23., 103.}}}]}, { FaceForm[{ GrayLevel[0.9], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 29.5, 103.5}, {37.5, 103.5}, {37.5, 79.5}, {29.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.6], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 104.}, {29., 104.}, { 29., 79.}, {38., 79.}}, {{37., 80.}, {30., 80.}, {30., 103.}, {37., 103.}}}]}, { FaceForm[{ GrayLevel[0.9], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 43.5, 103.5}, {51.5, 103.5}, {51.5, 79.5}, {43.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.6], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{52., 104.}, {43., 104.}, { 43., 79.}, {52., 79.}}, {{51., 80.}, {44., 80.}, {44., 103.}, {51., 103.}}}]}, { FaceForm[{ GrayLevel[0.6], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}}}, {{{28., 91.5}, { 25., 95.}, {25., 88.}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}}}, {{{42., 91.5}, { 39., 95.}, {39., 88.}}}]}}, ImageMargins -> 0, ImageSize -> {36, Automatic}, PlotRangePadding -> 0, BaseStyle -> GrayLevel[0.6]], StyleBox["uninitialized", RGBColor[0.66, 0, 0], FontSize -> 8, FontFamily -> "Roboto", Background -> GrayLevel[1, 0.65]]}, Alignment -> {Center, Scaled[0.0001]}], GridBox[{{ StyleBox[ TemplateBox[{ TemplateBox[{ StyleBox["\"Input\"", GrayLevel[0], StripOnInput -> False], "\" \"", "\"port\""}, "RowDefault"], "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["\"string\"", "SummaryItem"]}, { StyleBox[ TemplateBox[{ TemplateBox[{ StyleBox["\"Output\"", GrayLevel[0], StripOnInput -> False], "\" \"", "\"port\""}, "RowDefault"], "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox[ TemplateBox[{"\"matrix\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{"\[Times]", "\"\[Times]\"", StyleBox["\"n\"", Italic, StripOnInput -> False], "\"10\""}, "RowWithSeparators"], "\"\[VeryThinSpace]\"", "\")\""}, "RowDefault"], GrayLevel[0.5], StripOnInput -> False]}, "RowDefault"], "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Number of layers\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["2", "SummaryItem"]}}, BaselinePosition -> {2, 1}, GridBoxAlignment -> { "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> { "Columns" -> {{2}}, "Rows" -> {{Automatic}}}]}}, GridBoxAlignment -> {"Rows" -> {{Top}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridFrameMargins -> {{0, 0}, {0, 0}}, BaselinePosition -> {1, 3}], True -> GridBox[{{ PaneBox[ ButtonBox[ DynamicBox[ FEPrivate`FrontEndResource[ "FEBitmaps", "SquareMinusIconMedium"]], ButtonFunction :> (Typeset`open = False), Appearance -> None, Evaluator -> Automatic, Method -> "Preemptive"], Alignment -> {Center, Center}, ImageSize -> {Automatic, 24}], OverlayBox[{ GraphicsBox[{ Thickness[0.014925373134328358`], { GrayLevel[0.6], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{23., 91.5}, {30., 91.5}}}, CurveClosed -> {0}]}, { GrayLevel[0.6], Thickness[0.018686567164179105`], Opacity[1.], JoinForm[{"Miter", 10.}], JoinedCurveBox[{{{0, 2, 0}}}, {{{37., 91.5}, {44., 91.5}}}, CurveClosed -> {0}]}, { FaceForm[{ GrayLevel[0.9], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 15.5, 103.5}, {23.5, 103.5}, {23.5, 79.5}, {15.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.6], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{24., 104.}, {15., 104.}, { 15., 79.}, {24., 79.}}, {{23., 80.}, {16., 80.}, {16., 103.}, {23., 103.}}}]}, { FaceForm[{ GrayLevel[0.9], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 29.5, 103.5}, {37.5, 103.5}, {37.5, 79.5}, {29.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.6], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{38., 104.}, {29., 104.}, { 29., 79.}, {38., 79.}}, {{37., 80.}, {30., 80.}, {30., 103.}, {37., 103.}}}]}, { FaceForm[{ GrayLevel[0.9], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{ 43.5, 103.5}, {51.5, 103.5}, {51.5, 79.5}, {43.5, 79.5}}}]}, { FaceForm[{ GrayLevel[0.6], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}, {{0, 2, 0}, {0, 1, 0}, {0, 1, 0}}}, {{{52., 104.}, {43., 104.}, { 43., 79.}, {52., 79.}}, {{51., 80.}, {44., 80.}, {44., 103.}, {51., 103.}}}]}, { FaceForm[{ GrayLevel[0.6], Opacity[1.]}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}}}, {{{28., 91.5}, { 25., 95.}, {25., 88.}}}], FilledCurveBox[{{{0, 2, 0}, {0, 1, 0}}}, {{{42., 91.5}, { 39., 95.}, {39., 88.}}}]}}, ImageMargins -> 0, ImageSize -> {36, Automatic}, PlotRangePadding -> 0, BaseStyle -> GrayLevel[0.6]], StyleBox["uninitialized", RGBColor[0.66, 0, 0], FontSize -> 8, FontFamily -> "Roboto", Background -> GrayLevel[1, 0.65]]}, Alignment -> {Center, Scaled[0.0001]}], GridBox[{{ TagBox[ GridBox[{{"\"\"", "\"Input\"", TagBox[ GridBox[{{"\"string\""}, { TemplateBox[{"\"vector of \"", StyleBox["\"n\"", Italic, StripOnInput -> False], "\" \"", TemplateBox[{"\"indices\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"range\"", "\":\"", "\" \"", TemplateBox[{"1", "\"..\"", "1193515"}, "RowDefault"], "\"\[VeryThinSpace]\"", "\")\""}, "RowDefault"], GrayLevel[0.5], StripOnInput -> False]}, "RowDefault"]}, "RowDefault"]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, BaselinePosition -> 2, DefaultBaseStyle -> "Column", GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"]}, { StyleBox["\"1\"", GrayLevel[0.5], StripOnInput -> False], StyleBox["EmbeddingLayer", GrayLevel[0], StripOnInput -> False], TemplateBox[{"\"matrix\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{"\[Times]", "\"\[Times]\"", StyleBox["\"n\"", Italic, StripOnInput -> False], "\"50\""}, "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.714413931710331*^9, 3.714414893727049*^9, 3.729034921242757*^9, 3.7513802157103558`*^9, 3.753639153834031*^9, 3.761566133612256*^9}, CellLabel->"Out[49]="] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Feature visualization", "Subsection", CellChangeTimes->{3.724526638742426*^9}], Cell["Create two lists of related words:", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"animals", "=", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ";"}]], "Input", CellLabel->"In[50]:="], Cell[BoxData[ RowBox[{ RowBox[{"fruits", "=", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ";"}]], "Input", CellLabel->"In[51]:="], Cell["\<\ Visualize relationships between the words using the net as a feature \ extractor:\ \>", "Text", CellID->2141353759], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"FeatureSpacePlot", "[", RowBox[{ RowBox[{"Join", "[", RowBox[{"animals", ",", "fruits"}], "]"}], ",", RowBox[{"FeatureExtractor", "\[Rule]", RowBox[{ "NetModel", "[", "\"\\"", "]"}]}]}], "]"}]], "Input", CellChangeTimes->{ 3.713712288233203*^9, 3.713712439018612*^9, 3.713712513963525*^9, { 3.7137125638922567`*^9, 3.7137125908799143`*^9}}, CellLabel->"In[52]:=", CellID->1277887787], Cell[BoxData[ GraphicsBox[{{}, { {Opacity[0], PointBox[CompressedData[" 1:eJwlkUsoRFEcxo8xHjGmueM1rK6kEEopj0lztzI2koXIpYSS1+KGSW5mIRbK kpJbZG2BZpKcbBgbMvIsc/PeeMv7df/f3Lp9/c79vv/5zrkZzV3VLSbGWLbx khoPd3wkS4bqe3mMVJu1WMFCyd+aoWLzbxSxGIh+dRkqzzvxnTlMJm6IlDIe Cb+vapf8+pwb81jp2BX5WcW0GXnP8x+xGjKnEvOFuQD5tcGdI1rXG4JP0O+p dPgttfCL92I8sdruiEBuewjztesssLYYsJFKysYd9jvwm7BengtVlyQ7+u33 fKJ/63441+c9A1uKBGK58bDVhfsQEjHPnPmCeU0jH+F+OY/o3zGBPvLm8gP1 l/qfz5Fb9UbjPrYUOykbeY8k5ba3VFIxVPUIf70r7HPJx5STanYukedDWOdb A8mkmnN+Bd/1fBvW3coDehR0JBHrt94DmseL/WA2eYg++nsIfpVbr4llT3iu Vpdmhq/7NA48O7yO87QoMeDeyh/0aPsCy6/aJeXVhVgBuU3fCf5HzChYC5Yd 4zzcmY5+yvAF7kteTMT57C83uN9OAftJM0Ercu7CBPRPqIzg/8qxurk= "]]}, { {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], {5.493258476257324, 2.02189040184021}, {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], {3.756171464920044, -1.9511889219284058}, {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], {2.7492105960845947, 1.3766566514968872}, {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], {3.779125928878784, -2.2510223388671875}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Bird\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {2.44437837600708, -0.2859937846660614}, {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], {5.32484769821167, 0.7043728828430176}, {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], {2.5767993927001953, 1.9969435930252075}, {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], {5.754758834838867, -0.2003384530544281}, {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], {0.40335026383399963, 1.1766031980514526}, {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], {6.651355266571045, 1.9585076570510864}, {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.3910810947418213, 2.1369199752807617}, {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], {5.374815940856934, 2.143508195877075}, {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], {4.1969780921936035, 0.9618483781814575}, {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], {2.3407421112060547, 2.270625352859497}, {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], {4.563192367553711, 1.6527928113937378}, {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.229689359664917, 0.5785487294197083}, {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], {4.300828456878662, 0.002910791663452983}, {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.766695976257324, 1.2585489749908447}, {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], {1.5955514907836914, 1.0725992918014526}, {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], {3.44600772857666, -1.04462468624115}, {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], {0.6234709024429321, -2.814326763153076}, {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], {-4.616005897521973, -2.4963512420654297}, {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], {-5.991274833679199, -1.0815116167068481}, {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], {-2.780937671661377, 0.4121244549751282}, {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], {0.6816807985305786, -2.8123793601989746}, {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], {-5.3699140548706055, 0.10800526291131973}, {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.044800758361816, 1.0288817882537842}, {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], {-5.105647563934326, -0.3674273192882538}, {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], {-5.180876731872559, -1.0528802871704102}, {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], {-4.218722820281982, -0.7205507755279541}, {0, 0}], InsetBox[ PaneBox[ FrameBox[ StyleBox["\<\"Turnip\"\>", StripOnInput->False, Opacity->1, FontOpacity->1, $CellContext`LineOpacity -> 1, $CellContext`FrontFaceOpacity -> 1, $CellContext`BackFaceOpacity -> 1], LabelStyle -> {}, Frame -> True, Background->Directive[ Opacity[0]], BaselinePosition->Automatic, ContentPadding->False, FrameMargins->2, FrameStyle->None, RoundingRadius->4, StripOnInput->False], FrameMargins->0], {-2.8122470378875732, -2.5123798847198486}, {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.358612060546875, 0.14461179077625275}, {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.9328107833862305, 1.830919861793518}, {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], {-2.997758388519287, -0.6758987307548523}, {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], {-4.258485794067383, 0.4331531524658203}, {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], {-4.383816242218018, -0.40984049439430237}, {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], {-6.558350563049316, 0.6409257650375366}, {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.9261474609375, 0.7797938585281372}, {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], {-3.2585113048553467, -3.8533310890197754}, {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], {-3.6490719318389893, -2.1616475582122803}, {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.714413937738772*^9, 3.7144148987956142`*^9, 3.7290349268899565`*^9, 3.7536391541789513`*^9, 3.761566133985607*^9}, CellLabel->"Out[52]="] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Word analogies", "Subsection", CellChangeTimes->{3.7245266445822153`*^9}], Cell["Get the pre-trained net:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"net", "=", RowBox[{ "NetModel", "[", "\"\\"", "]"}]}]], "Input", CellChangeTimes->{ 3.713712292248629*^9, 3.7137124390246687`*^9, 3.7137125139715033`*^9, { 3.713712563898308*^9, 3.713712590883481*^9}}, CellLabel->"In[53]:=", 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["50", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Class count\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["1193515", "SummaryItem"]}}, BaselinePosition -> Automatic, GridBoxAlignment -> { "Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> { "Columns" -> {{2}}, "Rows" -> {{Automatic}}}]}}, GridBoxAlignment -> {"Rows" -> {{Top}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridFrameMargins -> {{0, 0}, {0, 0}}, BaselinePosition -> {1, 3}], True -> GridBox[{{ PaneBox[ ButtonBox[ DynamicBox[ FEPrivate`FrontEndResource[ "FEBitmaps", "SquareMinusIconMedium"]], ButtonFunction :> (Typeset`open = False), Appearance -> None, Evaluator -> Automatic, Method -> "Preemptive"], Alignment -> {Center, Center}, ImageSize -> {Automatic, 24}], GraphicsBox[ GraphicsComplexBox[{{0, 0}, {-0.5, 1}, {0.5, 1}, {1.5, 1}, {1, 0}}, {{ Opacity[0.3], LineBox[{{1, 2}, {1, 3}, {1, 4}, {5, 2}, {5, 3}, {5, 4}}]}, { AbsolutePointSize[5], RGBColor[0.33, 0.33, 0.33], PointBox[{1, 5, 2, 3, 4}]}}], ImageSize -> 37], GridBox[{{ ItemBox[ StyleBox["Parameters", Bold]], ItemBox[""]}, { StyleBox[ TemplateBox[{"\"Output dimension\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["50", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Class count\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["1193515", "SummaryItem"]}, { ItemBox[ StyleBox["Arrays", Bold], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]], ItemBox[ StyleBox[ GraphicsBox[{}, ImageSize -> {1, 11}, BaselinePosition -> (Scaled[0.] -> Baseline)], "CacheGraphics" -> False], Frame -> {{False, False}, {False, True}}, FrameStyle -> GrayLevel[0.85]]}, { StyleBox[ TemplateBox[{"\"Weights\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox[ TemplateBox[{"\"matrix\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{ "\[Times]", "\"\[Times]\"", "\"1193515\"", "\"50\""}, "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], "\"50\""}, "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.7144139429402*^9, 3.714414902852474*^9, 3.729034927903957*^9, 3.7513802157813787`*^9, 3.753639154224682*^9, 3.7615661339987993`*^9}, CellLabel->"Out[53]="] }, Open ]], Cell["Get a list of words:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"words", "=", RowBox[{ RowBox[{"NetExtract", "[", RowBox[{"net", ",", "\"\\""}], "]"}], "[", RowBox[{"[", "\"\\"", "]"}], "]"}]}]], "Input", CellLabel->"In[54]:="], Cell[BoxData[ InterpretationBox[ TagBox[ FrameBox[GridBox[{ { ItemBox[ TagBox[ RowBox[{"{", RowBox[{"\<\"\"\>", ",", "\<\".\"\>", ",", "\<\":\"\>", ",", "\<\"rt\"\>", ",", "\<\",\"\>", ",", "\<\"\"\>", ",", "\<\"\"\>", ",", "\<\"\"\>", ",", "\<\"\"\>", ",", "\<\"!\"\>", ",", "\<\"i\"\>", ",", "\<\"a\"\>", ",", "\<\"\\\"\"\>", ",", "\<\"the\"\>", ",", "\<\"?\"\>", ",", "\<\"you\"\>", ",", "\<\"to\"\>", ",", "\<\"(\"\>", ",", "\<\"\"\>", ",", "\<\"\"\>", ",", "\<\")\"\>", ",", TemplateBox[{"1193472"}, "OutputSizeLimit`Skeleton"], ",", "\<\"\:fed3\:064e\:fefc\"\>", ",", "\<\"\:fed7\:fef3\:062f\"\>", ",", "\<\"\:fedf\:0647\:0622\"\>", ",", "\<\"\:fedf\:06c1\:0651\"\>", ",", "\<\"\:feeb\:064e\:feac\:fe8d\"\>", ",", "\<\"\:fef7\:fee7\:fef2\"\>", ",", "\<\"\:ff19\:6708\:ff19\:65e5\:306f\:30ab\:30fc\:30cd\:30eb\ \:306e\:8a95\:751f\:65e5\"\>", ",", "\<\"\:ff42\:3075\:3041\:3044\:3068\:3063\"\>", ",", "\<\"\:ff47\:ff41\:ff4d\:ff45\"\>", ",", "\<\"\:ff71\:ff91\:ff88\:ff7c\:ff71\"\>", ",", "\<\"\:ff74\:ff74\"\>", ",", "\<\"\:ff76\:ff9e\:ff98\:ff76\:ff9e\:ff98\"\>", ",", "\<\"\:ff77\:ff72\"\>", ",", "\<\"\:ff79\:ff9e\:ff7c\:ff6f\"\>", ",", "\<\"\:ff83\:ff8d\:ff8d\:ff9f\:ff9b\:ff6f\"\>", ",", "\<\"\:ff83\:ff9e\:ff93\"\>", ",", "\<\"\:ff8a\:ff9e\:ff72\:ff8a\:ff9e\:ff70\:ff72\"\>", ",", "\<\"\:ff8a\:ff9f\:ff9d\:ff81\"\>", ",", "\<\"\:ff94\:ff92\:ff80\:ff8f\:ff74\"\>", ",", "\<\"\:ff96\:ff72\:ff7c\:ff6e\:ff6f\"\>", ",", "\<\"\:ff9f\:ff9f\:ff9f\:ff75\:ff94\:ff7d\:ff90\:ff70\"\>"}], "}"}], Short[#, 5]& ], BaseStyle->{Deployed -> False}, StripOnInput->False]}, {GridBox[{ { PaneBox[ TagBox[ TooltipBox[ StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource[ "FEStrings", "sizeBriefExplanation"], StandardForm], ImageSizeCache->{59., {2., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLText", StripOnInput->False], StyleBox[ DynamicBox[ ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeExplanation"], StandardForm]], DynamicUpdating -> True, LineIndent -> 0, LinebreakAdjustments -> {1., 100, 0, 0, 0}, LineSpacing -> {1, 2}, StripOnInput -> False]], Annotation[#, Style[ Dynamic[ FEPrivate`FrontEndResource["FEStrings", "sizeExplanation"]], DynamicUpdating -> True, LineIndent -> 0, LinebreakAdjustments -> {1., 100, 0, 0, 0}, LineSpacing -> {1, 2}], "Tooltip"]& ], Alignment->Center, BaselinePosition->Baseline, ImageSize->{Automatic, {25, Full}}], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowLess"], StandardForm], ImageSizeCache->{54., {0., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControl", StripOnInput->False], True-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowLess"], StandardForm]], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControlActive", StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], Alignment->Center, FrameMargins->0, ImageSize->{Automatic, {25, Full}}], Appearance->None, BaselinePosition->Baseline, ButtonFunction:>OutputSizeLimit`ButtonFunction[ OutputSizeLimit`Defer, 54, 31494039627119166959, 5/2], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], StandardForm], ImageSizeCache->{62., {0., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControl", StripOnInput->False], True-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], StandardForm]], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControlActive", StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], Alignment->Center, FrameMargins->0, ImageSize->{Automatic, {25, Full}}], Appearance->None, BaselinePosition->Baseline, ButtonFunction:>OutputSizeLimit`ButtonFunction[ OutputSizeLimit`Defer, 54, 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, 54, 31494039627119166959, Infinity], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], StandardForm], ImageSizeCache->{82., {0., 8.}}], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControl", StripOnInput->False], True-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], StandardForm]], StripOnInput->False, DynamicUpdating->True, LineSpacing->{1, 2}, LineIndent->0, LinebreakAdjustments->{1., 100, 0, 0, 0}], "OSLControlActive", StripOnInput->False]}, Dynamic[ CurrentValue["MouseOver"]], Alignment->Center, FrameMargins->0, ImageSize->{Automatic, {25, Full}}], Appearance->None, BaselinePosition->Baseline, ButtonFunction:>FrontEndExecute[{ FrontEnd`SetOptions[ FrontEnd`$FrontEnd, FrontEnd`PreferencesSettings -> {"Page" -> "Advanced"}], FrontEnd`FrontEndToken["PreferencesDialog"]}], Evaluator->None, Method->"Preemptive"]} }, AutoDelete->False, FrameStyle->GrayLevel[0.85], GridBoxDividers->{"Columns" -> {False, {True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{2}}}]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{False}}, "Rows" -> {{False}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{1.}}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "Rows" -> { Offset[0.2], Offset[1.2], { Offset[0.4]}, Offset[0.2]}}], BaseStyle->"OutputSizeLimit", FrameMargins->{{12, 12}, {0, 15}}, FrameStyle->GrayLevel[0.85], RoundingRadius->5, StripOnInput->False], Deploy, DefaultBaseStyle->"Deploy"], If[31494039627119166959 === $SessionID, Out[54], Message[ MessageName[Syntax, "noinfoker"]]; Missing["NotAvailable"]; Null]]], "Output", CellChangeTimes->{3.713707087038406*^9, 3.71441394491651*^9, 3.7144149048328867`*^9, 3.729034929557557*^9, 3.751380217606842*^9, 3.7536391559027777`*^9, 3.7615661356367617`*^9}, CellLabel->"Out[54]="] }, 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.7513801601125317`*^9, 3.751380161255143*^9}}, CellLabel->"In[55]:="], 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[56]:="], Cell["Find the eight nearest words to \"king\":", "Text", CellChangeTimes->{{3.72452666722305*^9, 3.724526667749542*^9}}, CellID->2132013242], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Nearest", "[", RowBox[{"word2vec", ",", RowBox[{"word2vec", "[", "\"\\"", "]"}], ",", "8"}], "]"}]], "Input",\ CellLabel->"In[57]:=", CellID->377600698], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"king\"\>", ",", "\<\"prince\"\>", ",", "\<\"aka\"\>", ",", "\<\"jack\"\>", ",", "\<\"mr.\"\>", ",", "\<\"jimmy\"\>", ",", "\<\"hero\"\>", ",", "\<\"jackson\"\>"}], "}"}]], "Output", CellChangeTimes->{3.713707089826395*^9, 3.714413947804858*^9, 3.714414907631241*^9, 3.729034942786357*^9, 3.7513802206759977`*^9, 3.753639158410294*^9, 3.761566138157054*^9}, CellLabel->"Out[57]="] }, 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[58]:=", CellID->927245031], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"stone\"\>", ",", "\<\"meets\"\>", ",", "\<\"queen\"\>", ",", "\<\"king\"\>", ",", "\<\"royal\"\>"}], "}"}]], "Output", CellChangeTimes->{3.7137070908926897`*^9, 3.714413948769719*^9, 3.714414908583749*^9, 3.729034943659957*^9, 3.751380221835082*^9, 3.75363915934464*^9, 3.7615661391188173`*^9}, CellLabel->"Out[58]="] }, 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[59]:=", CellID->1331835622], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"london\"\>", ",", "\<\"germany\"\>", ",", "\<\"melbourne\"\>", ",", "\<\"sydney\"\>", ",", "\<\"australia\"\>"}], "}"}]], "Output", CellChangeTimes->{3.713707091862473*^9, 3.714413949795107*^9, 3.714414909616008*^9, 3.7290349445179567`*^9, 3.751380222977515*^9, 3.753639160319027*^9, 3.761566140093706*^9}, CellLabel->"Out[59]="] }, 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.735304951326489*^9}, CellLabel->"In[60]:="], Cell[BoxData[ RowBox[{"\[LeftAssociation]", RowBox[{ RowBox[{"{", "\<\"Weights\"\>", "}"}], "\[Rule]", "59675750"}], "\[RightAssociation]"}]], "Output", CellChangeTimes->{3.733052474940061*^9, 3.735304954410913*^9, 3.751380223031374*^9, 3.7536391603288918`*^9, 3.761566140103095*^9}, CellLabel->"Out[60]="] }, 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.735304949310945*^9}, CellLabel->"In[61]:="], Cell[BoxData["59675750"], "Output", CellChangeTimes->{3.733052474988936*^9, 3.735304954501706*^9, 3.751380223071417*^9, 3.753639160359133*^9, 3.761566140136531*^9}, CellLabel->"Out[61]="] }, 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.735304948112074*^9}, CellLabel->"In[62]:="], Cell[BoxData[ RowBox[{"\[LeftAssociation]", RowBox[{"EmbeddingLayer", "\[Rule]", "1"}], "\[RightAssociation]"}]], "Output", CellChangeTimes->{3.733052475040373*^9, 3.735304954541052*^9, 3.751380223079794*^9, 3.7536391603677597`*^9, 3.7615661401872177`*^9}, CellLabel->"Out[62]="] }, 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.724526659609247*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"jsonPath", "=", RowBox[{"Export", "[", RowBox[{ RowBox[{"FileNameJoin", "[", RowBox[{"{", RowBox[{"$TemporaryDirectory", ",", "\"\\""}], "}"}], "]"}], ",", RowBox[{ "NetModel", "[", "\"\\"", "]"}], ",", "\"\\""}], "]"}]}]], "Input", CellChangeTimes->{ 3.713712302144353*^9, 3.7137124390312243`*^9, 3.713712513980206*^9, { 3.713712563904804*^9, 3.7137125908504972`*^9}}, CellLabel->"In[63]:="], Cell[BoxData["\<\"/private/var/folders/pz/94mxs33x2l512z6wtjbthvy0000_ck/T/\ net.json\"\>"], "Output", CellChangeTimes->{3.713707095322916*^9, 3.714413964226924*^9, 3.7144149188491793`*^9, 3.729034950601957*^9, 3.733241180223531*^9, 3.751380223650921*^9, 3.7536391608942003`*^9, 3.761566140688572*^9}, CellLabel->"Out[63]="] }, 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.72452666228046*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"paramPath", "=", RowBox[{"FileNameJoin", "[", RowBox[{"{", RowBox[{ RowBox[{"DirectoryName", "[", "jsonPath", "]"}], ",", "\"\\""}], "}"}], "]"}]}]], "Input", CellLabel->"In[64]:="], Cell[BoxData["\<\"/private/var/folders/pz/94mxs33x2l512z6wtjbthvy0000_ck/T/\ net.params\"\>"], "Output", CellChangeTimes->{3.713707095539467*^9, 3.714413964336213*^9, 3.7144149189635878`*^9, 3.7290349506175566`*^9, 3.7332411802987623`*^9, 3.751380223659895*^9, 3.753639160903104*^9, 3.7615661406972933`*^9}, CellLabel->"Out[64]="] }, Open ]], Cell["Get the size of the parameter file:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"FileByteCount", "[", "paramPath", "]"}]], "Input", CellLabel->"In[65]:="], Cell[BoxData["238703087"], "Output", CellChangeTimes->{3.713707095600053*^9, 3.714413964402884*^9, 3.714414919033608*^9, 3.729034950648757*^9, 3.733241180350224*^9, 3.751380223699891*^9, 3.753639160933172*^9, 3.761566140729969*^9}, CellLabel->"Out[65]="] }, Open ]], Cell["\<\ The size is similar to the byte count of the resource object:\ \>", "Text", CellChangeTimes->{3.7154458364438143`*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{ "ResourceObject", "[", "\"\\"", "]"}], "[", "\"\\"", "]"}]], "Input", CellChangeTimes->{ 3.713712308632401*^9, 3.713712439037232*^9, 3.71371251398592*^9, { 3.7137125638693*^9, 3.713712590857424*^9}}, CellLabel->"In[66]:="], Cell[BoxData["251678185"], "Output", CellChangeTimes->{3.713707095771419*^9, 3.714413964566161*^9, 3.7144149191840878`*^9, 3.7290349506643567`*^9, 3.733241180399006*^9, 3.751380223739295*^9, 3.7536391609641542`*^9, 3.761566140767913*^9}, CellLabel->"Out[66]="] }, Open ]], Cell["Represent the MXNet net as a graph:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Import", "[", RowBox[{"jsonPath", ",", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}]}], "]"}]], "Input", CellLabel->"In[67]:="], 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[ "\"50\"", ShowStringCharacters -> True, StripOnInput -> False]}, { StyleBox["\"input_dim\"", Bold, StripOnInput -> False], StyleBox[ "\"1193515\"", ShowStringCharacters -> True, StripOnInput -> False]}, { StyleBox["\"dtype\"", Bold, StripOnInput -> False], StyleBox[ "\"float32\"", ShowStringCharacters -> True, StripOnInput -> False]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> False, GridBoxDividers -> { "Columns" -> {False, {True}, False}, "Rows" -> {False, {True}, False}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings -> {"Columns" -> {{1.1}}, "Rows" -> {{0.5}}}, FrameStyle -> GrayLevel[0.85]], "Grid"]}, { StyleBox["\"inputs\"", Bold, StripOnInput -> False], RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"4", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "0", ",", "0"}], "}"}]}], "}"}]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> False, GridBoxDividers -> {"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize -> {"Columns" -> {{Automatic}}, "Rows" -> {{1.4}}}, GridBoxSpacings -> {"Columns" -> {{1.1}}, "Rows" -> {{0.5}}}, BaseStyle -> {FontFamily -> "Source Code Pro"}, FrameStyle -> GrayLevel[0.85]], "Grid"]], Annotation[#, Grid[{{ Style["id", Bold], 5}, { Style["name", Bold], ""}, { Style["op", Bold], "Embedding"}, { Style["param", Bold], Association[]}, { Style["attrs", Bold], Grid[{{ Style["output_dim", Bold], Style["50", ShowStringCharacters -> True]}, { Style["input_dim", Bold], Style["1193515", ShowStringCharacters -> True]}, { Style["dtype", Bold], Style["float32", ShowStringCharacters -> True]}}, Alignment -> Left, Spacings -> {1.1, 0.5}, Dividers -> Center, FrameStyle -> GrayLevel[0.85]]}, { Style["inputs", Bold], {{4, 0, 0}, {3, 0, 0}}}}, Alignment -> Left, BaseStyle -> {FontFamily -> "Source Code Pro"}, Dividers -> All, FrameStyle -> GrayLevel[0.85], Alignment -> {Left, Baseline}, Spacings -> {1.1, 0.5}, ItemSize -> {Automatic, 1.4}], "Tooltip"]& ], TagBox[ TooltipBox[{ AbsolutePointSize[6], Hue[0.08, 1, 0.7], PointBox[{3.31251, -1.31251}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "6"}, { StyleBox["\"name\"", Bold, StripOnInput -> False], "\"Output\""}, { StyleBox["\"op\"", Bold, StripOnInput -> False], "\"identity\""}, { StyleBox["\"param\"", Bold, StripOnInput -> False], RowBox[{"\[LeftAssociation]", "\[RightAssociation]"}]}, { StyleBox["\"attrs\"", Bold, StripOnInput -> False], RowBox[{"\[LeftAssociation]", "\[RightAssociation]"}]}, { StyleBox["\"inputs\"", Bold, StripOnInput -> False], RowBox[{"{", RowBox[{"{", RowBox[{"5", ",", "0", ",", "0"}], "}"}], "}"}]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> False, GridBoxDividers -> {"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize -> {"Columns" -> {{Automatic}}, "Rows" -> {{1.4}}}, GridBoxSpacings -> {"Columns" -> {{1.1}}, "Rows" -> {{0.5}}}, BaseStyle -> {FontFamily -> "Source Code Pro"}, FrameStyle -> GrayLevel[0.85]], "Grid"]], Annotation[#, Grid[{{ Style["id", Bold], 6}, { Style["name", Bold], "Output"}, { Style["op", Bold], "identity"}, { Style["param", Bold], Association[]}, { Style["attrs", Bold], Association[]}, { Style["inputs", Bold], {{5, 0, 0}}}}, Alignment -> Left, BaseStyle -> {FontFamily -> "Source Code Pro"}, Dividers -> All, FrameStyle -> GrayLevel[0.85], Alignment -> {Left, Baseline}, Spacings -> {1.1, 0.5}, ItemSize -> {Automatic, 1.4}], "Tooltip"]& ]}}, StyleBox[{{ InsetBox[ FormBox["0", TraditionalForm], Offset[{0, 5}, {0.31251000000000007`, -0.31251}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["1", TraditionalForm], Offset[{0, 5}, {0.31251000000000007`, -1.9375300000000002`}], { 0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["2", TraditionalForm], Offset[{0, 6}, {1.31251, -1.9375300000000002`}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["3", TraditionalForm], Offset[{0, 5}, {1.31251, -1.31251}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["4", TraditionalForm], Offset[{0, 6}, {1.31251, -0.31251000000000007`}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["5", TraditionalForm], Offset[{0, 6}, {2.31251, -1.31251}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["6", TraditionalForm], Offset[{0, 6}, {3.31251, -1.31251}], {0., -0.17}, Automatic, {1, 0}]}}, FontSize -> 7, StripOnInput -> False]}, ImageSize -> {198., 99.101}, AspectRatio -> Full, PlotRangePadding -> 0, ImagePadding -> {{24., 24.}, {6, 11.849999999999996`}}, ImageMargins -> 0, BaseStyle -> {TooltipBoxOptions -> {TooltipDelay -> 0.08}}],FormBox[ FormBox[ TemplateBox[{ "\"Tensor\"", "\"identity\"", "\"_PlusScalar\"", "\"Embedding\""}, "PointLegend", DisplayFunction -> (FormBox[ StyleBox[ StyleBox[ PaneBox[ TagBox[ GridBox[{{ TemplateBox[{ GraphicsBox[{{}, { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], GrayLevel[0.5], AbsolutePointSize[4]], { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], GrayLevel[0.5], AbsolutePointSize[4]], PointBox[ NCache[{ Scaled[{ Rational[1, 2], Rational[1, 2]}]}, { Scaled[{0.5, 0.5}]}]]}}}, AspectRatio -> Full, ImageSize -> {12, 12}, PlotRangePadding -> None, ImagePadding -> Automatic, BaselinePosition -> (Scaled[0.23333333333333334`] -> Baseline)], "\" \"", #}, "RowDefault"], TemplateBox[{ GraphicsBox[{{}, { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], Hue[0.08, 1, 0.7], AbsolutePointSize[6]], { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], Hue[0.08, 1, 0.7], AbsolutePointSize[6]], PointBox[ NCache[{ Scaled[{ Rational[1, 2], Rational[1, 2]}]}, { Scaled[{0.5, 0.5}]}]]}}}, AspectRatio -> Full, ImageSize -> {12, 12}, PlotRangePadding -> None, ImagePadding -> Automatic, BaselinePosition -> (Scaled[0.23333333333333334`] -> Baseline)], "\" \"", #2}, "RowDefault"], TemplateBox[{ GraphicsBox[{{}, { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], Hue[0.5, 0.33, 0.69], AbsolutePointSize[6]], { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], Hue[0.5, 0.33, 0.69], AbsolutePointSize[6]], PointBox[ NCache[{ Scaled[{ Rational[1, 2], Rational[1, 2]}]}, { Scaled[{0.5, 0.5}]}]]}}}, AspectRatio -> Full, ImageSize -> {12, 12}, PlotRangePadding -> None, ImagePadding -> Automatic, BaselinePosition -> (Scaled[0.23333333333333334`] -> Baseline)], "\" \"", #3}, "RowDefault"], TemplateBox[{ GraphicsBox[{{}, { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], Hue[0.17, 1, 0.5], AbsolutePointSize[6]], { Directive[ EdgeForm[ Directive[ Opacity[0.3], GrayLevel[0]]], PointSize[0.5], AbsoluteThickness[1.6], Hue[0.17, 1, 0.5], AbsolutePointSize[6]], PointBox[ NCache[{ Scaled[{ Rational[1, 2], Rational[1, 2]}]}, { Scaled[{0.5, 0.5}]}]]}}}, AspectRatio -> Full, ImageSize -> {12, 12}, PlotRangePadding -> None, ImagePadding -> Automatic, BaselinePosition -> (Scaled[0.23333333333333334`] -> Baseline)], "\" \"", #4}, "RowDefault"], "\"\""}}, GridBoxAlignment -> { "Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, AutoDelete -> False, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Grid"], Alignment -> Left, AppearanceElements -> None, ImageMargins -> {{2, 2}, {2, 2}}, ImageSizeAction -> "ResizeToFit"], LineIndent -> 0, StripOnInput -> False], { FontSize -> 8, FontFamily -> "Arial"}, Background -> Automatic, StripOnInput -> False], TraditionalForm]& ), InterpretationFunction :> (RowBox[{"PointLegend", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Directive", "[", RowBox[{ InterpretationBox[ ButtonBox[ TooltipBox[ GraphicsBox[{{ GrayLevel[0], RectangleBox[{0, 0}]}, { GrayLevel[0], RectangleBox[{1, -1}]}, { GrayLevel[0.5], RectangleBox[{0, -1}, {2, 1}]}}, DefaultBaseStyle -> "ColorSwatchGraphics", AspectRatio -> 1, Frame -> True, FrameStyle -> GrayLevel[0.33333333333333337`], FrameTicks -> None, PlotRangePadding -> None, ImageSize -> Dynamic[{ Automatic, 1.35 (CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[ Magnification])}]], StyleBox[ RowBox[{"GrayLevel", "[", "0.5`", "]"}], NumberMarks -> False]], Appearance -> None, BaseStyle -> {}, BaselinePosition -> Baseline, DefaultBaseStyle -> {}, ButtonFunction :> With[{Typeset`box$ = EvaluationBox[]}, If[ Not[ AbsoluteCurrentValue["Deployed"]], SelectionMove[Typeset`box$, All, Expression]; FrontEnd`Private`$ColorSelectorInitialAlpha = 1; FrontEnd`Private`$ColorSelectorInitialColor = GrayLevel[0.5]; FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; MathLink`CallFrontEnd[ FrontEnd`AttachCell[Typeset`box$, FrontEndResource["GrayLevelColorValueSelector"], { 0, {Left, Bottom}}, {Left, Top}, "ClosingActions" -> { "SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]], BaseStyle -> Inherited, Evaluator -> Automatic, Method -> "Preemptive"], GrayLevel[0.5], Editable -> False, Selectable -> False], ",", RowBox[{"AbsolutePointSize", "[", "4", "]"}]}], "]"}], ",", RowBox[{"Directive", "[", RowBox[{ InterpretationBox[ ButtonBox[ TooltipBox[ GraphicsBox[{{ GrayLevel[0], RectangleBox[{0, 0}]}, { GrayLevel[0], RectangleBox[{1, -1}]}, { Hue[0.08, 1, 0.7], RectangleBox[{0, -1}, {2, 1}]}}, DefaultBaseStyle -> "ColorSwatchGraphics", AspectRatio -> 1, Frame -> True, FrameStyle -> Hue[0.07999999999999999, 1., 0.4666666666666667], FrameTicks -> None, PlotRangePadding -> None, ImageSize -> Dynamic[{ Automatic, 1.35 (CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[ Magnification])}]], StyleBox[ RowBox[{"Hue", "[", RowBox[{"0.08`", ",", "1", ",", "0.7`"}], "]"}], NumberMarks -> False]], Appearance -> None, BaseStyle -> {}, BaselinePosition -> Baseline, DefaultBaseStyle -> {}, ButtonFunction :> With[{Typeset`box$ = EvaluationBox[]}, If[ Not[ AbsoluteCurrentValue["Deployed"]], SelectionMove[Typeset`box$, All, Expression]; FrontEnd`Private`$ColorSelectorInitialAlpha = 1; FrontEnd`Private`$ColorSelectorInitialColor = Hue[0.08, 1, 0.7]; FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; MathLink`CallFrontEnd[ FrontEnd`AttachCell[Typeset`box$, FrontEndResource["HueColorValueSelector"], { 0, {Left, Bottom}}, {Left, Top}, "ClosingActions" -> { "SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]], BaseStyle -> Inherited, Evaluator -> Automatic, Method -> "Preemptive"], Hue[0.08, 1, 0.7], Editable -> False, Selectable -> False], ",", RowBox[{"AbsolutePointSize", "[", "6", "]"}]}], "]"}], ",", RowBox[{"Directive", "[", RowBox[{ InterpretationBox[ ButtonBox[ TooltipBox[ GraphicsBox[{{ GrayLevel[0], RectangleBox[{0, 0}]}, { GrayLevel[0], RectangleBox[{1, -1}]}, { Hue[0.5, 0.33, 0.69], RectangleBox[{0, -1}, {2, 1}]}}, DefaultBaseStyle -> "ColorSwatchGraphics", AspectRatio -> 1, Frame -> True, FrameStyle -> Hue[0.5, 0.33, 0.45999999999999996`], FrameTicks -> None, PlotRangePadding -> None, ImageSize -> Dynamic[{ Automatic, 1.35 (CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[ Magnification])}]], StyleBox[ RowBox[{"Hue", "[", RowBox[{"0.5`", ",", "0.33`", ",", "0.69`"}], "]"}], NumberMarks -> False]], Appearance -> None, BaseStyle -> {}, BaselinePosition -> Baseline, DefaultBaseStyle -> {}, ButtonFunction :> With[{Typeset`box$ = EvaluationBox[]}, If[ Not[ AbsoluteCurrentValue["Deployed"]], SelectionMove[Typeset`box$, All, Expression]; FrontEnd`Private`$ColorSelectorInitialAlpha = 1; FrontEnd`Private`$ColorSelectorInitialColor = Hue[0.5, 0.33, 0.69]; FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; MathLink`CallFrontEnd[ FrontEnd`AttachCell[Typeset`box$, FrontEndResource["HueColorValueSelector"], { 0, {Left, Bottom}}, {Left, Top}, "ClosingActions" -> { "SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]], BaseStyle -> Inherited, Evaluator -> Automatic, Method -> "Preemptive"], Hue[0.5, 0.33, 0.69], Editable -> False, Selectable -> False], ",", RowBox[{"AbsolutePointSize", "[", "6", "]"}]}], "]"}], ",", RowBox[{"Directive", "[", RowBox[{ InterpretationBox[ ButtonBox[ TooltipBox[ GraphicsBox[{{ GrayLevel[0], RectangleBox[{0, 0}]}, { GrayLevel[0], RectangleBox[{1, -1}]}, { Hue[0.17, 1, 0.5], RectangleBox[{0, -1}, {2, 1}]}}, DefaultBaseStyle -> "ColorSwatchGraphics", AspectRatio -> 1, Frame -> True, FrameStyle -> Hue[0.17, 1., 0.33333333333333337`], FrameTicks -> None, PlotRangePadding -> None, ImageSize -> Dynamic[{ Automatic, 1.35 (CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[ Magnification])}]], StyleBox[ RowBox[{"Hue", "[", RowBox[{"0.17`", ",", "1", ",", "0.5`"}], "]"}], NumberMarks -> False]], Appearance -> None, BaseStyle -> {}, BaselinePosition -> Baseline, DefaultBaseStyle -> {}, ButtonFunction :> With[{Typeset`box$ = EvaluationBox[]}, If[ Not[ AbsoluteCurrentValue["Deployed"]], SelectionMove[Typeset`box$, All, Expression]; FrontEnd`Private`$ColorSelectorInitialAlpha = 1; FrontEnd`Private`$ColorSelectorInitialColor = Hue[0.17, 1, 0.5]; FrontEnd`Private`$ColorSelectorUseMakeBoxes = True; MathLink`CallFrontEnd[ FrontEnd`AttachCell[Typeset`box$, FrontEndResource["HueColorValueSelector"], { 0, {Left, Bottom}}, {Left, Top}, "ClosingActions" -> { "SelectionDeparture", "ParentChanged", "EvaluatorQuit"}]]]], BaseStyle -> Inherited, Evaluator -> Automatic, Method -> "Preemptive"], Hue[0.17, 1, 0.5], Editable -> False, Selectable -> False], ",", RowBox[{"AbsolutePointSize", "[", "6", "]"}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{#, ",", #2, ",", #3, ",", #4}], "}"}], ",", RowBox[{"LabelStyle", "\[Rule]", "8"}], ",", RowBox[{"LegendMarkerSize", "\[Rule]", "12"}], ",", RowBox[{"LegendMargins", "\[Rule]", "2"}], ",", RowBox[{"LegendLayout", "\[Rule]", "GeneralUtilities`Graphics`PackagePrivate`legendTable"}]}], "]"}]& ), Editable -> True], TraditionalForm], TraditionalForm]}, "Legended", DisplayFunction->(GridBox[{{ TagBox[ ItemBox[ PaneBox[ TagBox[#, "SkipImageSizeLevel"], Alignment -> {Center, Baseline}, BaselinePosition -> Baseline], DefaultBaseStyle -> "Labeled"], "SkipImageSizeLevel"]}, { ItemBox[#2, DefaultBaseStyle -> "LabeledLabel"]}}, GridBoxAlignment -> {"Columns" -> {{Center}}, "Rows" -> {{Center}}}, AutoDelete -> False, GridBoxItemSize -> Automatic, BaselinePosition -> {1, 1}]& ), Editable->True, InterpretationFunction->(RowBox[{"Legended", "[", RowBox[{#, ",", RowBox[{"Placed", "[", RowBox[{#2, ",", "Below"}], "]"}]}], "]"}]& )]], "Output", CellChangeTimes->{3.713707095961337*^9, 3.714413964767428*^9, 3.7144149192872257`*^9, 3.729034953441157*^9, 3.733241180465349*^9, 3.751380223854788*^9, 3.7536391610287237`*^9, 3.761566140843161*^9}, CellLabel->"Out[67]="] }, 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, 488, 16, 70, "ResourceExampleTitle",ExpressionUUID->"18c3ce1a-afab-4718-a8f9-5e11a23bb5c2", CellGroupingRules->{"TitleGrouping", 0}, PageBreakBelow->False], Cell[1071, 40, 439, 14, 70, "ResourceExampleSubtitle",ExpressionUUID->"ad6975f4-5562-45dd-825d-6192eee88147", CellGroupingRules->{"TitleGrouping", 10}, PageBreakBelow->False, CounterIncrements->"Subtitle"], Cell[CellGroupData[{ Cell[1535, 58, 40, 0, 70, "Subsection",ExpressionUUID->"a3409f12-d11e-4c73-81c9-9ecba25f9416"], Cell[1578, 60, 40, 0, 70, "Text",ExpressionUUID->"64615dff-8592-4fb7-9503-58d0abae12b9"], Cell[CellGroupData[{ Cell[1643, 64, 288, 7, 70, "Input",ExpressionUUID->"66690a12-831c-497f-911f-7ab1e8b3a2f5"], Cell[1934, 73, 8349, 180, 70, "Output",ExpressionUUID->"894f6313-b163-4a16-99ae-b5f393a6ff6f"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[10332, 259, 99, 1, 70, "Subsection",ExpressionUUID->"432ecde8-bd58-479f-b82d-d9e9285aff91"], Cell[10434, 262, 61, 0, 70, "Text",ExpressionUUID->"2e4a12a2-4eb8-40b0-8c1b-bdacb9b74f73"], Cell[CellGroupData[{ Cell[10520, 266, 397, 11, 70, "Input",ExpressionUUID->"affdf0bd-f84b-41cd-b4d2-0d5d2bbd39eb", CellID->547578203], Cell[10920, 279, 9642, 245, 70, "Output",ExpressionUUID->"05115680-914b-4c53-853b-78ed6eb86efd"] }, Open ]], Cell[20577, 527, 53, 0, 70, "Text",ExpressionUUID->"7ca999e6-ab74-45a1-98a2-026818a6806d"], Cell[CellGroupData[{ Cell[20655, 531, 93, 2, 70, "Input",ExpressionUUID->"4e96f53a-9adc-4122-a885-225552277fa5"], Cell[20751, 535, 285, 6, 70, "Output",ExpressionUUID->"9cd2afdb-ff4e-4135-bb24-a65363466642"] }, Open ]], Cell[21051, 544, 248, 8, 70, "Text",ExpressionUUID->"1d5c5f23-b44f-419f-a9d7-42e761988b4d"], Cell[CellGroupData[{ Cell[21324, 556, 496, 15, 70, "Input",ExpressionUUID->"4fca873f-b046-426c-ace1-da5e4cab6cc0", CellID->429988564], Cell[21823, 573, 15443, 321, 70, "Output",ExpressionUUID->"c8c9d449-775e-48ba-9301-9fcee486490c"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[37315, 900, 85, 1, 70, "Subsection",ExpressionUUID->"753f098a-c536-4bf1-99ca-921f05872ab3"], Cell[37403, 903, 50, 0, 70, "Text",ExpressionUUID->"b1a6ac18-a604-41d5-8814-ec2041d66070"], Cell[37456, 905, 612, 12, 70, "Input",ExpressionUUID->"24b4daef-f318-40d9-8766-62bdaae284e3"], Cell[38071, 919, 640, 12, 70, "Input",ExpressionUUID->"87f9a02e-da93-4f30-ab70-72eedd0cfd67"], Cell[38714, 933, 126, 4, 70, "Text",ExpressionUUID->"2c2fca1f-8454-46a2-82f1-71a8eb76281e", CellID->2141353759], Cell[CellGroupData[{ Cell[38865, 941, 502, 14, 70, "Input",ExpressionUUID->"77407ae0-6825-49f4-8d14-8668f5d90d2a", CellID->1277887787], Cell[39370, 957, 28410, 888, 70, "Output",ExpressionUUID->"73c11e80-b64e-4c90-9746-f8c6dae62b0e"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[67829, 1851, 80, 1, 70, "Subsection",ExpressionUUID->"87dc466d-3d1a-4763-a716-0892a5e1e0c8"], Cell[67912, 1854, 40, 0, 70, "Text",ExpressionUUID->"4cd93766-d45c-4ed6-9ed9-072c095ae874"], Cell[CellGroupData[{ Cell[67977, 1858, 343, 10, 70, "Input",ExpressionUUID->"449f1828-0a02-4dc2-a7a8-42a116fef329", CellID->1834105916], Cell[68323, 1870, 7671, 165, 70, "Output",ExpressionUUID->"fc41a226-ec7e-440f-9ace-9aef14f7f63b"] }, Open ]], Cell[76009, 2038, 36, 0, 70, "Text",ExpressionUUID->"6e37e4c2-23ef-49ed-8db5-951bba4ee86f"], Cell[CellGroupData[{ Cell[76070, 2042, 219, 6, 70, "Input",ExpressionUUID->"00fdc406-2858-4274-9459-6379451168dd"], Cell[76292, 2050, 10565, 260, 70, "Output",ExpressionUUID->"b5f1a3a3-350c-481d-b1b2-bb0ee7113571"] }, Open ]], Cell[86872, 2313, 35, 0, 70, "Text",ExpressionUUID->"f04c4cd3-3a79-4fff-a5ee-574d1a5cfdb7"], Cell[86910, 2315, 381, 11, 70, "Input",ExpressionUUID->"3efc5551-3692-41d4-9a3d-efac0fe5dffa"], Cell[87294, 2328, 117, 3, 70, "Text",ExpressionUUID->"70a2f1ca-6000-4e5c-9689-376bd9fb3c78", CellID->2068968093], Cell[87414, 2333, 181, 5, 70, "Input",ExpressionUUID->"368910a1-2e7e-43d4-9112-c6354c58ca80"], Cell[87598, 2340, 143, 2, 70, "Text",ExpressionUUID->"6772dd90-4ff3-4b96-8bc6-ae4a27eefab0", CellID->2132013242], Cell[CellGroupData[{ Cell[87766, 2346, 193, 6, 70, "Input",ExpressionUUID->"a20f3d6f-f30d-4e04-9680-628e5b6d2c7e", CellID->377600698], Cell[87962, 2354, 439, 8, 70, "Output",ExpressionUUID->"c46ef6dd-7f8b-4424-b8fe-11d3e3d4cac7"] }, Open ]], Cell[88416, 2365, 66, 1, 70, "Text",ExpressionUUID->"56d5513e-7929-457f-8c82-a7a8a8c63d9b", CellID->595861456], Cell[CellGroupData[{ Cell[88507, 2370, 325, 9, 70, "Input",ExpressionUUID->"f625841d-5c61-4ded-824a-31c75ae9f0a0", CellID->927245031], Cell[88835, 2381, 373, 7, 70, "Output",ExpressionUUID->"69273260-61a3-4ea6-9da5-b8d9ca449e4d"] }, Open ]], Cell[89223, 2391, 73, 1, 70, "Text",ExpressionUUID->"2bf7091b-f2c3-4940-99b3-03450cdc1d91", CellID->1413396266], Cell[CellGroupData[{ Cell[89321, 2396, 332, 9, 70, "Input",ExpressionUUID->"f76b45ad-194b-4a0a-83a1-2cd6e4b1ee17", CellID->1331835622], Cell[89656, 2407, 385, 7, 70, "Output",ExpressionUUID->"b51f1b2d-ea39-465f-aaac-a7a5e5cad063"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[90090, 2420, 103, 1, 70, "Subsection",ExpressionUUID->"ec5346db-cd64-4452-867d-a801daadbe2d"], Cell[90196, 2423, 242, 3, 70, "Text",ExpressionUUID->"940bdc3d-9ff8-4007-98aa-28908676173a"], Cell[CellGroupData[{ Cell[90463, 2430, 289, 8, 70, "Input",ExpressionUUID->"d640f76d-e345-47e9-ba56-716f22ce18a5"], Cell[90755, 2440, 321, 7, 70, "Output",ExpressionUUID->"95ab0536-f788-49a3-a07b-fba69f2a7bda"] }, Open ]], Cell[91091, 2450, 120, 1, 70, "Text",ExpressionUUID->"3755dff9-f160-4300-b304-85cc5cdac58a"], Cell[CellGroupData[{ Cell[91236, 2455, 293, 8, 70, "Input",ExpressionUUID->"b63c7ab7-17b5-4182-b990-2ee8ef4278ce"], Cell[91532, 2465, 192, 3, 70, "Output",ExpressionUUID->"4c88e2cf-450c-4f99-87ad-2d3032071b90"] }, Open ]], Cell[91739, 2471, 137, 2, 70, "Text",ExpressionUUID->"a3c6c999-c777-4c45-a4ba-6c91a5d6ee70"], Cell[CellGroupData[{ Cell[91901, 2477, 285, 8, 70, "Input",ExpressionUUID->"2b0bf197-23be-4fd5-8505-7e5cecc328b6"], Cell[92189, 2487, 291, 6, 70, "Output",ExpressionUUID->"f83c1d9d-9b64-49af-bf0b-233c668c801c"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[92529, 2499, 37, 0, 70, "Subsection",ExpressionUUID->"e5423c6e-a72e-484c-9afc-6c876241e564"], Cell[92569, 2501, 232, 7, 70, "Text",ExpressionUUID->"b3dc8140-06e9-4be1-b089-7f14ccb62c38"], Cell[CellGroupData[{ Cell[92826, 2512, 545, 15, 70, "Input",ExpressionUUID->"5094077b-fa40-4a91-a47d-3640d1d61c65"], Cell[93374, 2529, 332, 5, 70, "Output",ExpressionUUID->"edaa8022-bc87-422b-b7b3-ae25c80bd1d4"] }, Open ]], Cell[93721, 2537, 277, 10, 70, "Text",ExpressionUUID->"97249df7-d45d-4148-9314-9ece47d1609c"], Cell[CellGroupData[{ Cell[94023, 2551, 242, 7, 70, "Input",ExpressionUUID->"16179f9e-ed6f-41eb-a9df-a39567675fc1"], Cell[94268, 2560, 338, 5, 70, "Output",ExpressionUUID->"33abc250-dc97-416d-8184-4da127c32cad"] }, Open ]], Cell[94621, 2568, 51, 0, 70, "Text",ExpressionUUID->"99300fe0-4c66-49da-a3da-8bd2326099f0"], Cell[CellGroupData[{ Cell[94697, 2572, 98, 2, 70, "Input",ExpressionUUID->"7d430a3e-f7c9-4223-9731-72ed9dd10cbe"], Cell[94798, 2576, 262, 4, 70, "Output",ExpressionUUID->"e9697937-66e8-447f-aa76-5df900bb4298"] }, Open ]], Cell[95075, 2583, 129, 3, 70, "Text",ExpressionUUID->"fd56fdcd-dc2c-475b-9708-447a2276167c"], Cell[CellGroupData[{ Cell[95229, 2590, 339, 9, 70, "Input",ExpressionUUID->"3e96d5b6-4472-48fa-95f0-bac96d0582f4"], Cell[95571, 2601, 268, 4, 70, "Output",ExpressionUUID->"c2feaf1e-adde-4859-aee4-f2a31939b956"] }, Open ]], Cell[95854, 2608, 51, 0, 70, "Text",ExpressionUUID->"5275b434-598f-425c-a6e3-9391033d0eb0"], Cell[CellGroupData[{ Cell[95930, 2612, 197, 6, 70, "Input",ExpressionUUID->"9f10304f-4b8f-42be-9f93-658eaa84d4da"], Cell[96130, 2620, 35255, 736, 70, "Output",ExpressionUUID->"b633e2e2-49db-4cf3-abf6-8f9265f11d35"] }, Open ]] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)