File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1414# KIND, either express or implied. See the License for the
1515# specific language governing permissions and limitations
1616# under the License.
17-
17+ # pylint: disable=invalid-name, unused-argument, unused-variable
18+ """Ground truth max and average pooling operators in python."""
1819import itertools
1920import math
20- from typing import *
21+ from typing import List , Tuple
2122
2223import numpy as np
2324import tvm
@@ -61,6 +62,7 @@ def pad_tensor(
6162 padding_after : List [int ],
6263 dtype : str ,
6364) -> np .array :
65+ """Pad the spatial dimensions of the given array."""
6466 orig_shape = list (np_arr .shape )
6567 padded_shape = list (np_arr .shape )
6668 n = len (orig_shape )
@@ -110,7 +112,7 @@ def poolnd_python(
110112 out_shape .append (int (math .floor (val ) + 1 ))
111113 out_shape = tuple (out_shape )
112114
113- # Create a padded array, and a boolean mask showing which values are padded values and which are not
115+ # Create a padded array, and a boolean mask showing which values are padded values
114116 pad_value = 0
115117 if pool_type == "max" and not count_include_pad :
116118 pad_value = tvm .te .min_value (dtype ).value
You can’t perform that action at this time.
0 commit comments