2architecture.tex 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. \TODO{some text}
  2. \section{Input File Format}\label{sec:inputFileFormat}
  3. The input to \appname is a JSON file.
  4. An example is displayed in figure~\ref{fig:json-example}.
  5. The structure is as follows:
  6. \begin{itemize}
  7. \item The object in the JSON file is a node.
  8. \item A node has the attributes that are displayed in table~\ref{table:node-attributes}. \TODO{remove x and y from implementation}
  9. \item An edge has the attributes that are displayed in table~\ref{table:edge-attributes}.
  10. \end{itemize}
  11. \centering
  12. \begin{longtable}{|p{1.8cm}|p{2cm}|p{1.8cm}|p{8.5cm}|}
  13. \hline
  14. Attribute & Type & Optional & Explanation \\\hline\hline
  15. name & string & yes & If not omitted, this must be unique for a given parent node. \\\hline
  16. width & integer & yes & The minimum width of the node.
  17. The node can be wider if it contains other nodes that need more space. \\\hline
  18. height & integer & yes & The minimum height of the node.
  19. The node can be higher if it contains other nodes that need more space. \\\hline
  20. layers & list of lists of nodes & yes & The layers of nodes inside this node (Hierarchy). \\\hline
  21. edges & list of edges & yes & The edges between nodes whose parent node is this node. \\\hline
  22. \caption{Node Attributes}
  23. \label{table:node-attributes}
  24. \end{longtable}
  25. \centering
  26. \begin{longtable}{|p{1.8cm}|p{2cm}|p{1.8cm}|p{8.5cm}|}
  27. \hline
  28. Attribute & Type & Optional & Explanation \\\hline\hline
  29. source & string & no & The name of the source of this edge.
  30. Must be a node with the same parent node as the node specified by the \enquote{target} attribute. \\\hline
  31. target & string & no & The name of the target of this edge.
  32. Must be a node with the same parent node as the node specified by the \enquote{source} attribute. \\\hline
  33. \caption{Edge Attributes}
  34. \label{table:edge-attributes}
  35. \end{longtable}
  36. %\begin{figure}[tp]
  37. % \centering
  38. % \includegraphics[width=0.9\textwidth]{img/json.png}
  39. % \caption[Input file format]{Input file format illustrated as a HERM diagram}
  40. % \label{fig:iff}
  41. %\end{figure}
  42. \begin{figure}
  43. % \lstinputlisting[language=Python,emph={Conv2D,MaxPooling2D,Dropout,Flatten,Sequential,Dense}]{src/keras_example_conv.py}
  44. \begin{lstlisting}[language=json,emph={Conv2D,MaxPooling2D,Dropout,Flatten,Sequential,Dense}]
  45. {
  46. "layers":[
  47. [
  48. {
  49. "name":"n2",
  50. "width":10,
  51. "height":10
  52. },
  53. {
  54. "name":"n1",
  55. "width":10,
  56. "height":10,
  57. "layers":[
  58. [
  59. {
  60. "name":"n2",
  61. "width":10,
  62. "height":10
  63. }
  64. ]
  65. ]
  66. }
  67. ]
  68. ],
  69. "name":"n0"
  70. }
  71. \end{lstlisting}
  72. \caption[Example Input File]{Example Input file that is understood by \appname.}
  73. \label{fig:json-example}
  74. \end{figure}