mshr-h commented on code in PR #17841:
URL: https://github.com/apache/tvm/pull/17841#discussion_r2046041577
##########
tests/python/relax/test_frontend_from_fx.py:
##########
@@ -4513,5 +4513,143 @@ def main(
verify_model(Narrow(), [([5, 3], "float32")], {}, Expected)
+def test_norm():
+ input_info = [([1, 3, 5, 3], "float32")]
+
+ class Norm1(Module):
Review Comment:
Can we define something like a more generic norm module and pass `p`, `dim`,
and `keepdim` when instantiating?
```python
class Norm(Module):
def __init__(self, p, dim=None, keepdim=False):
self.p = p
self.dim = dim
self.keepdim = keepdim
def forward(self, x):
return torch.norm(x, p=self.p, dim=self.dim,
keepdim=self.keepdim)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]