[GitHub] [incubator-mxnet] anjishnu edited a comment on issue #17298: [MXNET-1438] Adding SDML loss function

2020-01-15 Thread GitBox
anjishnu edited a comment on issue #17298: [MXNET-1438] Adding SDML loss 
function
URL: https://github.com/apache/incubator-mxnet/pull/17298#issuecomment-574802286
 
 
   @haojin2 if I randomized the input data in the original test code the losses 
would would have different values during each run (SDML loss imposes a 
distribution over the relative distances of data points in a minibatch) - so I 
would not be able to compare the output against precomputed loss values any 
more - thus the original unit test procedure cannot be reused.
   
   That's why I added a test that fits a toy model to some toy data instead. 
The current test was running in ~50 ms on my machine on CPU. Would love to hear 
your thoughts on how to improve on this.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-mxnet] anjishnu edited a comment on issue #17298: [MXNET-1438] Adding SDML loss function

2020-01-14 Thread GitBox
anjishnu edited a comment on issue #17298: [MXNET-1438] Adding SDML loss 
function
URL: https://github.com/apache/incubator-mxnet/pull/17298#issuecomment-574458020
 
 
   It looks a little tricky to port this into the 'fit' and 'score' paradigm 
since this is a retrieval specific loss function which uses the other elements 
in a batch as implicit negative samples - and I'm not sure how cleanly it fits 
into the Module API for this kind of test. Specially since the loss computation 
needs to know the shape of the minibatch which doesn't seem to be possible in 
the symbol API.
   
   The loss only guarantees that associated pairs will be closer in the chosen 
metric space after learning as compared to the non-associated pairs. 
   
   Maybe I can write something equivalent using the gluon API, to train a small 
network and ensure it learns the right associations. I'll come up with a 
proposal shortly.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-mxnet] anjishnu edited a comment on issue #17298: [MXNET-1438] Adding SDML loss function

2020-01-14 Thread GitBox
anjishnu edited a comment on issue #17298: [MXNET-1438] Adding SDML loss 
function
URL: https://github.com/apache/incubator-mxnet/pull/17298#issuecomment-574458020
 
 
   It looks a little tricky to port this into the 'fit' and 'score' paradigm 
since this is a retrieval specific loss function which uses the other elements 
in a batch as implicit negative samples - and I'm not sure how cleanly it fits 
into the Module API for this kind of test. 
   
   The loss only guarantees that associated pairs will be closer in the chosen 
metric space after learning as compared to the non-associated pairs. 
   
   Maybe I can write something equivalent using the gluon API, to train a small 
network and ensure it learns the right associations. I'll come up with a 
proposal shortly.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [incubator-mxnet] anjishnu edited a comment on issue #17298: [MXNET-1438] Adding SDML loss function

2020-01-14 Thread GitBox
anjishnu edited a comment on issue #17298: [MXNET-1438] Adding SDML loss 
function
URL: https://github.com/apache/incubator-mxnet/pull/17298#issuecomment-574415884
 
 
   @haojin2 Sure will address the sanity cases.
   
   Can you give an example of a unit test that is appropriately randomized so I 
can base it on that?


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:
us...@infra.apache.org


With regards,
Apache Git Services