提交 88d7c1b9 编写于 作者: R Renjie Liu 提交者: TensorFlower Gardener

Fix conv2d shape in flatbuffer2mlir/import_json.json

PiperOrigin-RevId: 358736975
Change-Id: If576c43feedd160d969d7a6881890501a63cc110
上级 8f487e7f
// RUN: json_to_flatbuffer %p/test_schema.fbs %s | flatbuffer_translate --tflite-flatbuffer-to-mlir -o - | FileCheck %s // RUN: json_to_flatbuffer %p/test_schema.fbs %s | flatbuffer_translate --tflite-flatbuffer-to-mlir -o - | FileCheck %s
// CHECK: %cst = constant unit // CHECK: %cst = constant unit
// CHECK: %[[RES0:.*]] = "tfl.conv_2d"(%arg0, %arg1, %cst) {dilation_h_factor = 1 : i32, dilation_w_factor = 1 : i32, fused_activation_function = "NONE", padding = "SAME", stride_h = 0 : i32, stride_w = 0 : i32} : (tensor<256x32x32x3xf32>, tensor<16x3x3x3xf32>, none) -> tensor<256x32x32x16xf32> // CHECK: %[[RES0:.*]] = "tfl.conv_2d"(%arg0, %arg1, %cst) {dilation_h_factor = 1 : i32, dilation_w_factor = 1 : i32, fused_activation_function = "NONE", padding = "SAME", stride_h = 1 : i32, stride_w = 1 : i32} : (tensor<256x32x32x3xf32>, tensor<16x3x3x3xf32>, none) -> tensor<256x32x32x16xf32>
// CHECK: return %[[RES0]] : tensor<256x32x32x16xf32> // CHECK: return %[[RES0]] : tensor<256x32x32x16xf32>
{ {
version: 3, "version": 3,
operator_codes: [ "operator_codes": [
{ {
builtin_code: "CONV_2D", "builtin_code": "CONV_2D"
} }
], ],
subgraphs: [ "subgraphs": [
{ {
tensors: [ "tensors": [
{ {
shape: [ "shape": [
256, 256,
32, 32,
32, 32,
3 3
], ],
name: "arg0", "name": "arg0",
quantization: { "quantization": {
} }
}, },
{ {
shape: [ "shape": [
16, 16,
3, 3,
3, 3,
3 3
], ],
name: "arg1", "name": "arg1",
quantization: { "quantization": {
} }
}, },
{ {
shape: [ "shape": [
0 0
], ],
name: "cst" "name": "cst"
}, },
{ {
shape: [ "shape": [
256, 256,
32, 32,
32, 32,
16 16
], ],
name: "output", "name": "output",
quantization: { "quantization": {
} }
}, }
], ],
inputs: [ "inputs": [
0, 0,
1 1
], ],
outputs: [ "outputs": [
3 3
], ],
operators: [ "operators": [
{ {
inputs: [ "inputs": [
0, 0,
1, 1,
-1 -1
], ],
outputs: [ "outputs": [
3 3
], ],
builtin_options_type: "Conv2DOptions", "builtin_options_type": "Conv2DOptions",
builtin_options: { "builtin_options": {
"stride_w": 1,
"stride_h": 1
} }
} }
], ],
name: "main" "name": "main"
} }
], ],
description: "MLIR Converted." "description": "MLIR Converted."
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册