CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

bug or mistake?

Open Feng-long opened this issue 9 years ago • 2 comments

When I use the multitask function in cntk as follows,

wtobjfcn(o1,w1,o2,w2) { A1 = Constant(w1) A2 = Constant(w2) T1 = Times(A1, o1) T2 = Times(A2, o2) O = Plus(T1, T2) } criter2 =Log(posterior) MSESqErr = SquareError(labels, output); objfcn = wtobjfcn(MeanSqErr,1,criter2,1,tag=criteria)

The objfun is MeanSqErr*10 + criter2*1. This only happens when the criter2 is Log(sth). Anyone meet the same problem?

Thanks.

Feng-long avatar Mar 17 '17 09:03 Feng-long

You should maybe try using ElementTimes() and not Times()

Edit: To elaborate, Times() may "auto-magically" expand your constant to match the tensor dimension and do something completely different than intended.

DanielMerget avatar Mar 30 '17 13:03 DanielMerget

Closing this issue since there was a suggestion and no further communication on this thread. Please reopen the issue with details if you need a follow up.

sayanpa avatar Jul 13 '17 00:07 sayanpa