You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/12/16 12:02:35 UTC
[GitHub] [incubator-mxnet] GPoloVera opened a new issue #17088: HuberLoss()
ValueRror
GPoloVera opened a new issue #17088: HuberLoss() ValueRror
URL: https://github.com/apache/incubator-mxnet/issues/17088
## Description
Using the **HuberLoss()** (with or without parameters) from the module loss raise a **ValueError** exception with the message. Using it directly, with a simple call, no need to be within any autograd.record() or something more complex.
### Error Message
> ValueError: HybridBlock, there must be one NDArray or one Symbol in the input. Please check the type of the args.
Stack Trace:
Traceback (most recent call last)
```
<ipython-input-18-60102250f530> in <module>
2 from mxnet.gluon import loss as gloss
3 loss = gloss.HuberLoss(0.5) # The squared loss is also known as the L2 norm loss
----> 4 loss(5,6)
~/.conda/envs/d2l/lib/python3.7/site-packages/mxnet/gluon/block.py in __call__(self, *args)
691 hook(self, args)
692
--> 693 out = self.forward(*args)
694
695 for hook in self._forward_hooks.values():
~/.conda/envs/d2l/lib/python3.7/site-packages/mxnet/gluon/block.py in forward(self, x, *args)
1134 ' types for the input. Please check the type of the args.\n')
1135 if not has_symbol and not has_ndarray:
-> 1136 raise ValueError('In HybridBlock, there must be one NDArray or one Symbol in the input.'
1137 ' Please check the type of the args.\n')
1138 if has_ndarray:
```
## To Reproduce
```
from mxnet.gluon import loss as gloss
loss = gloss.HuberLoss(0.5)
loss(5,6)`
```
### Steps to reproduce
```
from mxnet.gluon import loss as gloss
loss = gloss.HuberLoss(0.5)
loss(5,6)`
```
## What have you tried to solve it?
1. I have tried to reinstall last version of mxnet again and the problem keeps.
## Environment
We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below:
```
curl --retry 10 -s https://raw.githubusercontent.com/dmlc/gluon-nlp/master/tools/diagnose.py | python
# ----------Python Info----------
Version : 3.7.5
Compiler : Clang 4.0.1 (tags/RELEASE_401/final)
Build : ('default', 'Oct 25 2019 10:52:18')
Arch : ('64bit', '')
------------Pip Info-----------
Version : 19.3.1
Directory : /Users/gonzalopolo/.conda/envs/d2l/lib/python3.7/site-packages/pip
----------MXNet Info-----------
Version : 1.6.0
Directory : /Users/gonzalopolo/.conda/envs/d2l/lib/python3.7/site-packages/mxnet
Num GPUs : 0
Commit Hash : 4da14a22385622c35e9a5c9c3e8a17c07f718cad
----------System Info----------
Platform : Darwin-19.2.0-x86_64-i386-64bit
system : Darwin
node : Gonzalos-MacBook-Pro.local
release : 19.2.0
version : Darwin Kernel Version 19.2.0: Sat Nov 9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64
----------Hardware Info----------
machine : x86_64
processor : i386
b'machdep.cpu.brand_string: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz'
b'machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C'
b'machdep.cpu.leaf7_features: RDWRFSGS TSC_THREAD_OFFSET SGX BMI1 AVX2 SMEP BMI2 ERMS INVPCID FPU_CSDS MPX RDSEED ADX SMAP CLFSOPT IPT SGXLC MDCLEAR TSXFA IBRS STIBP L1DF SSBD'
b'machdep.cpu.extfeatures: SYSCALL XD 1GBPAGE EM64T LAHF LZCNT PREFETCHW RDTSCP TSCI'
----------Network Test----------
Setting timeout: 10
Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0147 sec, LOAD: 1.0370 sec.
Timing for GluonNLP GitHub: https://github.com/dmlc/gluon-nlp, DNS: 0.0005 sec, LOAD: 0.9149 sec.
Timing for GluonNLP: http://gluon-nlp.mxnet.io, DNS: 0.0511 sec, LOAD: 0.5621 sec.
Timing for D2L: http://d2l.ai, DNS: 0.0405 sec, LOAD: 0.0580 sec.
Timing for D2L (zh-cn): http://zh.d2l.ai, DNS: 0.0492 sec, LOAD: 0.4651 sec.
Timing for FashionMNIST: https://repo.mxnet.io/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0528 sec, LOAD: 0.8639 sec.
Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0340 sec, LOAD: 0.5830 sec.
Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0264 sec, LOAD: 0.0592 sec.
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services