MCPcopy Create free account
hub / github.com/ddsggcs/cv_learning_resnet50 / ComputeAvgPoolLayer

Function ComputeAvgPoolLayer

practice/python/infer.py:211–225  ·  view source on GitHub ↗

执行平均池化操作。 参数: in_data (numpy.ndarray): 需要进行平均池化的输入数据。 返回: numpy.ndarray: 平均池化后的结果。

(in_data)

Source from the content-addressed store, hash-verified

209
210
211def ComputeAvgPoolLayer(in_data):
212 """
213 执行平均池化操作。
214
215 参数:
216 in_data (numpy.ndarray): 需要进行平均池化的输入数据。
217
218 返回:
219 numpy.ndarray: 平均池化后的结果。
220 """
221 print("-- compute avgpool")
222 # 调用平均池化函数处理输入数据
223 res = pool.AvgPool(in_data)
224 print(res.shape)
225 return res
226
227
228# 这段代码定义了一个名为 ComputeReluLayer 的函数

Callers 1

runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected