Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
yiming-wange
GitHub Repository: yiming-wange/cs224n-2023-solution
Path: blob/main/a3/a3_latex/main.tex
995 views
1
\documentclass[answers]{exam}
2
\newif\ifanswers
3
\answerstrue % comment out to hide answers
4
5
\usepackage{lastpage} % Required to determine the last page for the footer
6
\usepackage{extramarks} % Required for headers and footers
7
\usepackage[usenames,dvipsnames]{color} % Required for custom colors
8
\usepackage{graphicx} % Required to insert images
9
\usepackage{listings} % Required for insertion of code
10
\usepackage{courier} % Required for the courier font
11
\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
12
\usepackage{enumerate}
13
\usepackage{subfigure}
14
\usepackage{booktabs}
15
\usepackage{amsmath, amsthm, amssymb}
16
\usepackage{hyperref}
17
\usepackage{datetime}
18
\usepackage{minted}
19
\settimeformat{ampmtime}
20
\usepackage{algpseudocode}
21
\usepackage{algorithmicx}
22
\usepackage[ruled]{algorithm}
23
\usepackage{tikz-dependency}
24
25
\usepackage{tikz}
26
\usetikzlibrary{positioning,patterns,fit,calc}
27
% Margins
28
\topmargin=-0.45in
29
\evensidemargin=0in
30
\oddsidemargin=0in
31
\textwidth=6.5in
32
\textheight=9.0in
33
\headsep=0.25in
34
35
\linespread{1.1} % Line spacing
36
37
% Set up the header and footer
38
%\pagestyle{fancy}
39
%\rhead{\hmwkAuthorName} % Top left header
40
%\lhead{\hmwkClass: \hmwkTitle} % Top center head
41
%\lfoot{\lastxmark} % Bottom left footer
42
%\cfoot{} % Bottom center footer
43
%\rfoot{Page\ \thepage\ of\ \protect\pageref{LastPage}} % Bottom right footer
44
%\renewcommand\headrulewidth{0.4pt} % Size of the header rule
45
%\renewcommand\footrulewidth{0.4pt} % Size of the footer rule
46
47
\pagestyle{headandfoot}
48
\runningheadrule{}
49
\firstpageheader{CS 224n}{Assignment 3}{}
50
\runningheader{CS 224n} {Assignment 3} {Page \thepage\ of \numpages}
51
\firstpagefooter{}{}{} \runningfooter{}{}{}
52
53
\setlength\parindent{0pt} % Removes all indentation from paragraphs
54
55
%----------------------------------------------------------------------------------------
56
% CODE INCLUSION CONFIGURATION
57
%----------------------------------------------------------------------------------------
58
59
\definecolor{MyDarkGreen}{rgb}{0.0,0.4,0.0} % This is the color used for comments
60
\lstloadlanguages{Python} % Load Perl syntax for listings, for a list of other languages supported see: ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/listings/listings.pdf
61
\lstset{language=Python, % Use Perl in this example
62
frame=single, % Single frame around code
63
basicstyle=\footnotesize\ttfamily, % Use small true type font
64
keywordstyle=[1]\color{Blue}\bf, % Perl functions bold and blue
65
keywordstyle=[2]\color{Purple}, % Perl function arguments purple
66
keywordstyle=[3]\color{Blue}\underbar, % Custom functions underlined and blue
67
identifierstyle=, % Nothing special about identifiers
68
commentstyle=\usefont{T1}{pcr}{m}{sl}\color{MyDarkGreen}\small, % Comments small dark green courier font
69
stringstyle=\color{Purple}, % Strings are purple
70
showstringspaces=false, % Don't put marks in string spaces
71
tabsize=5, % 5 spaces per tab
72
%
73
% Put standard Perl functions not included in the default language here
74
morekeywords={rand},
75
%
76
% Put Perl function parameters here
77
morekeywords=[2]{on, off, interp},
78
%
79
% Put user defined functions here
80
morekeywords=[3]{test},
81
%
82
morecomment=[l][\color{Blue}]{...}, % Line continuation (...) like blue comment
83
numbers=left, % Line numbers on left
84
firstnumber=1, % Line numbers start with line 1
85
numberstyle=\tiny\color{Blue}, % Line numbers are blue and small
86
stepnumber=5 % Line numbers go in steps of 5
87
}
88
89
%----------------------------------------------------------------------------------------
90
% NAME AND CLASS SECTION
91
%----------------------------------------------------------------------------------------
92
93
\newcommand{\hmwkTitle}{Dependency Parsing} % Assignment title
94
\newcommand{\hmwkClass}{CS\ 224n Assignment \#3} % Course/class
95
\newcommand{\ifans}[1]{\ifanswers \color{red} \textbf{Solution: } #1 \color{black} \fi}
96
97
% \newcommand{\ifans}[1]{}
98
99
\input macros.tex
100
\input std_macros.tex
101
102
%----------------------------------------------------------------------------------------
103
% TITLE PAGE
104
%----------------------------------------------------------------------------------------
105
\qformat{\Large\bfseries\thequestion{}. \thequestiontitle{} (\thepoints{})\hfill}
106
107
\title{
108
\vspace{-1in}
109
\textmd{\textbf{\hmwkClass:\ \hmwkTitle}}
110
}
111
\author{}
112
%\date{\textit{\small Updated \today\ at \currenttime}} % Insert date here if you want it to appear below your name
113
\date{}
114
115
\setcounter{section}{0} % one-indexing
116
\begin{document}
117
118
\maketitle
119
% \vspace{-10pt}
120
121
In this assignment, you will build a neural dependency parser using PyTorch. For a review of the fundamentals of PyTorch, please check out the PyTorch review session on Canvas. In Part 1, you will learn about two general neural network techniques (Adam Optimization and Dropout). In Part 2, you will implement and train a dependency parser using the techniques from Part 1, before analyzing a few erroneous dependency parses.
122
123
Please tag the questions correctly on Gradescope, the TAs will take points off if you don't tag questions.
124
\begin{questions}
125
\input{q1.tex}
126
\newpage
127
\input{q2.tex}
128
\end{questions}
129
130
\input{submission.tex}
131
\end{document}
132