Skip to content

Commit dcdd07b

Browse files
committed
fix missing python json file
1 parent 40e1800 commit dcdd07b

File tree

2 files changed

+42
-5
lines changed

2 files changed

+42
-5
lines changed

python/tensorflowjs/op_list/convolution.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,5 +371,44 @@
371371
"type": "number[]"
372372
}
373373
]
374+
},
375+
{
376+
"tfOpName": "Conv3D",
377+
"category": "convolution",
378+
"inputs": [
379+
{
380+
"start": 0,
381+
"name": "x",
382+
"type": "tensor"
383+
},
384+
{
385+
"start": 1,
386+
"name": "filter",
387+
"type": "tensor"
388+
}
389+
],
390+
"attrs": [
391+
{
392+
"tfName": "strides",
393+
"name": "strides",
394+
"type": "number[]"
395+
},
396+
{
397+
"tfName": "padding",
398+
"name": "pad",
399+
"type": "string"
400+
},
401+
{
402+
"tfName": "data_format",
403+
"name": "dataFormat",
404+
"type": "string",
405+
"defaultValue": "NHWC"
406+
},
407+
{
408+
"tfName": "dilations",
409+
"name": "dilations",
410+
"type": "number[]"
411+
}
412+
]
374413
}
375414
]

src/operations/executors/convolution_executor.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export let executeOp: InternalOpExecutor =
106106
getParamValue('filter', node, tensorMap, context) as
107107
tfc.Tensor<tfc.Rank.R5>,
108108
[stride[1], stride[2], stride[3]], pad as 'valid' | 'same',
109-
dataFormat as 'NHWC' | 'NCHW',
109+
dataFormat as 'NDHWC' | 'NCDHW',
110110
[dilations[1], dilations[2], dilations[3]])];
111111
}
112112

@@ -148,8 +148,7 @@ export let executeOp: InternalOpExecutor =
148148
return [tfc.avgPool3d(
149149
getParamValue('x', node, tensorMap, context) as tfc.Tensor5D,
150150
[kernelSize[1], kernelSize[2], kernelSize[3]],
151-
[stride[1], stride[2], stride[3]],
152-
pad as 'valid' | 'same')];
151+
[stride[1], stride[2], stride[3]], pad as 'valid' | 'same')];
153152
}
154153

155154
case 'MaxPool3D': {
@@ -162,8 +161,7 @@ export let executeOp: InternalOpExecutor =
162161
return [tfc.maxPool3d(
163162
getParamValue('x', node, tensorMap, context) as tfc.Tensor5D,
164163
[kernelSize[1], kernelSize[2], kernelSize[3]],
165-
[stride[1], stride[2], stride[3]],
166-
pad as 'valid' | 'same')];
164+
[stride[1], stride[2], stride[3]], pad as 'valid' | 'same')];
167165
}
168166

169167
default:

0 commit comments

Comments
 (0)