Skip to content

3063 Fix the complex Tensor issue in type conversion#3064

Merged
wyli merged 8 commits into
Project-MONAI:devfrom
Nic-Ma:3063-fix-np-convert
Oct 4, 2021
Merged

3063 Fix the complex Tensor issue in type conversion#3064
wyli merged 8 commits into
Project-MONAI:devfrom
Nic-Ma:3063-fix-np-convert

Conversation

@Nic-Ma

@Nic-Ma Nic-Ma commented Oct 4, 2021

Copy link
Copy Markdown
Contributor

Fixes #3063 .

Description

This PR fixed the issue that PyTorch 1.5.1 can't support complex Tensor.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@Nic-Ma

Nic-Ma commented Oct 4, 2021

Copy link
Copy Markdown
Contributor Author

/black

@Nic-Ma

Nic-Ma commented Oct 4, 2021

Copy link
Copy Markdown
Contributor Author

Tested this PR in PyTorch 1.5.1:

root@apt-sh-ai:/workspace/data/medical/MONAI# python
Python 3.8.10 | packaged by conda-forge | (default, May 11 2021, 07:01:05)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print(torch.__version__)
1.5.1
>>> exit()
root@apt-sh-ai:/workspace/data/medical/MONAI# python tests/test_k_space_spike_noised.py
..................
----------------------------------------------------------------------
Ran 18 tests in 3.938s

OK

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma

Nic-Ma commented Oct 4, 2021

Copy link
Copy Markdown
Contributor Author

/black

@wyli

wyli commented Oct 4, 2021

Copy link
Copy Markdown
Contributor

/build

@wyli wyli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it looks good to me.

@wyli wyli merged commit 7ad0f6e into Project-MONAI:dev Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error from convert_to_tensor

2 participants