latex 自带 Tikz 画图包 Example: Kalman Filter System Model.
基于 Matplotlib 的Viznet
在线生成卷积网络结构图:ConvNetDraw
示例:
···python
import numpy as np
from viznet import connecta2a, node_sequence, NodeBrush, EdgeBrush, DynamicShow
def draw_feed_forward(ax, num_node_list):
num_hidden_layer = len(num_node_list) - 2 # 隐藏层数
token_list = ['\sigma^z'] +
['y^{(%s)}' % (i + 1) for i in range(num_hidden_layer)] + ['\psi']
kind_list = ['nn.input'] + ['nn.hidden'] * num_hidden_layer + ['nn.output']
radius_list = [0.3] + [0.2] * num_hidden_layer + [0.3] # 半径大小
y_list = - 1.5 * np.arange(len(num_node_list)) # 每一层节点所在的位置的纵轴坐标,全取负值说明网络是自顶而下的
def real_bp():
with DynamicShow((6, 6), '_feed_forward.png') as d: # 隐藏坐标轴
draw_feed_forward(d.ax, num_node_list=[5, 4, 1])
if name == 'main':
real_bp()
···