Bump required conv2d version.

PiperOrigin-RevId: 258827317
This commit is contained in:
Suharsh Sivakumar 2019-07-18 12:56:34 -07:00 committed by TensorFlower Gardener
parent 4bc6573ab6
commit f1f5dfc5b8
2 changed files with 9 additions and 5 deletions

View File

@ -59,7 +59,7 @@ OperatorProperty GetOperatorProperty(const BuiltinOperator& op) {
property.inputs = {{0, {}}, {1, tensor_property}};
property.outputs = {{0, {}}};
property.biases = {2};
property.version = 2;
property.version = 3;
break;
}
case BuiltinOperator_DEPTHWISE_CONV_2D: {

View File

@ -120,7 +120,7 @@ TEST_F(QuantizeConvModelTest, TensorShapesAndStructureIsUnchanged) {
// check op and versioning.
EXPECT_EQ(model_.operator_codes.size(), 1);
EXPECT_EQ(model_.operator_codes[0]->builtin_code, BuiltinOperator_CONV_2D);
EXPECT_EQ(model_.operator_codes[0]->version, 2);
EXPECT_EQ(model_.operator_codes[0]->version, 3);
}
TEST_F(QuantizeConvModelTest, OperatorsAreUnchanged) {
@ -133,8 +133,12 @@ TEST_F(QuantizeConvModelTest, OperatorsAreUnchanged) {
const auto float_model_op = readonly_model_->operator_codes()->Get(i);
EXPECT_EQ(model_.operator_codes[i]->builtin_code,
float_model_op->builtin_code());
if (model_.operator_codes[i]->builtin_code == BuiltinOperator_CONV_2D) {
EXPECT_EQ(model_.operator_codes[i]->version, 3);
} else {
EXPECT_EQ(model_.operator_codes[i]->version, 2);
}
}
ASSERT_EQ(model_.subgraphs.size(), readonly_model_->subgraphs()->size());
for (size_t subgraph_idx = 0; subgraph_idx < model_.subgraphs.size();
@ -471,7 +475,7 @@ TEST_F(QuantizeConvModel1Test, VerifyConvQuantizationWithUnitScale) {
// check op and versioning.
EXPECT_EQ(model_.operator_codes.size(), 1);
EXPECT_EQ(model_.operator_codes[0]->builtin_code, BuiltinOperator_CONV_2D);
EXPECT_EQ(model_.operator_codes[0]->version, 2);
EXPECT_EQ(model_.operator_codes[0]->version, 3);
}
class QuantizeConvModel2Test : public QuantizeModelTest {
@ -569,7 +573,7 @@ TEST_F(QuantizeConvModel2Test, VerifyConvQuantization) {
// check op and versioning.
EXPECT_EQ(model_.operator_codes.size(), 1);
EXPECT_EQ(model_.operator_codes[0]->builtin_code, BuiltinOperator_CONV_2D);
EXPECT_EQ(model_.operator_codes[0]->version, 2);
EXPECT_EQ(model_.operator_codes[0]->version, 3);
}
class QuantizeSoftmaxTest : public QuantizeModelTest {