crcrpar
(Masaki Kozuki)
April 24, 2019, 3:17am
1
Is it OK to accept nan value as max value?
I do not think this natural, so could anyone tell me why?
/* compute local max: */
int64_t maxindex = -1;
scalar_t maxval = -std::numeric_limits<float>::max();
int ih, iw;
for(ih = 0; ih < kH; ih++)
{
for(iw = 0; iw < kW; iw++)
{
scalar_t val = *(ip + ih*istrideH + iw*istrideW);
if ((val > maxval) || std::isnan(val))
{
maxval = val;
maxindex = (ih+istartH)*isizeW + (iw+istartW);
}
}
}
/* set output to local max */
*op = maxval;
yf225
(PyTorch Developer, Meta)
July 22, 2019, 11:06pm
2
As this is not a libtorch-specific question, would you like to post it in https://github.com/pytorch/pytorch/issues to reach a wider audience / get more help on the question?