- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for take (0.35 sec)
-
tensorflow/c/c_api.cc
const char* attr_name, const void* proto, size_t proto_len, TF_Status* status) { // shape.ParseFromArray takes an int as length, this function takes size_t, // make sure there is no information loss. if (proto_len > std::numeric_limits<int>::max()) { status->status = InvalidArgument( "proto_len (", proto_len,
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) -
tensorflow/c/c_api_experimental.cc
// Update the vector with information from `input_tensors` if provided. if (input_tensors != nullptr) { // Note that we take the address of the elements in `all_input_tensors` // below. Allocate enough space so that no reallocation happens, which will // make the pointers invalid. all_input_tensors.reserve(num_inputs); for (int i = 0; i < num_inputs; ++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) -
tensorflow/c/experimental/gradients/array_grad.cc
for (int i = 0; i < grad_outputs.size(); i++) { auto grad_input = grad_outputs[i]; // TODO(srbs): Should we add a copy contructor to AbstractTensorHandle // that takes care of this similar to `Tensor`? if (grad_input) { grad_input->Ref(); } grad_inputs[i] = grad_input; } return absl::OkStatus(); } ~IdentityNGradientFunction() override {}
C++ - Registered: Tue Apr 09 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 1.6K bytes - Viewed (0) -
tensorflow/c/eager/gradients.cc
input_ids[i] = ToId(inputs[i]); input_dtypes[i] = inputs[i]->DataType(); } std::vector<TapeTensor> tape_tensors; tape_tensors.reserve(outputs.size()); for (auto t : outputs) { tape_tensors.push_back(TapeTensor(t)); } GradientTape::RecordOperation( op_name, tape_tensors, input_ids, input_dtypes, [gradient_function]() -> GradientFunction* { return gradient_function; },
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) -
tensorflow/c/eager/gradient_checker.cc
theta_inputs[input_index] = thetaMinus.get(); TF_RETURN_IF_ERROR( RunAndMaybeSum(ctx, forward, theta_inputs, f_outputs, use_function)); AbstractTensorHandlePtr fMinus(f_outputs[0]); // Take Difference of both estimates: (f(theta + eps) - f(theta - eps)). TF_RETURN_IF_ERROR( ops::Sub(ctx, fPlus.get(), fMinus.get(), f_outputs, "sub_top")); AbstractTensorHandlePtr fDiff(f_outputs[0]);
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Feb 15 09:49:45 GMT 2024 - 7.3K bytes - Viewed (0) -
tensorflow/c/experimental/gradients/nn_grad_test.cc
#include "tensorflow/c/eager/c_api_test_util.h" #include "tensorflow/c/eager/unified_api_testutil.h" #include "tensorflow/c/experimental/gradients/grad_test_helper.h" #include "tensorflow/c/experimental/gradients/tape/tape_context.h" #include "tensorflow/c/experimental/ops/nn_ops.h" #include "tensorflow/c/tf_status_helper.h" #include "tensorflow/core/platform/tensor_float_32_utils.h" #include "tensorflow/core/platform/test.h"
C++ - Registered: Tue Mar 26 12:39:09 GMT 2024 - Last Modified: Wed Feb 28 13:53:47 GMT 2024 - 8.3K bytes - Viewed (0) -
tensorflow/c/c_api_test.cc
EXPECT_EQ(string("fake"), string(src_names[0])); EXPECT_EQ(0, src_indexes[0]); TF_DeleteImportGraphDefResults(results); TF_DeleteImportGraphDefOptions(opts); TF_DeleteBuffer(graph_def); TF_DeleteGraph(graph); TF_DeleteStatus(s); } TEST(CAPI, Session) { TF_Status* s = TF_NewStatus(); TF_Graph* graph = TF_NewGraph(); // Make a placeholder operation.
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) -
tensorflow/c/eager/c_api_distributed_test.cc
TFE_TensorHandle* h0 = TestVariable(ctx, 1.0, task1_name); TFE_TensorHandle* h1 = TestVariable(ctx, 2.0, task2_name); TFE_TensorHandle* h2 = TestVariable(ctx, 3.0, task0_name); // Add a sync point to make sure that variables have been initialized // before the function execution starts. TFE_ContextAsyncWait(ctx, status); EXPECT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Feb 15 09:49:45 GMT 2024 - 23.5K bytes - Viewed (0) -
tensorflow/c/eager/gradients_test.cc
absl::Span<AbstractTensorHandle*> outputs) { Tape tape(/*persistent=*/false); tape.Watch(inputs[0]); AbstractTensorHandle* neg_output; TF_RETURN_IF_ERROR(ops::Neg(ctx, inputs[0], &neg_output, "Neg")); tape.RecordOperation(inputs, {neg_output}, nullptr, "Neg"); return tape.ComputeGradient(ctx, /*targets=*/{neg_output},
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Feb 15 09:49:45 GMT 2024 - 7K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device_lib.cc
ParallelDevice::ParallelDevice(const std::vector<std::string>& devices, bool is_async, int in_flight_nodes_limit) : underlying_devices_(devices), default_cancellation_manager_(absl::make_unique<CancellationManager>()) { device_threads_.reserve(devices.size()); for (int device_index = 0; device_index < devices.size(); ++device_index) { device_threads_.emplace_back(new DeviceThread(
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)