提交 a03754a7 authored 作者: João Victor Risso's avatar João Victor Risso

Change error return type for consistency in gradient of inputs

上级 797527d2
......@@ -105,7 +105,7 @@ APPLY_SPECIFIC(dnn_sptf_gi)(PyGpuArrayObject * input,
default:
PyErr_SetString( PyExc_TypeError,
"GpuDnnTransformerGradI: unsupported type for input in spatial transformer gradients" );
return -1;
return 1;
}
if ( grid->ga.typecode != GA_FLOAT &&
......@@ -114,7 +114,7 @@ APPLY_SPECIFIC(dnn_sptf_gi)(PyGpuArrayObject * input,
{
PyErr_SetString( PyExc_TypeError,
"GpuDnnTransformerGradI: unsupported data type for grid in spatial transformer gradients." );
return -1;
return 1;
}
if ( theano_prep_output( input_grad, PyGpuArray_NDIM( input ),
......@@ -187,7 +187,7 @@ APPLY_SPECIFIC(dnn_sptf_gi)(PyGpuArrayObject * input,
"GpuDnnTransformerGradI: failed to compute gradients of the inputs: %s",
cudnnGetErrorString( err ) );
return -1;
return 1;
}
return 0;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论