(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 13.2' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 137283, 3447] NotebookOptionsPosition[ 129471, 3301] NotebookOutlinePosition[ 129943, 3321] CellTagsIndexPosition[ 129900, 3318] WindowTitle->ConceptNet Numberbatch Word Vectors V17.06 (Raw Model) | Example \ Notebook WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["ConceptNet Numberbatch Word Vectors V17.06 (Raw Model)", \ "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.713712620577797*^9}, 3.713712821709194*^9, 3.716807576259856*^9}, CellLabel->"In[2]:="], 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["300", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Class count\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["417194", "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["300", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Class count\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["417194", "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]\"", "\"417194\"", "\"300\""}, "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["\"class\"", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Output\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox[ TemplateBox[{"\"vector\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{"\[Times]", "\"\[Times]\"", "\"300\""}, "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.713897734780806*^9, 3.714108375120249*^9, 3.7141313833932457`*^9, 3.715102327847269*^9, { 3.716808052579526*^9, 3.7168080636499653`*^9}, 3.716907753522011*^9, 3.7169079220794973`*^9, 3.717152935006925*^9, 3.717152971291245*^9, 3.7171531477866364`*^9, 3.729023227870256*^9, 3.7350529189384604`*^9, 3.75137850220662*^9, 3.7536335795356703`*^9, 3.761564583447901*^9}, CellLabel->"Out[2]="] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Basic usage", "Subsection", CellChangeTimes->{{3.724512708292149*^9, 3.7245127095943193`*^9}}], Cell["Use the net to obtain a list of word vectors:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"vectors", "=", RowBox[{ RowBox[{ "NetModel", "[", "\"\\"", "]"}], "[", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}], "]"}]}]], "Input",\ CellChangeTimes->{ 3.7137122784550734`*^9, 3.713712439005827*^9, 3.713712513949595*^9, { 3.7137125638817987`*^9, 3.7137126205813313`*^9}, 3.713712821713051*^9, 3.714108421116671*^9, 3.716807576266028*^9}, CellLabel->"In[3]:=", CellID->547578203], Cell[BoxData[ InterpretationBox[ TagBox[ FrameBox[GridBox[{ { ItemBox[ TagBox[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.008700000122189522`", ",", "0.06300000101327896`", ",", RowBox[{"-", "0.04749999940395355`"}], ",", "0.11140000075101852`", ",", "0.018799999728798866`", ",", "0.05310000106692314`", ",", "0.10279999673366547`", ",", TemplateBox[{"287"}, "OutputSizeLimit`Skeleton"], ",", RowBox[{"-", "0.05640000104904175`"}], ",", RowBox[{"-", "0.061000000685453415`"}], ",", RowBox[{"-", "0.0803999975323677`"}], ",", RowBox[{"-", "0.04100000113248825`"}], ",", RowBox[{"-", "0.006899999920278788`"}], ",", "0.009600000455975533`"}], "}"}], ",", RowBox[{"{", 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->{51., {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, 3, 31494031127044893144, 5/2], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], StandardForm], ImageSizeCache->{56., {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, 3, 31494031127044893144, 5 2], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowAll"], StandardForm], ImageSizeCache->{42., {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, 3, 31494031127044893144, Infinity], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], StandardForm], ImageSizeCache->{77., {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[31494031127044893144 === $SessionID, Out[3], Message[ MessageName[Syntax, "noinfoker"]]; Missing["NotAvailable"]; Null]]], "Output", CellChangeTimes->{ 3.7137070715637283`*^9, {3.713897758450927*^9, 3.713897769704797*^9}, 3.7138978258677177`*^9, 3.714108389772812*^9, 3.714108421497641*^9, 3.7141313893541403`*^9, 3.7151023290659103`*^9, 3.7168080540282583`*^9, 3.716907754934136*^9, 3.7171529360882673`*^9, {3.7171529752077303`*^9, 3.7171529886603813`*^9}, 3.717153149023575*^9, 3.72902323015473*^9, 3.7513785093475447`*^9, 3.75363358063659*^9, 3.761496170196217*^9, 3.761564584631002*^9}, CellLabel->"Out[3]="] }, Open ]], Cell["Obtain the dimensions of the vectors:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Dimensions", "[", "vectors", "]"}]], "Input", CellLabel->"In[4]:="], Cell[BoxData[ RowBox[{"{", RowBox[{"2", ",", "300"}], "}"}]], "Output", CellChangeTimes->{ 3.7137070716262693`*^9, 3.713897758526586*^9, 3.7141084281222467`*^9, 3.714131392429419*^9, 3.7151023291496277`*^9, 3.7168080541140327`*^9, 3.716907755020124*^9, 3.717152936179858*^9, {3.717152975290037*^9, 3.7171529936650476`*^9}, 3.717153149090548*^9, 3.729023230244011*^9, 3.751378512763721*^9, 3.7536335806888437`*^9, 3.761564584675736*^9}, CellLabel->"Out[4]="] }, 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[{"NetMapOperator", "@", RowBox[{ "NetModel", "[", "\"\\"", "]"}]}], ",", RowBox[{"LongShortTermMemoryLayer", "[", "10", "]"}]}], "}"}], "]"}]}]], "Input", CellChangeTimes->{ 3.71371228345632*^9, 3.71371243900952*^9, 3.713712513956407*^9, { 3.7137125638855352`*^9, 3.713712620585031*^9}, 3.7137128217198963`*^9, { 3.71410872512214*^9, 3.714108729968092*^9}, 3.716807576271717*^9}, CellLabel->"In[5]:=", 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[ TemplateBox[{"\"vector of \"", StyleBox["\"n\"", Italic, StripOnInput -> False], "\" \"", "\"classes\""}, "RowDefault"], "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[{{ TemplateBox[{"\"vector of \"", StyleBox["\"n\"", Italic, StripOnInput -> False], "\" \"", "\"classes\""}, "RowDefault"]}, { TemplateBox[{"\"vector of \"", StyleBox["\"n\"", Italic, StripOnInput -> False], "\" \"", TemplateBox[{"\"indices\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"range\"", "\":\"", "\" \"", TemplateBox[{"1", "\"..\"", "417194"}, "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[ RowBox[{ TagBox["NetMapOperator", HoldForm], "[", "EmbeddingLayer", "]"}], GrayLevel[0], StripOnInput -> False], TemplateBox[{"\"matrix\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{"\[Times]", "\"\[Times]\"", StyleBox["\"n\"", Italic, StripOnInput -> False], "\"300\""}, "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.713897758664741*^9, 3.714108433842269*^9, 3.714108731758504*^9, 3.714131397134878*^9, 3.715102329994075*^9, 3.716808054784494*^9, 3.716907755718755*^9, 3.717152936770776*^9, { 3.717152976152894*^9, 3.717152996609726*^9}, 3.7171531499133043`*^9, 3.7290232315393047`*^9, 3.751378515905768*^9, 3.753633581727439*^9, 3.761564584869726*^9}, CellLabel->"Out[5]="] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Feature visualization", "Subsection", CellChangeTimes->{3.724512734689208*^9}], Cell["Create two lists of related words:", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"animals", "=", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ";"}]], "Input", CellChangeTimes->{3.71410853670195*^9}, CellLabel->"In[6]:="], Cell[BoxData[ RowBox[{ RowBox[{"fruits", "=", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ";"}]], "Input", CellChangeTimes->{3.71410854436967*^9}, CellLabel->"In[7]:="], 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.713712620591693*^9}, 3.713712821726503*^9, 3.716807578193581*^9, {3.7513785392159*^9, 3.751378545903305*^9}}, CellLabel->"In[8]:=", CellID->1277887787], Cell[BoxData[ GraphicsBox[{{}, { {Opacity[0], PointBox[CompressedData[" 1:eJwlUV0oQ2EY/pJYLhaFtck6zGYY2/zMKDkTbiS14sbfiZRW2gVRSs6NC3ZD +SmiUwp3mp/ytx/RXHHhAkPaErNiRJa05HzPTp3enp73fZ7nfb+cHru1L4EQ ohV/WsXPm9hlZsXKP24YvWINdCzKUa8bimkle6M1lBc8nJZi1t+ZSqs3q86A vs9MJeWZpCv0My2SCmDVTRZ4904Z8GQ4VitWbuuyiuJAfm869IQRFfS/3nMo 5tXD8OOc8zLwvNtAMWtZYKC/OVgJ3hWBH2c700NvwYl8RPuEft66+0P9mIZg Kfrrl8oxv56iRn9UUoD56KkU/GGzDv6ac+TjYmsq+CuUcf1CG+bZY1UG8rha yjD/smrGPZr82JOVh+I59v+MwG1S3JVjfzMp9upf1biL4+jRQ/3u8kzQnVo2 wfejET7CUh98+byJEuB+Ap6XzQDzt61ROs+ELpCDCGNa3HnAroCffAjz7Eok GfkOFQz48W7szTxbs6F3PK0EDtvxDsy2D3sH7k/S8C7hOQ38AwYd8rmTi+DX fiBB/3c19iMPQewr+Bx65PuWoZ+8zZrjd9XkYt5iq8G+So2O/QdHSLD7 "]]}, { {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], {24.367259979248047, -17.65972137451172}, {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], {-6.400744915008545, -14.636412620544434}, {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], {29.4793701171875, -12.18896198272705}, {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], {-4.091649055480957, -16.258235931396484}, {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], {7.522410869598389, -14.918015480041504}, {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], {21.03245735168457, -6.961071491241455}, {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], {19.706037521362305, 1.8070155382156372}, {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], {25.823034286499023, -5.096831798553467}, {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], {9.733644485473633, -8.968655586242676}, {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], {29.461509704589844, -5.89716100692749}, {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], {16.744144439697266, -8.295419692993164}, {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], {23.45189094543457, -14.966288566589355}, {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], {15.889483451843262, -12.346861839294434}, {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], {16.8951416015625, 1.5442681312561035}, {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], {18.879961013793945, -20.60651206970215}, {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], {10.520806312561035, -12.517508506774902}, {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], {3.846173048019409, -14.151820182800293}, {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], {25.801368713378906, -9.826144218444824}, {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], {15.558794021606445, -20.414716720581055}, {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], {5.284916877746582, -19.311481475830078}, {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], {-24.6402645111084, 19.848812103271484}, {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], {-12.451364517211914, 17.995010375976562}, {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], {-17.05600357055664, 5.744386196136475}, {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], {-10.961301803588867, -0.6167659163475037}, {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], {-22.14397430419922, 22.61539077758789}, {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], {-20.2771053314209, 15.698452949523926}, {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], {-15.26004409790039, 22.001596450805664}, {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], {-15.283382415771484, -1.3959603309631348}, {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], {-19.80821418762207, 12.245361328125}, {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], {-6.608814716339111, 15.72675609588623}, {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.9915127754211426, 8.052213668823242}, {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], {-12.686516761779785, 7.330955982208252}, {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], {-7.641363143920898, 9.718575477600098}, {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], {-9.88808536529541, 4.441272258758545}, {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], {-11.292798042297363, 14.095463752746582}, {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], {-13.515124320983887, 3.090993881225586}, {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], {-17.230302810668945, 17.882293701171875}, {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], {-15.77299976348877, 14.046794891357422}, {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], {-24.581741333007812, 9.074512481689453}, {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], {-29.41506004333496, 14.07444953918457}, {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.713897862903069*^9, 3.714108460353937*^9, 3.714108555339939*^9, 3.7141314033797827`*^9, 3.7151023304083633`*^9, 3.716808056452147*^9, 3.716907757310794*^9, 3.717152937456431*^9, 3.7171529823161488`*^9, 3.717153151017542*^9, 3.729023234564858*^9, { 3.751378535263749*^9, 3.751378546955077*^9}, 3.753633582198409*^9, 3.761564586006205*^9}, CellLabel->"Out[8]="] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Word analogies", "Subsection", CellChangeTimes->{3.724512738224658*^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.713712620555705*^9}, 3.713712821735651*^9, 3.7168075782155523`*^9}, CellLabel->"In[9]:=", 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["300", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Class count\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["417194", "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["300", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Class count\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox["417194", "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]\"", "\"417194\"", "\"300\""}, "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["\"class\"", "SummaryItem"]}, { StyleBox[ TemplateBox[{"\"Output\"", "\":\""}, "RowDefault"], "SummaryItemAnnotation"], StyleBox[ TemplateBox[{"\"vector\"", "\" \"", StyleBox[ TemplateBox[{ "\"(\"", "\"\[VeryThinSpace]\"", "\"size\"", "\":\"", "\" \"", TemplateBox[{"\[Times]", "\"\[Times]\"", "\"300\""}, "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.713897869958212*^9, 3.714108561210484*^9, { 3.7141314082657948`*^9, 3.714131431616644*^9}, 3.715102330564279*^9, 3.716808056778811*^9, 3.7169077576220503`*^9, 3.717152937615014*^9, 3.717153151311612*^9, 3.729023235616849*^9, 3.751378553323381*^9, 3.753633582234808*^9, 3.7615645861964617`*^9}, CellLabel->"Out[9]="] }, Open ]], Cell["Get a list of tokens:", "Text", CellChangeTimes->{{3.71410896930877*^9, 3.7141089700683203`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"words", "=", RowBox[{ RowBox[{"NetExtract", "[", RowBox[{"net", ",", "\"\\""}], "]"}], "[", RowBox[{"[", "\"\\"", "]"}], "]"}]}]], "Input", CellChangeTimes->{{3.714108564678537*^9, 3.7141085675499697`*^9}}, CellLabel->"In[10]:="], Cell[BoxData[ InterpretationBox[ TagBox[ FrameBox[GridBox[{ { ItemBox[ TagBox[ RowBox[{"{", RowBox[{"\<\"##\"\>", ",", "\<\"###\"\>", ",", "\<\"####\"\>", ",", "\<\"#####\"\>", ",", "\<\"#####_metres\"\>", ",", "\<\"#####ish\"\>", ",", "\<\"####_adapter\"\>", ",", "\<\"####_form\"\>", ",", "\<\"####_ish\"\>", ",", "\<\"####_metres\"\>", ",", "\<\"####_ndash_####\"\>", ",", "\<\"####_number\"\>", ",", "\<\"####_pennsylvania_avenue\"\>", ",", "\<\"####_spelling_reform\"\>", ",", "\<\"####_yen\"\>", ",", "\<\"####ed\"\>", ",", TemplateBox[{"417162"}, "OutputSizeLimit`Skeleton"], ",", "\<\"\:2810_\:2824\"\>", ",", "\<\"\:2817_\:281a_\:2809\"\>", ",", "\<\"\:2819_\:2809_\:2807\"\>", ",", "\<\"\:2820_\:2836\"\>", ",", "\<\"\:2824_\:2824\"\>", ",", "\<\"\:2824_\:2824_\:2824\"\>", ",", "\<\"\:2827_\:280e\"\>", ",", "\<\"\:2828_\:2834\"\>", ",", "\<\"\:282d_\:280b\"\>", ",", "\<\"\:282d_\:280e\"\>", ",", "\<\"\:283d_\:2817\"\>", ",", "\<\"\:283d_\:2817_\:280b\"\>", ",", "\<\"\:5f62\:5bb9\:52d5\:8a5e\"\>", ",", "\<\"\:5f62\:5bb9\:8a5e\"\>", ",", "\<\"\:674e\"\>", ",", "\<\"\:c778\"\>"}], "}"}], 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->{51., {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, 10, 31494031127044893144, 5/2], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], StandardForm], ImageSizeCache->{56., {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, 10, 31494031127044893144, 5 2], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeShowAll"], StandardForm], ImageSizeCache->{42., {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, 10, 31494031127044893144, Infinity], Enabled->True, Evaluator->Automatic, Method->"Queued"], ButtonBox[ PaneSelectorBox[{False-> StyleBox[ StyleBox[ DynamicBox[ToBoxes[ FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], StandardForm], ImageSizeCache->{77., {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[31494031127044893144 === $SessionID, Out[10], Message[ MessageName[Syntax, "noinfoker"]]; Missing["NotAvailable"]; Null]]], "Output", CellChangeTimes->{ 3.713707087038406*^9, 3.713897870023993*^9, 3.714108568158696*^9, { 3.714131408588162*^9, 3.714131431936019*^9}, 3.715102330850253*^9, 3.716808057094637*^9, 3.716907757937738*^9, 3.717152937894912*^9, 3.717153151595922*^9, 3.729023237334559*^9, 3.751378558546619*^9, 3.7536335839006653`*^9, 3.7615645877526007`*^9}, CellLabel->"Out[10]="] }, Open ]], Cell["Obtain the vectors:", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"vecs", "=", RowBox[{"Normal", "@", RowBox[{"NetExtract", "[", RowBox[{"net", ",", "\"\\""}], "]"}]}]}], ";"}]], "Input", CellChangeTimes->{{3.714108659446827*^9, 3.7141086596334057`*^9}, { 3.751378563150526*^9, 3.7513785702600317`*^9}}, CellLabel->"In[11]:="], Cell["\<\ Create an association whose keys are tokens and whose values are vectors:\ \>", "Text", CellChangeTimes->{{3.714108977277358*^9, 3.714108977845056*^9}}, CellID->2068968093], Cell[BoxData[ RowBox[{ RowBox[{"word2vec", "=", RowBox[{"AssociationThread", "[", RowBox[{"words", "\[Rule]", "vecs"}], "]"}]}], ";"}]], "Input", CellLabel->"In[12]:="], Cell["Find the eight nearest tokens to \"king\":", "Text", CellChangeTimes->{{3.714108984997796*^9, 3.714108985573131*^9}, { 3.7245127413125668`*^9, 3.72451274286551*^9}}, CellID->2132013242], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Nearest", "[", RowBox[{"word2vec", ",", RowBox[{"word2vec", "[", "\"\\"", "]"}], ",", "8"}], "]"}]], "Input",\ CellLabel->"In[13]:=", CellID->377600698], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"king\"\>", ",", "\<\"male_monarch\"\>", ",", "\<\"king_of_france\"\>", ",", "\<\"king_of_germans\"\>", ",", "\<\"riley_b_king\"\>", ",", "\<\"king_of_england\"\>", ",", "\<\"kinging\"\>", ",", "\<\"roytelet\"\>"}], "}"}]], "Output", CellChangeTimes->{ 3.713707089826395*^9, 3.713897871155595*^9, 3.71410866785638*^9, { 3.7141314105683317`*^9, 3.7141314339680777`*^9}, 3.715102333964115*^9, 3.716808059471897*^9, 3.716907762123564*^9, 3.717152939996943*^9, 3.7171531536804457`*^9, 3.7290232395716963`*^9, 3.7513785772245493`*^9, 3.753633590558752*^9, 3.761564590307048*^9}, CellLabel->"Out[13]="] }, 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[14]:=", CellID->1331835622], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"berlin\"\>", ",", "\<\"berlinese\"\>", ",", "\<\"irving_berlin\"\>", ",", "\<\"dusseldorf\"\>", ",", "\<\"frankfurt_der_oder\"\>"}], "}"}]], "Output", CellChangeTimes->{ 3.713707091862473*^9, 3.71389787129408*^9, 3.714108699897423*^9, { 3.714131411332178*^9, 3.714131434741357*^9}, 3.7151023349828987`*^9, 3.7168080604625063`*^9, 3.71690776331299*^9, 3.7171529408242826`*^9, 3.717153154518111*^9, 3.729023240500216*^9, 3.751378579706738*^9, 3.75363359156059*^9, 3.761564591323732*^9}, CellLabel->"Out[14]="] }, 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.735313803239196*^9}, CellLabel->"In[15]:="], Cell[BoxData[ RowBox[{"\[LeftAssociation]", RowBox[{ RowBox[{"{", "\<\"Weights\"\>", "}"}], "\[Rule]", "125158200"}], "\[RightAssociation]"}]], "Output", CellChangeTimes->{3.733052474940061*^9, 3.735313806408101*^9, 3.7513785817693987`*^9, 3.75363359157631*^9, 3.761564591365041*^9}, CellLabel->"Out[15]="] }, 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.735313801238163*^9}, CellLabel->"In[16]:="], Cell[BoxData["125158200"], "Output", CellChangeTimes->{3.733052474988936*^9, 3.7353138072894077`*^9, 3.751378583974996*^9, 3.753633591620146*^9, 3.7615645913736067`*^9}, CellLabel->"Out[16]="] }, 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.735313799927269*^9}, CellLabel->"In[17]:="], Cell[BoxData[ RowBox[{"\[LeftAssociation]", RowBox[{"EmbeddingLayer", "\[Rule]", "1"}], "\[RightAssociation]"}]], "Output", CellChangeTimes->{3.733052475040373*^9, 3.7353138081967773`*^9, 3.75137858583788*^9, 3.753633591643651*^9, 3.761564591382519*^9}, CellLabel->"Out[17]="] }, 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.724512751540268*^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.713712620563355*^9}, 3.7137128217419243`*^9, 3.716807578308846*^9}, CellLabel->"In[18]:="], Cell[BoxData["\<\"/private/var/folders/pz/94mxs33x2l512z6wtjbthvy0000_ck/T/\ net.json\"\>"], "Output", CellChangeTimes->{3.713707095322916*^9, 3.713897877700193*^9, 3.714108709575521*^9, 3.7141314389057093`*^9, 3.715102336109761*^9, 3.716808061576337*^9, 3.7169077644681063`*^9, 3.7171529419120693`*^9, 3.7171531555870323`*^9, 3.729023242407658*^9, 3.7513785900912*^9, 3.753633592874729*^9, 3.761564592389765*^9}, CellLabel->"Out[18]="] }, 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.724512754947303*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"paramPath", "=", RowBox[{"FileNameJoin", "[", RowBox[{"{", RowBox[{ RowBox[{"DirectoryName", "[", "jsonPath", "]"}], ",", "\"\\""}], "}"}], "]"}]}]], "Input", CellLabel->"In[19]:="], Cell[BoxData["\<\"/private/var/folders/pz/94mxs33x2l512z6wtjbthvy0000_ck/T/\ net.params\"\>"], "Output", CellChangeTimes->{3.713707095539467*^9, 3.713897877777944*^9, 3.7141087110450077`*^9, 3.714131439102722*^9, 3.7151023362386093`*^9, 3.7168080616680727`*^9, 3.716907764550922*^9, 3.717152941975465*^9, 3.717153155656904*^9, 3.7290232424716578`*^9, 3.751378590158638*^9, 3.753633592916099*^9, 3.7615645924375887`*^9}, CellLabel->"Out[19]="] }, Open ]], Cell["Get the size of the parameter file:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"FileByteCount", "[", "paramPath", "]"}]], "Input", CellLabel->"In[20]:="], Cell[BoxData["500632887"], "Output", CellChangeTimes->{3.713707095600053*^9, 3.71389787782754*^9, 3.714108712354745*^9, 3.714131439233653*^9, 3.715102336289886*^9, 3.71680806173393*^9, 3.71690776459556*^9, 3.717152942037683*^9, 3.717153155717558*^9, 3.7290232424941*^9, 3.7513785901985617`*^9, 3.753633592940095*^9, 3.761564592467327*^9}, CellLabel->"Out[20]="] }, Open ]], Cell["\<\ The size is similar to the byte count of the resource object:\ \>", "Text", CellChangeTimes->{{3.71544654649649*^9, 3.715446549350459*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{ "ResourceObject", "[", "\"\\"", "]"}], "[", "\"\\"", "]"}]], "Input", CellChangeTimes->{ 3.713712308632401*^9, 3.713712439037232*^9, 3.71371251398592*^9, { 3.7137125638693*^9, 3.7137126205701103`*^9}, 3.713712821747814*^9, 3.7168075783297157`*^9}, CellLabel->"In[21]:="], Cell[BoxData["503244101"], "Output", CellChangeTimes->{3.713707095771419*^9, 3.713897877946618*^9, 3.714108714413069*^9, 3.714131439364335*^9, 3.7151023364224873`*^9, 3.7168080619156303`*^9, 3.716907764714978*^9, 3.717152942199142*^9, 3.7171531558626423`*^9, 3.729023242533248*^9, 3.751378590206006*^9, 3.7536335929527493`*^9, 3.761564593201789*^9}, CellLabel->"Out[21]="] }, Open ]], Cell["Represent the MXNet net as a graph:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Import", "[", RowBox[{"jsonPath", ",", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}]}], "]"}]], "Input", CellLabel->"In[22]:="], Cell[BoxData[ TemplateBox[{ GraphicsBox[{{ GrayLevel[0.8], { LineBox[{{-3., 1.8369701987210297`*^-16}, {-2., 1.2246467991473532`*^-16}}], LineBox[{{-2., 1.2246467991473532`*^-16}, {-1., -0.9999999999999999}}], LineBox[{{-2., -0.9999999999999999}, {-1., -0.9999999999999999}}], LineBox[{{-1., -0.9999999999999999}, {-6.123233995736766*^-17, \ -1.}}]}}, { InsetBox[ GraphicsBox[ StyleBox[ LineBox[{{-1., 1.}, {0., 0.}, {-1., -1.}}], GrayLevel[0.7], StripOnInput -> False]], {-2.4000000000000004`, 1.4695761589768238`*^-16}, {-0.25, 0}, Offset[8], {1., -6.123233995736765*^-17}], InsetBox[ GraphicsBox[ StyleBox[ LineBox[{{-1., 1.}, {0., 0.}, {-1., -1.}}], GrayLevel[0.7], StripOnInput -> False]], {-1.4, -0.5999999999999999}, {-0.25, 0}, Offset[8], {1., -1.}], InsetBox[ GraphicsBox[ StyleBox[ LineBox[{{-1., 1.}, {0., 0.}, {-1., -1.}}], GrayLevel[0.7], StripOnInput -> False]], {-1.4, -0.9999999999999998}, {-0.25, 0}, Offset[8], {1., 0.}], InsetBox[ GraphicsBox[ StyleBox[ LineBox[{{-1., 1.}, {0., 0.}, {-1., -1.}}], GrayLevel[0.7], StripOnInput -> False]], {-0.4000000000000001, -1.}, {-0.25, 0}, Offset[8], {0.9999999999999999, -1.1102230246251565`*^-16}]}, { GrayLevel[0], { TagBox[ TooltipBox[{ AbsolutePointSize[4], GrayLevel[0.5], PointBox[{-3., 1.8369701987210297`*^-16}]}, 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], <||>}, { Style["attrs", Bold], <||>}, { 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[{-2., -0.9999999999999999}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "1"}, { 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], 1}, { Style["name", Bold], "Weights"}, { Style["op", Bold], "null"}, { Style["param", Bold], <||>}, { Style["attrs", Bold], <||>}, { 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[{-2., 1.2246467991473532`*^-16}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "2"}, { 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], 2}, { Style["name", Bold], ""}, { Style["op", Bold], "_PlusScalar"}, { Style["param", Bold], <||>}, { 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[{-1., -0.9999999999999999}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "3"}, { 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[ "\"300\"", ShowStringCharacters -> True, StripOnInput -> False]}, { StyleBox["\"input_dim\"", Bold, StripOnInput -> False], StyleBox[ "\"417194\"", 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[{"2", ",", "0", ",", "0"}], "}"}], ",", 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], 3}, { Style["name", Bold], ""}, { Style["op", Bold], "Embedding"}, { Style["param", Bold], <||>}, { Style["attrs", Bold], Grid[{{ Style["output_dim", Bold], Style["300", ShowStringCharacters -> True]}, { Style["input_dim", Bold], Style["417194", 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], {{2, 0, 0}, {1, 0, 0}}}}, Alignment -> Left, BaseStyle -> {FontFamily -> "Source Code Pro"}, Dividers -> All, FrameStyle -> GrayLevel[0.85], Alignment -> {Left, Baseline}, Spacings -> {1.1, 0.5}, ItemSize -> {Automatic, 1.4}], "Tooltip"]& ], TagBox[ TooltipBox[{ AbsolutePointSize[6], Hue[0.08, 1, 0.7], PointBox[{-6.123233995736766*^-17, -1.}]}, TagBox[ GridBox[{{ StyleBox["\"id\"", Bold, StripOnInput -> False], "4"}, { 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[{"3", ",", "0", ",", "0"}], "}"}], "}"}]}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, AutoDelete -> False, GridBoxDividers -> {"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize -> {"Columns" -> {{Automatic}}, "Rows" -> {{1.4}}}, GridBoxSpacings -> {"Columns" -> {{1.1}}, "Rows" -> {{0.5}}}, BaseStyle -> {FontFamily -> "Source Code Pro"}, FrameStyle -> GrayLevel[0.85]], "Grid"]], Annotation[#, Grid[{{ Style["id", Bold], 4}, { Style["name", Bold], "Output"}, { Style["op", Bold], "identity"}, { Style["param", Bold], <||>}, { Style["attrs", Bold], <||>}, { Style["inputs", Bold], {{3, 0, 0}}}}, Alignment -> Left, BaseStyle -> {FontFamily -> "Source Code Pro"}, Dividers -> All, FrameStyle -> GrayLevel[0.85], Alignment -> {Left, Baseline}, Spacings -> {1.1, 0.5}, ItemSize -> {Automatic, 1.4}], "Tooltip"]& ]}}, StyleBox[{{ InsetBox[ FormBox["0", TraditionalForm], Offset[{0, 5}, {-3., 1.8369701987210297`*^-16}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["1", TraditionalForm], Offset[{0, 5}, {-2., -0.9999999999999999}], {0., -0.17}, Automatic, { 1, 0}], InsetBox[ FormBox["2", TraditionalForm], Offset[{0, 6}, {-2., 1.2246467991473532`*^-16}], {0., -0.17}, Automatic, {1, 0}], InsetBox[ FormBox["3", TraditionalForm], Offset[{0, 6}, {-1., -0.9999999999999999}], {0., -0.17}, Automatic, { 1, 0}], InsetBox[ FormBox["4", TraditionalForm], Offset[{0, 6}, {-6.123233995736766*^-17, -1.}], {0., -0.17}, Automatic, {1, 0}]}}, FontSize -> 7, StripOnInput -> False]}, ImageSize -> {288., 97.85000000000001}, AspectRatio -> Full, PlotRangePadding -> 0, ImagePadding -> {{23.999999999999986`, 24.}, {6, 11.849999999999994`}}, ImageMargins -> 0, BaseStyle -> {TooltipBoxOptions -> {TooltipDelay -> 0.08}}], FormBox[ FormBox[ TemplateBox[{ "\"Tensor\"", "\"_PlusScalar\"", "\"Embedding\"", "\"identity\""}, "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.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)], "\" \"", #2}, "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)], "\" \"", #3}, "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)], "\" \"", #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.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[{"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[{"{", 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.713897878028799*^9, 3.714108716446409*^9, 3.7141314394411297`*^9, 3.715102336528555*^9, 3.716808062068116*^9, 3.716907764833152*^9, 3.7171529422651787`*^9, 3.717153155936442*^9, 3.729023242605426*^9, 3.751378590294408*^9, 3.753633593026991*^9, 3.7615645932921257`*^9}, CellLabel->"Out[22]="] }, Open ]] }, Open ]] }, Open ]] }, ClosingSaveDialog->False, WindowSize->Automatic, WindowMargins->Automatic, WindowTitle->"ConceptNet Numberbatch Word Vectors V17.06 (Raw Model) | \ Example Notebook", Visible->True, OutputSizeLimit->10000, FrontEndVersion->"13.2 for Mac OS X x86 (64-bit) (November 18, 2022)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[669, 24, 491, 16, 70, "ResourceExampleTitle",ExpressionUUID->"10c64ba7-9ae6-4367-8397-256de15f4cf3", CellGroupingRules->{"TitleGrouping", 0}, PageBreakBelow->False], Cell[1163, 42, 439, 14, 70, "ResourceExampleSubtitle",ExpressionUUID->"ace984a4-6b6e-4645-99f3-9f05c5bd0f22", CellGroupingRules->{"TitleGrouping", 10}, PageBreakBelow->False, CounterIncrements->"Subtitle"], Cell[CellGroupData[{ Cell[1627, 60, 40, 0, 70, "Subsection",ExpressionUUID->"3078f5c2-74ae-4ba2-8e2d-0d6acc7d146d"], Cell[1670, 62, 40, 0, 70, "Text",ExpressionUUID->"52bb84c1-9d9e-4534-b1aa-f6b7966711fe"], Cell[CellGroupData[{ Cell[1735, 66, 338, 8, 70, "Input",ExpressionUUID->"238e3bdf-2166-4175-88e1-033661883a2a"], Cell[2076, 76, 8519, 184, 70, "Output",ExpressionUUID->"0b04a3ff-b56b-4716-98b7-83906e896279"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[10644, 266, 101, 1, 70, "Subsection",ExpressionUUID->"2873f7a5-8f15-48a0-9577-1697665d798b"], Cell[10748, 269, 61, 0, 70, "Text",ExpressionUUID->"90466459-c13e-4a83-bf83-530924e2ccd8"], Cell[CellGroupData[{ Cell[10834, 273, 526, 15, 70, "Input",ExpressionUUID->"024014c8-5326-41ca-a15b-caa566799359", CellID->547578203], Cell[11363, 290, 9892, 249, 70, "Output",ExpressionUUID->"bed4767f-abc4-4882-8a48-635ec7a83a5b"] }, Open ]], Cell[21270, 542, 53, 0, 70, "Text",ExpressionUUID->"7a0d1e98-087d-42c8-ae75-fcd507190f99"], Cell[CellGroupData[{ Cell[21348, 546, 92, 2, 70, "Input",ExpressionUUID->"0d51fc67-04fb-4b21-9910-bf41d2dcdba8"], Cell[21443, 550, 481, 9, 70, "Output",ExpressionUUID->"d5527c59-d26d-4a85-af0a-6fa0598053e0"] }, Open ]], Cell[21939, 562, 248, 8, 70, "Text",ExpressionUUID->"b3d80aa0-4b5f-4c5d-8d88-0b67b65fa086"], Cell[CellGroupData[{ Cell[22212, 574, 635, 17, 70, "Input",ExpressionUUID->"5d298d06-b850-4cd5-bfe8-db7446f77290", CellID->429988564], Cell[22850, 593, 16123, 335, 70, "Output",ExpressionUUID->"0117e53c-07b4-4342-b039-1bbe65f7e14b"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[39022, 934, 85, 1, 70, "Subsection",ExpressionUUID->"5b4a0641-e577-4bfc-b7c9-38fbd37f3334"], Cell[39110, 937, 50, 0, 70, "Text",ExpressionUUID->"d636f1de-cf47-4e9c-b379-bc7462876fcc"], Cell[39163, 939, 652, 13, 70, "Input",ExpressionUUID->"415daf08-6ec1-4fbd-bbe9-f27b32e4c465"], Cell[39818, 954, 680, 13, 70, "Input",ExpressionUUID->"6fbe9b65-e6ae-4a59-afb1-edf014c9f851"], Cell[40501, 969, 126, 4, 70, "Text",ExpressionUUID->"24bb440e-7c0a-4d82-b9d1-99e06c1ff0c1", CellID->2141353759], Cell[CellGroupData[{ Cell[40652, 977, 597, 15, 70, "Input",ExpressionUUID->"f26bda75-15eb-47d4-b9d7-c83725569925", CellID->1277887787], Cell[41252, 994, 28629, 891, 70, "Output",ExpressionUUID->"f408316d-74c4-4a6e-bff3-3f02b5a31394"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[69930, 1891, 78, 1, 70, "Subsection",ExpressionUUID->"9d5607b3-5a0d-4141-8ea6-6b589cf705f5"], Cell[70011, 1894, 40, 0, 70, "Text",ExpressionUUID->"d1b2c180-2e17-4939-8b97-227127691ff1"], Cell[CellGroupData[{ Cell[70076, 1898, 395, 11, 70, "Input",ExpressionUUID->"eda2796f-0bc2-46fd-b45a-c4e094e19b68", CellID->1834105916], Cell[70474, 1911, 7819, 170, 70, "Output",ExpressionUUID->"254f8c0c-d0e1-4883-9e79-b2cd6b8269b0"] }, Open ]], Cell[78308, 2084, 104, 1, 70, "Text",ExpressionUUID->"e9a5e633-51ee-4fd3-bb97-0a63ff8a6bde"], Cell[CellGroupData[{ Cell[78437, 2089, 287, 7, 70, "Input",ExpressionUUID->"ee6a40df-7740-4a89-aa18-0f468b6243b3"], Cell[78727, 2098, 10156, 251, 70, "Output",ExpressionUUID->"b4fe50b0-216e-45eb-ae7b-9705eaee3b37"] }, Open ]], Cell[88898, 2352, 35, 0, 70, "Text",ExpressionUUID->"e058e479-1acf-4835-a43d-dd21024dffc3"], Cell[88936, 2354, 323, 8, 70, "Input",ExpressionUUID->"22d4c3b9-a31f-423f-ac75-d11168a93fc2"], Cell[89262, 2364, 184, 4, 70, "Text",ExpressionUUID->"82d4f2e0-9653-4405-ac0d-16e125df1d74", CellID->2068968093], Cell[89449, 2370, 181, 5, 70, "Input",ExpressionUUID->"e7300da6-a763-4dbc-a141-5d77ffa25a62"], Cell[89633, 2377, 195, 3, 70, "Text",ExpressionUUID->"5e7040cc-e08e-4d99-ba92-1fa59a485079", CellID->2132013242], Cell[CellGroupData[{ Cell[89853, 2384, 193, 6, 70, "Input",ExpressionUUID->"c2303721-4478-4622-baf7-7c7e04a936c5", CellID->377600698], Cell[90049, 2392, 670, 12, 70, "Output",ExpressionUUID->"74b3c0aa-bb6f-4c5b-a261-462c82e31834"] }, Open ]], Cell[90734, 2407, 73, 1, 70, "Text",ExpressionUUID->"cfb1f8c5-eaf6-44c8-9b43-673807b73416", CellID->1413396266], Cell[CellGroupData[{ Cell[90832, 2412, 332, 9, 70, "Input",ExpressionUUID->"861e982a-f351-49e2-9f21-50e751a42aad", CellID->1331835622], Cell[91167, 2423, 578, 11, 70, "Output",ExpressionUUID->"bf9d4cce-eacb-4b81-b569-a3b6a451bc22"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[91794, 2440, 103, 1, 70, "Subsection",ExpressionUUID->"c979adc7-ea07-4a67-8745-345448ad0fd9"], Cell[91900, 2443, 242, 3, 70, "Text",ExpressionUUID->"ad8534da-9e64-41de-81df-9b65a5e157ef"], Cell[CellGroupData[{ Cell[92167, 2450, 292, 8, 70, "Input",ExpressionUUID->"3e3b0b37-09ac-4afb-a3d0-eb9c00c2737a"], Cell[92462, 2460, 321, 7, 70, "Output",ExpressionUUID->"31ad48d1-e19e-4b1e-9f70-252500832031"] }, Open ]], Cell[92798, 2470, 120, 1, 70, "Text",ExpressionUUID->"c5d979f0-c7d5-4e4e-a3c6-2914f561411f"], Cell[CellGroupData[{ Cell[92943, 2475, 296, 8, 70, "Input",ExpressionUUID->"d41290a5-906c-4b4e-9719-2f7b7ee37880"], Cell[93242, 2485, 197, 3, 70, "Output",ExpressionUUID->"16dfce5e-315e-4e40-b646-ffe5a04f8c00"] }, Open ]], Cell[93454, 2491, 137, 2, 70, "Text",ExpressionUUID->"8ef60bd1-7d16-40a9-817e-a08a96eea3d6"], Cell[CellGroupData[{ Cell[93616, 2497, 288, 8, 70, "Input",ExpressionUUID->"487a4cf4-232b-4d53-b318-c9742a4d4c46"], Cell[93907, 2507, 288, 6, 70, "Output",ExpressionUUID->"efcb695d-e92f-46d3-8c3e-61c078f970a8"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[94244, 2519, 37, 0, 70, "Subsection",ExpressionUUID->"03c64fad-6350-43bb-b7b0-3779daad9e1f"], Cell[94284, 2521, 232, 7, 70, "Text",ExpressionUUID->"78a3130c-4f81-4efb-8077-233275c7cf6f"], Cell[CellGroupData[{ Cell[94541, 2532, 596, 16, 70, "Input",ExpressionUUID->"4d1337ce-6af4-414b-82eb-0d89354158db"], Cell[95140, 2550, 450, 7, 70, "Output",ExpressionUUID->"43bc0588-677b-480d-a731-eabc9e2cdbae"] }, Open ]], Cell[95605, 2560, 278, 10, 70, "Text",ExpressionUUID->"9c6a2c1b-e6fc-4e4e-8880-e0e2001aab1e"], Cell[CellGroupData[{ Cell[95908, 2574, 242, 7, 70, "Input",ExpressionUUID->"69f5f851-d6f7-4a84-a092-46c80b7ed70d"], Cell[96153, 2583, 456, 7, 70, "Output",ExpressionUUID->"5b1cb123-d5ed-4eeb-8ff6-7d9e59a89f9e"] }, Open ]], Cell[96624, 2593, 51, 0, 70, "Text",ExpressionUUID->"ccbacc00-dd91-43e9-b2a1-ad738ad5bbe8"], Cell[CellGroupData[{ Cell[96700, 2597, 98, 2, 70, "Input",ExpressionUUID->"6738b35e-b28a-48a4-ad71-92e07c87c3da"], Cell[96801, 2601, 375, 6, 70, "Output",ExpressionUUID->"fa6e54f5-8225-499e-9b6c-0c5710b9837d"] }, Open ]], Cell[97191, 2610, 150, 3, 70, "Text",ExpressionUUID->"71c1327a-fd77-45d1-8c10-b156939279d1"], Cell[CellGroupData[{ Cell[97366, 2617, 394, 10, 70, "Input",ExpressionUUID->"fd9b5b37-b3b3-4a86-ae32-7937baeb4c84"], Cell[97763, 2629, 386, 6, 70, "Output",ExpressionUUID->"c872780e-f7af-423c-83be-4c3081b7d2e8"] }, Open ]], Cell[98164, 2638, 51, 0, 70, "Text",ExpressionUUID->"71114929-1cdd-480f-8b57-f9f3c26b4df0"], Cell[CellGroupData[{ Cell[98240, 2642, 197, 6, 70, "Input",ExpressionUUID->"df5d3ab9-5fc8-4440-9c35-ad076f9e46db"], Cell[98440, 2650, 30991, 646, 70, "Output",ExpressionUUID->"31853caa-dd91-430e-8936-1e846d93619d"] }, Open ]] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)