Replies: 7 comments
-
I think sym.SoftmaxOutput considered the numerical stability problem while gluon SoftmaxCELoss not. reference in Chinese. EDIT: change
to
|
Beta Was this translation helpful? Give feedback.
-
I want to note that in symbolic interface I normalize the loss(gradient) in each softmax container and rescale the total gradients in optimizer by 1.0/gpu_num. In gluon interface I do not apply any gradient normalization but calling |
Beta Was this translation helpful? Give feedback.
-
When trying to reproduce, I got the following error message:
Is it something to be expected? |
Beta Was this translation helpful? Give feedback.
-
@nttstar mentioned using the option |
Beta Was this translation helpful? Give feedback.
-
I'm trying to observe the non-convergence, but the error message is not mentioned. I'd like to know if they are two separate issues, or directly related. |
Beta Was this translation helpful? Give feedback.
-
@hetong007 They're the same issue. This error msg means the network fails to converge at that time so the output embedding layer has illegal values. Training acc is also decreasing. |
Beta Was this translation helpful? Give feedback.
-
I have spent sometime in this issue, it is not related to the number of classes. If I fake the labels into 100 classes, it still doesn't converge. The model's defined at https://github.com/deepinsight/insightface/blob/master/gluon/blocks/UDD.py#L27. From the definition, seems it is Also, it is reported by @nttstar that if attaching this layer to the end of @piiswrong @eric-haibin-lin Do you recall any other issues related to this parameter? |
Beta Was this translation helpful? Give feedback.
-
Description
Training with 85K classes failed while I use gluon trainer with SoftmaxCELoss. But it is ok if I defined the same network by gluon but training with symbolic module interface(sym.SoftmaxOutput).
Error Message:
training acc starts from 0.0 to 0.001, but then drop to 0.0 again after about 1K iterations.
Steps to reproduce
insightface/gluon/train.py
and you can see the training acc changing at about 1.5K iterations. Validation process will start every 2K iterations, depends on --verbose param.The below command works fine:
The below command does not converge:
Environment info (Required)
----------Python Info----------
('Version :', '2.7.5')
('Compiler :', 'GCC 4.8.5 20150623 (Red Hat 4.8.5-16)')
('Build :', ('default', 'Aug 4 2017 00:39:18'))
('Arch :', ('64bit', 'ELF'))
------------Pip Info-----------
('Version :', '9.0.2')
('Directory :', '/usr/lib/python2.7/site-packages/pip')
----------MXNet Info-----------
('Version :', '1.2.0')
('Directory :', '/usr/lib/python2.7/site-packages/mxnet')
('Commit Hash :', 'f0be910ae5e3fa01e0a9aaf98dbd4616c35be76b')
----------System Info----------
('Platform :', 'Linux-3.10.0-327.el7.x86_64-x86_64-with-centos-7.4.1708-Core')
('system :', 'Linux')
('node :', 'cdsl-gpu-a04')
('release :', '3.10.0-327.el7.x86_64')
('version :', '#1 SMP Thu Nov 19 22:10:57 UTC 2015')
----------Hardware Info----------
('machine :', 'x86_64')
('processor :', 'x86_64')
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 48
On-line CPU(s) list: 0-47
Thread(s) per core: 2
Core(s) per socket: 12
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 79
Model name: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
Stepping: 1
CPU MHz: 2199.914
CPU max MHz: 2900.0000
CPU min MHz: 1200.0000
BogoMIPS: 4400.12
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 30720K
NUMA node0 CPU(s): 0-11,24-35
NUMA node1 CPU(s): 12-23,36-47
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdseed adx smap xsaveopt cqm_llc cqm_occup_llc
----------Network Test----------
Setting timeout: 10
Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0067 sec, LOAD: 2.4557 sec.
Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0062 sec, LOAD: 1.8693 sec.
Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.2143 sec, LOAD: 2.3253 sec.
Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0067 sec, LOAD: 1.1611 sec.
Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.5429 sec, LOAD: 2.8609 sec.
Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.0070 sec, LOAD: 1.6273 sec.
Beta Was this translation helpful? Give feedback.
All reactions