Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for TensorHandleToTensor (0.29 sec)

  1. tensorflow/c/experimental/saved_model/core/ops/restore_ops_test.cc

      TF_EXPECT_OK(internal::SingleRestore(
          context(), CheckpointPrefix("VarsAndArithmeticObjectGraph"),
          "x/.ATTRIBUTES/VARIABLE_VALUE", DT_FLOAT, &x_handle));
      AbstractTensorPtr x = testing::TensorHandleToTensor(x_handle.get());
      EXPECT_EQ(x->Type(), DT_FLOAT);
      EXPECT_EQ(x->NumElements(), 1);
      EXPECT_EQ(x->NumDims(), 0);
      EXPECT_FLOAT_EQ(*reinterpret_cast<float*>(x->Data()), 1.0f);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 14 19:16:58 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/saved_model/core/test_utils.h

                                void* b);
    
    // Converts a TensorHandle to a Tensor, and dies if unsuccessful. This should
    // only be used for testing purposes.
    AbstractTensorPtr TensorHandleToTensor(ImmediateExecutionTensorHandle* handle);
    
    }  // namespace testing
    }  // namespace tensorflow
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 11 01:20:50 UTC 2021
    - 3.5K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/saved_model/core/test_utils.cc

        TF_CALL_int4(CASE);
        TF_CALL_uint4(CASE);
    #undef CASE
        default:
          CHECK(false) << "Unsupported data type: " << DataTypeString(dtype);
      }
    }
    
    AbstractTensorPtr TensorHandleToTensor(ImmediateExecutionTensorHandle* handle) {
      Status status;
      AbstractTensorPtr tensor(handle->Resolve(&status));
      CHECK(status.ok()) << status.message();
      CHECK_NE(tensor.get(), nullptr);
      return tensor;
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Sep 08 20:13:32 UTC 2023
    - 5.8K bytes
    - Viewed (0)
Back to top