def put_text(img, i, layers, y):
"""
Put text on canvas
:param img : Canvas
:param i : i-th hidden layer, notice that layers[i].name is the name of i-th hidden layer
:param layers : Layers
:param y : (?, y) is the center of the neuron graph of i-th hidden layer
"""
############################################################
# Write your code here! #
############################################################
cv2.putText(img, layers[i].name, (12, y - 36), cv2.LINE_AA, 0.6, (0, 0, 0), 1)
############################################################
# End #
############################################################
评论列表
文章目录