Revision 75dffd7fc5e81e8f3711f024e48270550dbf149f authored by Nishant Panchal on 07 December 2022, 16:55:06 UTC, committed by GitHub on 07 December 2022, 16:55:06 UTC
Using .item() to get the value in the tensor that is returned by .std().
This should fix the issue where the type of the std calculation is not
an int or float.

Signed-off-by: Nishant Panchal
<68797723+Nishantppanchal@users.noreply.github.com>

Fixes #5674 .

### Description

When we use .std() on a tensor, a tensor with the standard deviation
inside is returned. To get this standard deviation, we also have to use
.item(). However, this was not done, so I fixed it.

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [x] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [x] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.

Signed-off-by: Nishant Panchal <68797723+Nishantppanchal@users.noreply.github.com>
1 parent 7bebb6b
Raw File
.gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.coverage/
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# temporary unittest artifacts
tests/testing_data/temp_*

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# pytype cache
.pytype/

# mypy
.mypy_cache/
examples/scd_lvsegs.npz
temp/
.idea/

*~

# Remove .pyre temporary config files
.pyre
.pyre_configuration

# temporary editor files that should not be in git
*.orig
*.bak
*.swp
.DS_Store

# temporary testing data MedNIST
tests/testing_data/MedNIST*
tests/testing_data/*Hippocampus*
tests/testing_data/*.tiff
tests/testing_data/schema.json
tests/testing_data/endo.mp4
tests/testing_data/ultrasound.avi
tests/testing_data/train_data_stats.yaml
tests/testing_data/eval_data_stats.yaml

# clang format tool
.clang-format-bin/

# VSCode
.vscode/
*.zip

# profiling results
*.prof
back to top