Graphviz輕松畫神經(jīng)網(wǎng)絡圖

推薦教程學習Graphviz繪圖
下載戳官網(wǎng)
嘗試畫了個RNN的圖,效果如下:

RNN結構圖

代碼如下:

digraph ""
   {
   color=white; 
   labelloc = "b";
   #node[color="#FF6347"]
   edge[penwidth="1"]
    
   node [shape=plaintext];
   n001 [label="Input Layer"];
   n002 [label="Hidden Layer"];
   n004 [label="Output Layer"];
   n001 -> n002;
   n002 -> n004;

   node  [shape=record, label=" | | | | | ...|  ",height=".3",penwidth=".8"];
   n01 [label="x(t-1)", fillcolor="#CCE5FF", style=filled] ;
   n02 [label="x(t)", fillcolor="#CCE5FF", style=filled] ;
   node [shape=Mrecord, label=" | | | | | ...|  ",height=".3"];
   n03 [label="...", fillcolor="#FFE6CC", style=filled] ;
   n04 [label="h(t-1)", fillcolor="#FFE6CC", style=filled] ;
   n05 [label="h(t)", fillcolor="#FFE6CC", style=filled] ;
   n08 [label="...", fillcolor="#FFE6CC", style=filled] ;
   node  [shape=record, label=" | | | | | ...|  ",height=".3"];
   n06 [label="o(t-1)", fillcolor="#CCE5FF", style=filled] ;
   n07 [label="o(t)", fillcolor="#CCE5FF", style=filled] ;

   n01 -> n04 [label="U"] ;
   n03 -> n04 [label="W"] ;
   n02 -> n05 [label="U"];
   n04 -> n05 [label="W"];
   n04 -> n06 [label="V"];
   n05 -> n07 [label="V"];
   n05 -> n08 [label="W"];
   {rank=same; n001 n01 n02}
   {rank=same; n002 n03 n04 n05 n08}
   {rank=same; n004 n06 n07}
   }


最后編輯于
?著作權歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

友情鏈接更多精彩內(nèi)容