NNVis.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:MLPractices 作者: carefree0910 项目源码 文件源码
def place_graph(graphs, half_block_width, img, i, j, x, y):
    """
    Render neuron graph
    :param graphs           : Neuron graphs
    :param half_block_width : int(neuron_graph_width / 2)
    :param img              : Canvas
    :param i                : i-th hidden layer
    :param j                : j-th neuron in i-th hidden layer
    :param x                : (x, y) is the center of the neuron graph on the canvas
    :param y                : (x, y) is the center of the neuron graph on the canvas
    """
    ############################################################
    #                  Write your code here!                   #
    ############################################################

    graph = graphs[i][j]
    img[y - half_block_width:y + half_block_width, x - half_block_width:x + half_block_width] = graph

    ############################################################
    #                           End                            #
    ############################################################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号