We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 710f6d6 commit 7ddcb91Copy full SHA for 7ddcb91
torch/onnx/symbolic.py
@@ -206,6 +206,8 @@ def permute(g, self, dims):
206
207
208
def view(g, self, size):
209
+ if self.type().sizes()[0] == size[0]:
210
+ return g.op("Flatten", self, axis_i=1)
211
return g.op("Reshape", self, shape_i=size)
212
213
@@ -327,3 +329,23 @@ def abs(g, self):
327
329
328
330
def pow(g, self, exponent):
331
return g.op("Pow", self, exponent)
332
+
333
334
+def clamp(g, self, min, max):
335
+ return g.op("Clip", self, min_f=min, max_f=max)
336
337
338
+def max(g, self, other):
339
+ return g.op("Max", self, other)
340
341
342
+def min(g, self, other):
343
+ return g.op("Min", self, other)
344
345
346
+def eq(g, self, other):
347
+ return g.op("Equal", self, other)
348
349
350
+def exp(g, self):
351
+ return g.op("Exp", self)
0 commit comments