小编use*_*522的帖子

绘制神经网络

我正在尝试用 python 绘制神经网络图,到目前为止我已经能够使用这个脚本。

import matplotlib.pyplot as plt

def draw_neural_net(ax, left, right, bottom, top, layer_sizes):
    '''
    Draw a neural network cartoon using matplotilb.
    
    :usage:
        >>> fig = plt.figure(figsize=(12, 12))
        >>> draw_neural_net(fig.gca(), .1, .9, .1, .9, [4, 7, 2])
    
    :parameters:
        - ax : matplotlib.axes.AxesSubplot
            The axes on which to plot the cartoon (get e.g. by plt.gca())
        - left : float
            The center of the leftmost node(s) will be placed here
        - right : float
            The center of the rightmost node(s) will be …
Run Code Online (Sandbox Code Playgroud)

python matplotlib python-3.x

6
推荐指数
1
解决办法
175
查看次数

标签 统计

matplotlib ×1

python ×1

python-3.x ×1