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 #
############################################################
评论列表
文章目录