utils.cc
int32_t TransposeChannelDim(const std::vector<uint32_t>& perm,
                                   int32_t channel_dim) {
  if (channel_dim < 0) {
    TFLITE_LOG_PROD(TFLITE_LOG_ERROR, "invalid channel_dim");
    return -1;
  }
  for (uint32_t i = 0; i < perm.size(); i++) {
    if (channel_dim == perm.at(i)) {
      return i;
    }
  }
  TFLITE_LOG_PROD(TFLITE_LOG_ERROR, "Can't find channle_dim");
  return -1;
}
// transpose channel_dim while doing transpose operation.
transpose channel_dim while doing transpose operation.
transpose channel_dim while doing transpose operation .
int32_t TransposeChannelDim(const std::vector<uint32_t>& perm,
                                   int32_t channel_dim) {
  if (channel_dim < 0) {
    TFLITE_LOG_PROD(TFLITE_LOG_ERROR, "invalid channel_dim");
    return -1;
  }
  for (uint32_t i = 0; i < perm.size(); i++) {
    if (channel_dim == perm.at(i)) {
      return i;
    }
  }
  TFLITE_LOG_PROD(TFLITE_LOG_ERROR, "Can't find channle_dim");
  return -1;
}
int32_t TransposeChannelDim ( const std :: vector < uint32_t > & perm , int32_t channel_dim ) { if ( channel_dim < 0 ) { TFLITE_LOG_PROD ( TFLITE_LOG_ERROR , " " ) ; return -1 ; } for ( uint32_t i = 0 ; i < perm . size ( ) ; i ++ ) { if ( channel_dim == perm . at ( i ) ) { return i ; } } TFLITE_LOG_PROD ( TFLITE_LOG_ERROR , " " ) ; return -1 ; }
transpose channel_dim while doing transpose operation.
transpose channel_dim while doing transpose operation .