tensorflow/lite/delegates/coreml/builders/pad_op_builder.cc
// padding is d x 2 tensor, where d is the dimension of input.
// only paddings for width and height are considered.
padding is d x 2 tensor, where d is the dimension of input.
only paddings for width and height are considered.
padding is d x 2 tensor where d is the dimension of input . only paddings for width and height are considered .
void PadOpBuilder::SetPadding(const TfLiteTensor* padding) {
  const int32_t* padding_data = GetTensorData<int32_t>(padding);
  for (int i = 1; i <= 2; ++i) {
    auto* borderamount = layer_->mutable_padding()
                             ->mutable_paddingamounts()
                             ->add_borderamounts();
    borderamount->set_startedgesize(padding_data[i * 2]);
    borderamount->set_endedgesize(padding_data[i * 2 + 1]);
  }
}
void PadOpBuilder :: SetPadding ( const TfLiteTensor * padding ) { const int32_t * padding_data = GetTensorData < int32_t > ( padding ) ; for ( int i = 1 ; i <= 2 ; ++ i ) { auto * borderamount = layer_ -> mutable_padding ( ) -> mutable_paddingamounts ( ) -> add_borderamounts ( ) ; borderamount -> set_startedgesize ( padding_data [ i * 2 ] ) ; borderamount -> set_endedgesize ( padding_data [ i * 2 + 1 ] ) ; } }
padding is d x 2 tensor, where d is the dimension of input.
padding is d x 2 tensor where d is the dimension of input .