This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
Custom linear regression diverges on simplest example, but built-in LinearRegression does not #11111
Unanswered
justanotheruser
asked this question in
Q&A
Replies: 1 comment
-
Refer this tutorial for creating custom operators - https://mxnet.incubator.apache.org/tutorials/gluon/customop.html?highlight=customop Also consider posting your question here - https://discuss.mxnet.io @sandeep-krishnamurthy please label - "Operator", "Question", |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to implement some custom loss layer, but I found that I can't make work even simplest custom linear regression layer with simplest model. I want to make conv net with one layer that accepts RGB image (entirely blue, green or red) and outputs it.
This is my custom operator code:
This is my model:
When I replace last line with commented out lines, SGD converges. With custom loss output of conv layer becomes hugely negative VERY fast, and after a few iterations it becomes full of nan's. What am I doing wrong?
My environment:
----------Python Info----------
Version : 3.6.3
Compiler : GCC 5.4.0 20160609
Build : ('default', 'Oct 6 2017 08:44:35')
Arch : ('64bit', 'ELF')
------------Pip Info-----------
Version : 10.0.1
Directory : /home/d-sleptsov/.local/lib/python3.6/site-packages/pip
----------MXNet Info-----------
Version : 1.2.0
Directory : /home/d-sleptsov/3rdParty/incubator-mxnet/python/mxnet
Hashtag not found. Not installed from pre-built package.
----------System Info----------
Platform : Linux-4.13.0-43-generic-x86_64-with-Ubuntu-16.04-xenial
system : Linux
node : d-sleptsov
release : 4.13.0-43-generic
version : #48~16.04.1-Ubuntu SMP Thu May 17 12:56:46 UTC 2018
----------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): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 94
Model name: Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz
Stepping: 3
CPU MHz: 800.052
CPU max MHz: 3300.0000
CPU min MHz: 800.0000
BogoMIPS: 5424.00
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 6144K
NUMA node0 CPU(s): 0-3
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 art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti retpoline intel_pt rsb_ctxsw spec_ctrl tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp
Beta Was this translation helpful? Give feedback.
All reactions