Commit Graph

19 Commits

Author SHA1 Message Date
Negin Raoof
a77d633db1 [ONNX] Fix view for dynamic input shape (#43558)
Summary:
Export of view op with dynamic input shape is broken when using tensors with a 0-dim.
This fix removes symbolic use of static input size to fix this issue.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/43558

Reviewed By: ailzhang

Differential Revision: D23965090

Pulled By: bzinodev

fbshipit-source-id: 628e9d7ee5d53375f25052340ca6feabf7ba7c53
2020-09-28 14:46:51 -07:00
liqunfu
c3bf402cbb handle onnx nll with default ignore index (#44816)
Summary:
in ONNX NegativeLogLikelihoodLoss specification, ignore_index is optional without default value.
therefore, when convert nll op to ONNX, we need to set ignore_index attribute even if it is not specified (e.g. ignore_index=-100).

Pull Request resolved: https://github.com/pytorch/pytorch/pull/44816

Reviewed By: ezyang

Differential Revision: D23880354

Pulled By: bzinodev

fbshipit-source-id: d0bdd58d0a4507ed9ce37133e68533fe6d1bdf2b
2020-09-27 23:26:19 -07:00
Xiang Gao
20ac736200 Remove py2 compatible future imports (#44735)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/44735

Reviewed By: mruberry

Differential Revision: D23731306

Pulled By: ezyang

fbshipit-source-id: 0ba009a99e475ddbe22981be8ac636f8a1c8b02f
2020-09-16 12:55:57 -07:00
kshitij12345
c7787f7fbf [numpy compatibility]Fix argmin/argmax when multiple max/min values (#42004)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/41998
Fixes https://github.com/pytorch/pytorch/issues/22853

Pull Request resolved: https://github.com/pytorch/pytorch/pull/42004

Reviewed By: ngimel

Differential Revision: D23049003

Pulled By: mruberry

fbshipit-source-id: a6fddbadfec4b8696730550859395ce4f0cf50d6
2020-08-28 06:42:42 -07:00
neginraoof
41865d8f19 [ONNX] Update black_listed_operators for opset 12 (#39414)
Summary:
Remove black_listed_operators for opset 12 as we now support these ops.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/39414

Reviewed By: hl475

Differential Revision: D21915584

Pulled By: houseroad

fbshipit-source-id: 37ec7bdd2b5a845484535054026d6613d0921b7a
2020-06-19 13:33:25 -07:00
Ksenija Stanojevic
858ab75046 ONNX Export Support for Celu (#38243)
Summary:
Add ONNX export support for torch.nn.CELU
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38243

Differential Revision: D21562188

Pulled By: houseroad

fbshipit-source-id: a7056b3127c88e4a96a551ae906440ed8a153e42
2020-06-01 23:26:44 -07:00
Lara Haidar
9907a3eb65 Update Argmin/Argmax ONNX Export (#38329)
Summary:
Update Argmin/Argmax ONNX export in opset 12 to export with "select_last_index", and export correctly cases where the same value appears multiple time in the input tensor.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38329

Reviewed By: hl475

Differential Revision: D21613799

Pulled By: houseroad

fbshipit-source-id: 4597e23561f444c4e56d30c735dae7e9a8a41c5e
2020-05-19 16:56:33 -07:00
Ksenija Stanojevic
5b12c29b17 [ONNX]Update Dropout Export (#37641)
Summary:
Dropout operator in ONNX has additional input: training_mode.
Update Dropout export to match changes made in ONNX
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37641

Reviewed By: hl475

Differential Revision: D21613782

Pulled By: houseroad

fbshipit-source-id: f34d1a1f8116200c6609b4b43489d5610f6d0ec4
2020-05-18 13:10:44 -07:00
Yael Dekel
ece878e5b8 [ONNX] Add GreaterOrEqual and LessOrEqual to opset 12 ONNX export (#38311)
Summary:
GreaterOrEqual and LessOrEqual were added in opset 12, this PR adds support to export these operators to ONNX instead of using "not" and "less than" or "greater than".
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38311

Reviewed By: hl475

Differential Revision: D21613795

Pulled By: houseroad

fbshipit-source-id: 121d936d9787876ecb19cf24d661261e4abc82ab
2020-05-18 11:59:26 -07:00
neginraoof
333e29c45f [ONNX] Fix pow op export (#38065)
Summary:
Fix pow type cast for opset 9 and update opset 12
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38065

Differential Revision: D21485353

Pulled By: malfet

fbshipit-source-id: 3993e835ffad07b2e6585eb5cf1cb7c8474de2ec
2020-05-11 15:46:44 -07:00
Zeeshan Siddiqui
6c0f447b51 Remove ONNX BatchNorm(12) test and converter. (#37309)
Summary:
Pursuant to https://github.com/onnx/onnx/pull/2750 we must remove PyTorch ONNX exporter related changes to BatchNorm(12) that were introduced as part of https://github.com/pytorch/pytorch/pull/35567. This change is also needed to unblock ONNX [BUILD CI failures](https://circleci.com/gh/onnx/onnx/4629?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link) caused by PyTorch/Caffe2 tests.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37309

Reviewed By: hl475

Differential Revision: D21288914

Pulled By: houseroad

fbshipit-source-id: 15b076a2af55918dcd57f4e2fc77accd3d1510bd
2020-04-28 17:45:01 -07:00
Ksenija Stanojevic
92e91cee8d ONNX Export Support for CrossEntropyLoss (#34830)
Summary:
Add ONNX export support for torch.nn.CrossEntropyLoss.

This PR makes following changes:
1. Updates nll_loss export
2. Makes a post pass for SoftmaxCrossEntropy
Pull Request resolved: https://github.com/pytorch/pytorch/pull/34830

Reviewed By: hl475

Differential Revision: D21230712

Pulled By: houseroad

fbshipit-source-id: c81911a41968e23813ba10274340ce4d8ba1ed78
2020-04-25 17:56:53 -07:00
Negin Raoof
cb27067b32 [ONNX] Remove inverse op (#37005)
Summary:
ONNX inverse op is being removed.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37005

Reviewed By: hl475

Differential Revision: D21230728

Pulled By: houseroad

fbshipit-source-id: 7e10414918c57938cda4ca03875c070319d429fb
2020-04-25 12:23:15 -07:00
Negin Raoof
681ca45717 [ONNX] Export torch.inverse op (#35318)
Summary:
Added support for torch.inverse export as part of opset 12
Pull Request resolved: https://github.com/pytorch/pytorch/pull/35318

Reviewed By: hl475

Differential Revision: D20865900

Pulled By: houseroad

fbshipit-source-id: be12b5194d21408cae24eec16e9e12377e8546ad
2020-04-07 10:48:33 -07:00
Lara Haidar
728c7dcea3 ONNX Update training ops and training amenable export API (#35567)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/35567

Reviewed By: hl475

Differential Revision: D20715339

Pulled By: houseroad

fbshipit-source-id: ad88097e76b169035ab5814b769dc1bed54c6008
2020-03-29 23:14:25 -07:00
Alban Desmaison
45e1be9762 Revert D19710370: [pytorch][PR] ONNX Update training ops and training amenable export API
Test Plan: revert-hammer

Differential Revision:
D19710370

Original commit changeset: e5e79d385529

fbshipit-source-id: d0114dc561a3415869805d3fbf43b92730bbcf54
2020-03-27 06:51:05 -07:00
Lara Haidar
025a0abe5a ONNX Update training ops and training amenable export API (#32950)
Summary:
- Update Dropout and Batchnorm in opset 12 : https://github.com/onnx/onnx/pull/2568
- Update api logic for exporting to ONNX training amenable models
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32950

Reviewed By: hl475

Differential Revision: D19710370

Pulled By: houseroad

fbshipit-source-id: e5e79d38552936966662c41d39ddf33be1ba3e35
2020-03-27 00:39:39 -07:00
Lara Haidar
8216d9ae64 ONNX Export Support for NLLLoss (#33509)
Summary:
Adding ONNX export support for torch.nn.NLLLoss().
Pull Request resolved: https://github.com/pytorch/pytorch/pull/33509

Reviewed By: hl475

Differential Revision: D20052212

Pulled By: houseroad

fbshipit-source-id: 62efcff4efa1e0e97c65ad1b670c2fc1da08d28f
2020-03-05 11:13:21 -08:00
neginraoof
e03e4f3a2d [ONNX] Add einsum export (#32716)
Summary:
Adding symbolic for onnx einsum as part of opset 12
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32716

Reviewed By: hl475

Differential Revision: D19626168

Pulled By: houseroad

fbshipit-source-id: d8cc8af5f05f36aca3cd55dead602261ccdfec51
2020-02-03 12:56:50 -08:00