mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 12:20:11 +01:00
CherryPick2.4:Add depth_to_space TFLite op
This commit is contained in:
parent
29cccf5062
commit
c5736e98e3
|
|
@ -61,6 +61,7 @@ TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
|
|||
TF_LITE_ENSURE_TYPES_EQ(context, input->type, output->type);
|
||||
|
||||
const int block_size = params->block_size;
|
||||
TF_LITE_ENSURE(context, block_size > 0);
|
||||
const int input_height = input->dims->data[1];
|
||||
const int input_width = input->dims->data[2];
|
||||
const int input_channels = input->dims->data[3];
|
||||
|
|
|
|||
|
|
@ -60,6 +60,11 @@ TEST(DepthToSpaceOpModel, BadBlockSize) {
|
|||
EXPECT_DEATH(DepthToSpaceOpModel({TensorType_FLOAT32, {1, 1, 1, 4}}, 4),
|
||||
"Cannot allocate tensors");
|
||||
}
|
||||
|
||||
TEST(DepthToSpaceOpModel, NoBlockSize) {
|
||||
EXPECT_DEATH(DepthToSpaceOpModel({TensorType_FLOAT32, {1, 1, 1, 4}}, 0),
|
||||
"Cannot allocate tensors");
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST(DepthToSpaceOpModel, Float32) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user