Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for rank (0.29 sec)

  1. tensorflow/c/c_api.cc

      }
    
      tensorflow::shape_inference::ShapeHandle shape = ic->output(output.index);
    
      int rank = -1;
      if (ic->RankKnown(shape)) {
        rank = ic->Rank(shape);
      }
    
      if (num_dims != rank) {
        status->status = InvalidArgument("Expected rank is ", num_dims,
                                         " but actual rank is ", rank);
        return;
      }
    
      if (num_dims == 0) {
        // Output shape is a scalar.
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 102.3K bytes
    - Viewed (0)
  2. tensorflow/c/eager/c_api.cc

                            static_cast<TF_DataType>(default_value.type()));
          break;
        case tensorflow::AttrValue::kShape: {
          const auto& tensor_shape = default_value.shape();
          if (tensor_shape.unknown_rank()) {
            TFE_OpSetAttrShape(op, attr_name, nullptr, -1, status);
          } else {
            const auto num_dims = tensor_shape.dim_size();
            std::unique_ptr<int64_t[]> dims(new int64_t[num_dims]);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 43.9K bytes
    - Viewed (2)
Back to top