Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for Frank (0.15 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/c_api_experimental.cc

      const auto& shape = reader->GetVariableToShapeMap().at(name);
      int rank = shape.dims();
      if (num_dims != rank) {
        status->status = InvalidArgument("Expected rank is ", num_dims,
                                         " but actual rank is ", rank);
        return;
      }
      for (int i = 0; i < num_dims; i++) {
        dims[i] = shape.dim_size(i);
      }
    }
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/grappler/grappler_test.cc

          Status s = tensorflow::BufferToMessage(in_props_buf[0], &in_props);
          TF_ASSERT_OK(s);
    
          EXPECT_EQ(DT_FLOAT, in_props.dtype());
          EXPECT_FALSE(in_props.shape().unknown_rank());
          EXPECT_EQ(2, in_props.shape().dim_size());
          EXPECT_EQ(10, in_props.shape().dim(0).size());
          EXPECT_EQ(1, in_props.shape().dim(1).size());
    
          for (int i = 0; i < in_props_buf.size(); i++)
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Thu Apr 13 22:30:58 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  4. tensorflow/c/eager/parallel_device/parallel_device_testlib.cc

          TF_NewTensor(TF_FLOAT, nullptr, 0, values, num_bytes, &FloatDeallocator,
                       nullptr),
          TF_DeleteTensor);
      return TensorHandlePtr(TFE_NewTensorHandle(tensor.get(), status));
    }
    
    // Creates a rank-one TFE_TensorHandle with value `v`.
    TensorHandlePtr VectorFloatTensorHandle(const std::vector<float>& v,
                                            TF_Status* status) {
      const int num_bytes = v.size() * sizeof(float);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Jun 15 15:44:44 GMT 2021
    - 12.5K bytes
    - Viewed (0)
  5. tensorflow/c/eager/parallel_device/parallel_device_lib.cc

            return errors::Unimplemented(absl::StrCat(
                "Computing the shape of a ParallelTensor when the components do "
                "not all have the same rank is not supported. One tensor had "
                "shape ",
                first_shape.DebugString(), " and another had shape ",
                component_shape.DebugString()));
          } else {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Feb 09 07:47:20 GMT 2024
    - 25.4K bytes
    - Viewed (1)
  6. tensorflow/c/eager/c_api_debug.cc

                                             tensorflow::Status* status) {
      std::vector<int64_t> shape;
      int rank = -1;
      *status = handle.NumDims(&rank);
      if (!status->ok()) {
        return shape;
      }
      shape.reserve(rank);
      for (int i = 0; i < rank; ++i) {
        int64_t dim;
        *status = handle.Dim(i, &dim);
        if (!status->ok()) {
          return shape;
        }
        shape.push_back(dim);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Aug 11 01:20:50 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/gradients/tape/tape_operation.cc

                                       " dimensions which is over the limit of ",
                                       TensorShape::MaxDimensions(), ".");
      }
      TensorShapeProto proto;
      if (num_dims < 0) {
        proto.set_unknown_rank(true);
      } else {
        for (int d = 0; d < num_dims; ++d) {
          proto.add_dim()->set_size(dims[d]);
        }
      }
    
      forward_op_.attrs.Set(attr_name, proto);
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Tue Jun 07 01:53:35 GMT 2022
    - 9K bytes
    - Viewed (1)
  8. tensorflow/c/c_api_test.cc

      ASSERT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
      EXPECT_EQ(dims[0], returned_dims[0]);
      EXPECT_EQ(dims[1], returned_dims[1]);
    
      // Try to set 'unknown' with unknown rank on the shape and see that
      // it doesn't change.
      TF_GraphSetTensorShape(graph, feed_out_0, /*dims=*/nullptr, -1, s);
      EXPECT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 96.9K bytes
    - Viewed (3)
  9. tensorflow/c/eager/gradients.cc

                                       " dimensions which is over the limit of ",
                                       TensorShape::MaxDimensions(), ".");
      }
      TensorShapeProto proto;
      if (num_dims < 0) {
        proto.set_unknown_rank(true);
      } else {
        for (int d = 0; d < num_dims; ++d) {
          proto.add_dim()->set_size(dims[d]);
        }
      }
    
      forward_op_->attrs.Set(attr_name, proto);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  10. tensorflow/c/eager/unified_api_test.cc

      PartialTensorShape shape;
      TF_RETURN_IF_ERROR(inputs[0]->Shape(&shape));
      if (shape.dims() != 2) {
        return errors::InvalidArgument(
            "Tensor expected to have rank 2 found rank: ", shape.dims());
      }
      int64_t dim_sizes[] = {2, 4};
      for (int i = 0; i < shape.dims(); i++) {
        if (shape.dim_size(i) != dim_sizes[i]) {
          return errors::InvalidArgument("Dim ", i, " expected to be of size ",
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Feb 27 13:57:45 GMT 2024
    - 6.7K bytes
    - Viewed (0)
Back to top