@@ -25,7 +25,7 @@ def test_avgpool_option1(self):
2525 # NOTE: take note of use of {{ }} below for handling TC with scalars
2626 LANG = """
2727 def avgpool(float(B, C, H, W) input) -> (output) {{
28- output(b, c, h, w) += input(b, c, h * {sH} + kh, w * {sW} + kw) where kh in 0:{kH}, kw in 0:{kW}
28+ output(b, c, h, w) +=! input(b, c, h * {sH} + kh, w * {sW} + kw) / ({kH} * {kW} ) where kh in 0:{kH}, kw in 0:{kW}
2929 }}
3030 """
3131 avgpool = tc .define (LANG , name = "avgpool" , constants = {"sH" :1 , "sW" :1 , "kH" :2 , "kW" :2 })
@@ -36,7 +36,7 @@ def test_avgpool_option2(self):
3636 # NOTE: take note of use of {{ }}
3737 LANG = """
3838 def avgpool(float(B, C, H, W) input) -> (output) {{
39- output(b, c, h, w) += input(b, c, h * {sh} + kh, w * {sw} + kw) where kh = [0, {kH}[, kw = [0, {kW}[
39+ output(b, c, h, w) +=! input(b, c, h * {sh} + kh, w * {sw} + kw) / ({kH} * {kW} ) where kh = [0, {kH}[, kw = [0, {kW}[
4040 }}
4141 """
4242 sH , sW , kH , kW = 1 , 1 , 2 , 2
@@ -51,7 +51,7 @@ def test_avgpool_option3(self):
5151 import re
5252 LANG = """
5353 def avgpool(float(B, C, H, W) input) -> (output) {
54- output(b, c, h, w) += input(b, c, h * <sh> + kh, w * <sw> + kw) where kh in 0:<kH>, kw in 0:<kW>
54+ output(b, c, h, w) +=! input(b, c, h * <sh> + kh, w * <sw> + kw) / (<kH> * <kW> ) where kh in 0:<kH>, kw in 0:<kW>
5555 }
5656 """
5757 sH , sW , kH , kW = 1 , 1 , 2 , 2
0 commit comments