(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 11.3' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 7517, 203] NotebookOptionsPosition[ 5624, 158] NotebookOutlinePosition[ 5932, 173] CellTagsIndexPosition[ 5889, 170] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Construction Notebook for:", FontSize->24], "\nGloVe 50-Dimensional Word Vectors Trained on Wikipedia and Gigaword 5 Data" }], "Title", CellChangeTimes->{{3.700390059931024*^9, 3.700390069370269*^9}, { 3.713527335930427*^9, 3.71352733920855*^9}, 3.713530361022579*^9, { 3.713530682724009*^9, 3.713530695815112*^9}, {3.713530785596238*^9, 3.713530812060341*^9}, {3.7135309453815937`*^9, 3.713530948869219*^9}, { 3.713531002597712*^9, 3.7135310397811537`*^9}, {3.713536112065014*^9, 3.713536118207741*^9}, {3.724510160790855*^9, 3.724510160950651*^9}}], Cell[CellGroupData[{ Cell["NetModel Access", "Subsection", CellChangeTimes->{{3.695474314080426*^9, 3.695474346087426*^9}}], Cell[CellGroupData[{ Cell["This Notebook", "Subsubsection", CellChangeTimes->{{3.6954750910664797`*^9, 3.695475092737351*^9}}], Cell[BoxData[ RowBox[{"NetModel", "[", RowBox[{ "\"\\"", ",", "\"\\""}], "]"}]], "Input", CellChangeTimes->{{3.696656935596855*^9, 3.6966569364445457`*^9}, 3.696768427361453*^9, 3.696768595763381*^9, 3.700390080550715*^9, 3.713527332938039*^9, {3.713530362953845*^9, 3.7135303669448347`*^9}, { 3.7135306975162992`*^9, 3.713530702379608*^9}, 3.713530955656728*^9, { 3.713531005485937*^9, 3.713531040781562*^9}, 3.7135361256475353`*^9, { 3.7245101796064167`*^9, 3.724510179942202*^9}}, CellLabel->""] }, Open ]], Cell[CellGroupData[{ Cell["Untrained Net", "Subsubsection", CellChangeTimes->{{3.6954750978333807`*^9, 3.695475133273511*^9}}], Cell[BoxData[ RowBox[{"NetModel", "[", RowBox[{ "\"\\"", ",", "\"\\""}], "]"}]], "Input", CellChangeTimes->{{3.696656940213286*^9, 3.6966569411083603`*^9}, 3.6967685960955133`*^9, 3.700390083629743*^9, {3.713527345914727*^9, 3.713527346642221*^9}, 3.713530370686832*^9, 3.7135307053541803`*^9, 3.713530959004366*^9, {3.713531006330868*^9, 3.713531041486093*^9}, 3.713536130161717*^9, 3.7245101525898027`*^9}, CellLabel->""] }, Open ]], Cell[CellGroupData[{ Cell["Trained Net", "Subsubsection", CellChangeTimes->{{3.6954751072255173`*^9, 3.6954751086815357`*^9}}], Cell[BoxData[ RowBox[{"NetModel", "[", "\"\\"", "]"}]], "Input", CellChangeTimes->{{3.6966569441649303`*^9, 3.696656946349728*^9}, 3.696768596439824*^9, 3.70039008606037*^9, 3.713527350999201*^9, 3.713530372099915*^9, 3.713530707350834*^9, 3.713530960248189*^9, { 3.713531007434894*^9, 3.7135310423651257`*^9}, 3.713536133747809*^9, 3.724510152592814*^9}, CellLabel->""] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Net Construction", "Section", CellChangeTimes->{3.695625386014464*^9}], Cell[CellGroupData[{ Cell["Parameter Settings", "Subsection", CellChangeTimes->{{3.695474640360228*^9, 3.695474641776113*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"gloveTokens", "=", RowBox[{ RowBox[{"NetExtract", "[", RowBox[{ RowBox[{"NetModel", "[", RowBox[{ "\"\\"", ",", "\"\\""}], "]"}], ",", "\"\\""}], "]"}], "[", RowBox[{"[", "\"\\"", "]"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.713527466915866*^9, 3.7135275033391542`*^9}, 3.71353038346072*^9, {3.71353050413076*^9, 3.713530504898053*^9}, 3.713530631504019*^9, 3.713530710594427*^9, 3.713530963393332*^9, { 3.71353100922122*^9, 3.71353104384626*^9}, 3.713536144908391*^9, 3.713536517470377*^9, 3.7135374025713577`*^9, 3.724510152595989*^9}] }, Open ]], Cell[CellGroupData[{ Cell["Final Net", "Subsection", CellChangeTimes->{{3.695106779945572*^9, 3.695106780985426*^9}}], Cell[BoxData[ RowBox[{"glove", "=", RowBox[{"EmbeddingLayer", "[", RowBox[{"50", ",", RowBox[{"\"\\"", "\[Rule]", RowBox[{"NetEncoder", "[", RowBox[{"{", RowBox[{"\"\\"", ",", "gloveTokens", ",", RowBox[{"IgnoreCase", "\[Rule]", "True"}]}], "}"}], "]"}]}]}], "]"}]}]], "Input", CellChangeTimes->{{3.713527514677994*^9, 3.713527575009603*^9}, { 3.713530510522636*^9, 3.713530513394473*^9}, {3.713530596627226*^9, 3.713530599642223*^9}, {3.713530735657646*^9, 3.713530739531332*^9}, { 3.713530972238109*^9, 3.71353097230132*^9}, {3.713531011557581*^9, 3.7135310515903883`*^9}, {3.713536160908852*^9, 3.713536160973802*^9}}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Training", "Section", CellChangeTimes->{{3.695474798960601*^9, 3.69547479969661*^9}}], Cell["(Performed separately)", "Text", CellChangeTimes->{{3.695474856418449*^9, 3.695474863168799*^9}, { 3.7003902300515137`*^9, 3.7003902345796556`*^9}, {3.7135276003953753`*^9, 3.713527600730994*^9}}] }, Open ]] }, Open ]] }, WindowSize->Automatic, WindowMargins->Automatic, FrontEndVersion->"11.3 for Linux x86 (64-bit) (March 6, 2018)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 598, 10, 70, "Title",ExpressionUUID->"c4433852-6858-4926-8f44-ecf026ba2fd5"], Cell[CellGroupData[{ Cell[1203, 36, 103, 1, 70, "Subsection",ExpressionUUID->"cdc43ec4-7053-48d5-8ce1-85ea6639c598"], Cell[CellGroupData[{ Cell[1331, 41, 106, 1, 70, "Subsubsection",ExpressionUUID->"79e51879-b124-4fe0-aeb1-82079c5eb877"], Cell[1440, 44, 625, 11, 70, "Input",ExpressionUUID->"830bd465-9588-4ab2-8a6e-2040af9f37bc"] }, Open ]], Cell[CellGroupData[{ Cell[2102, 60, 106, 1, 70, "Subsubsection",ExpressionUUID->"50262610-1f55-4149-aca0-57f3ee8386cb"], Cell[2211, 63, 555, 10, 70, "Input",ExpressionUUID->"68ca0591-0408-47f4-a88c-cab3a919ed3c"] }, Open ]], Cell[CellGroupData[{ Cell[2803, 78, 106, 1, 70, "Subsubsection",ExpressionUUID->"6c5a1d30-750c-416d-b923-d03f7480cb4e"], Cell[2912, 81, 470, 9, 70, "Input",ExpressionUUID->"8029d066-5818-4ff5-ae89-7dd80bae321b"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[3431, 96, 77, 1, 70, "Section",ExpressionUUID->"8986940a-d04a-4ac8-9391-090b973cc379"], Cell[CellGroupData[{ Cell[3533, 101, 106, 1, 70, "Subsection",ExpressionUUID->"130a44c6-783a-4348-b915-8e2616e5b796"], Cell[3642, 104, 769, 16, 70, "Input",ExpressionUUID->"ad74ed9d-e294-4bde-8fd1-8764bf4fb407"] }, Open ]], Cell[CellGroupData[{ Cell[4448, 125, 97, 1, 70, "Subsection",ExpressionUUID->"1225d006-7b19-4cf9-b2a3-616e27700dd5"], Cell[4548, 128, 696, 14, 70, "Input",ExpressionUUID->"dc1c364b-b04b-439d-abcd-56b3c45e452c"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[5293, 148, 92, 1, 70, "Section",ExpressionUUID->"6855975f-e52c-4c24-89b8-f89def4bb90e"], Cell[5388, 151, 208, 3, 70, "Text",ExpressionUUID->"8be4dd6a-bbc9-496d-9333-0cf703c34c2f"] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)