fixing a bug in resize op (#910)

* fixing a bug in resize op

* Enable onnx tests

* merge master
This commit is contained in:
Du Li 2019-04-26 06:48:51 -07:00 committed by GitHub
parent 5e3a266709
commit da0f9bf9a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View file

@ -18,6 +18,10 @@ enum UpsampleMode {
class UpsampleBase {
protected:
UpsampleBase(OpKernelInfo info) : scales_cached_(false) {
int start, end;
info.GetKernelDef().SinceVersion(&start, &end);
is_resize = (start == 10);
std::string mode;
ORT_ENFORCE(info.GetAttr<std::string>("mode", &mode).IsOK());
mode_ = StringToUpsampleMode(mode);
@ -28,7 +32,6 @@ class UpsampleBase {
ScalesValidation(scales_, mode_);
}
// opset 9
if (input_count > 1) {
const Tensor* scale;
bool get_scale = info.TryGetConstantInput(1, &scale);

View file

@ -84,12 +84,7 @@ backend_test.exclude(r'('
'|^test_zfnet512_cpu.*'
'|^test_gru_seq_length_cpu.*'
'|^test_mvn_cpu.*'
'|^test_resize_downsample_linear_cpu.*'
'|^test_resize_downsample_nearest_cpu.*'
'|^test_resize_nearest_cpu.*'
'|^test_resize_upsample_linear_cpu.*'
'|^test_resize_upsample_nearest_cpu.*'
'|^test_mod_float_mixed_sign_example*'
'|^test_mod_float_mixed_sign_example.*'
'|^test_reversesequence_batch_cpu.*'
'|^test_reversesequence_time_cpu.*'
'|^test_roialign_cpu.*'