Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for unknown (0.18 sec)

  1. tensorflow/c/c_api.cc

        return;
      }
    
      if (num_dims == 0) {
        // Output shape is a scalar.
        return;
      }
    
      // Rank is greater than 0, so fill in the values, if known, and
      // -1 for unknown values.
      for (int i = 0; i < num_dims; ++i) {
        auto dim = ic->Dim(shape, i);
        int64_t value = -1;
        if (ic->ValueKnown(dim)) {
          value = ic->Value(dim);
        }
        dims[i] = value;
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 102.3K bytes
    - Viewed (0)
  2. 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 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  3. tensorflow/c/eager/parallel_device/parallel_device_lib_test.cc

      vector_handles.push_back(std::move(three_vector));
      std::unique_ptr<ParallelTensor> unknown_length_vector =
          ParallelTensor::FromTensorHandles(
              parallel_device, std::move(vector_handles), status.get());
      ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get());
      const std::vector<int64_t>* shape;
      TF_ASSERT_OK(unknown_length_vector->Shape(&shape));
      EXPECT_THAT(*shape, ElementsAre(-1));
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 08 23:47:35 GMT 2021
    - 15.3K bytes
    - Viewed (0)
  4. tensorflow/c/c_api_experimental_test.cc

                        /*input_tensors*/ {},
                        /*expected_shape*/ make_shape({3, kUnknownDim}));
    
      // Infer shape when some dimensions are unknown.
      CheckOutputShapes(
          matmul_op,
          /*input_shapes*/ {make_shape({kUnknownDim, 2}), make_shape({2, 4})},
          /*input_tensors*/ {},
          /*expected_shape*/ make_shape({kUnknownDim, 4}));
    
      // Infer shape when everything is unknown.
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Jan 17 22:27:52 GMT 2023
    - 13.1K bytes
    - Viewed (1)
  5. 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)
  6. tensorflow/c/eager/unified_api_test.cc

        ASSERT_EQ(errors::OK, s.code()) << s.message();
        x.reset(x_raw);
      }
    
      PartialTensorShape shape;
      Status s = x->Shape(&shape);
      ASSERT_EQ(errors::OK, s.code()) << s.message();
      ASSERT_TRUE(shape.unknown_rank());
    }
    
    TEST_P(UnifiedAPI, TestPartialShapeTracing) {
      if (!UseFunction()) {
        GTEST_SKIP() << "Tracing only test.";
      }
      if (UseMlir()) {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Feb 27 13:57:45 GMT 2024
    - 6.7K 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/eager/parallel_device/parallel_device_lib.cc

                "shape ",
                first_shape.DebugString(), " and another had shape ",
                component_shape.DebugString()));
          } else {
            // Generalize differing axis lengths to "variable"/"unknown".
            for (int axis_index = 0; axis_index < combined_shape.dims();
                 ++axis_index) {
              int64_t axis_length = combined_shape.dim_size(axis_index);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Feb 09 07:47:20 GMT 2024
    - 25.4K bytes
    - Viewed (1)
  9. tensorflow/c/eager/c_api.cc

                                                                        &device)) {
        methods.deallocator(data);
        status->status =
            tensorflow::errors::InvalidArgument(device_name, " unknown device.");
        return nullptr;
      }
      return tensorflow::wrap(new tensorflow::CAPICustomDeviceTensorHandle(
          context, device, *reinterpret_cast<tensorflow::DataType*>(&dtype), data,
          methods));
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 43.9K bytes
    - Viewed (2)
  10. tensorflow/c/eager/c_api_unified_experimental_graph.cc

        TF_RETURN_IF_ERROR(
            operation->SetOpName(absl::StrCat("_input_", inputs_.size()).c_str()));
        TF_RETURN_IF_ERROR(operation->SetAttrType("dtype", dtype));
        if (!shape.unknown_rank()) {
          TF_RETURN_IF_ERROR(operation->SetAttrShape(
              "shape", reinterpret_cast<int64_t*>(shape.dim_sizes().data()),
              shape.dims()));
        }
        int num_outputs = 1;
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 15.4K bytes
    - Viewed (1)
Back to top