HomeSort by relevance Sort by last modified time
    Searched refs:tensors (Results 1 - 25 of 156) sorted by null

1 2 3 4 5 6 7

  /external/tensorflow/tensorflow/core/framework/
unique_tensor_references_test.cc 32 TensorReferenceVector tensors; local
33 refs.FreezeAndReturnReferences(&tensors);
34 EXPECT_EQ(2, tensors.size());
35 if (tensors[0].SharesBufferWith(a)) {
36 EXPECT_TRUE(tensors[1].SharesBufferWith(b));
38 EXPECT_TRUE(tensors[1].SharesBufferWith(a));
39 EXPECT_TRUE(tensors[0].SharesBufferWith(b));
41 for (auto& t : tensors) {
55 TensorReferenceVector tensors; local
56 refs.FreezeAndReturnReferences(&tensors);
91 TensorReferenceVector tensors; local
116 TensorReferenceVector tensors; local
    [all...]
tensor_util.h 34 // Concatenates 'tensors' into a single tensor, along their 0th dimension.
36 // REQUIRES: All members of 'tensors' must have the same data type parameter.
37 // REQUIRES: Each member of 'tensors' must have at least one dimension.
38 // REQUIRES: Each member of 'tensors' must point to data stored in CPU memory.
39 // REQUIRES: Each member of 'tensors' must be a Tensor of a copy-able type if it
41 Status Concat(const gtl::ArraySlice<Tensor>& tensors,
44 // Splits 'tensor' into 'sizes.size()' individual tensors, along the 0th
tensor_util.cc 48 Status Concat(const gtl::ArraySlice<Tensor>& tensors, Tensor* result) {
49 if (tensors.empty()) {
50 return errors::InvalidArgument("Cannot concatenate zero tensors");
53 for (const Tensor& tensor : tensors) {
60 TensorShape shape = tensors[0].shape();
63 const DataType dtype = tensors[0].dtype();
64 for (int i = 1; i < tensors.size(); ++i) {
65 if (tensors[i].dtype() != dtype) {
67 "Cannot concatenate tensors that have different data types");
79 for (const Tensor& tensor : tensors) {
    [all...]
  /external/tensorflow/tensorflow/contrib/nccl/python/ops/
nccl_ops.py 33 def all_sum(tensors):
34 """Returns a list of tensors with the all-reduce sum across `tensors`.
37 returned tensors are evaluated then the computation will hang.
40 tensors: The input tensors across which to sum; must be assigned
44 List of tensors, each with the sum of the input tensors, where tensor i has
45 the same device as `tensors[i]`.
47 return _apply_all_reduce('sum', tensors)
    [all...]
nccl_ops_test.py 32 def _DeviceTensors(tensors, devices):
34 for t, d in zip(tensors, devices):
40 def _NcclAllReduce(nccl_fun, tensors, devices):
41 return nccl_fun(_DeviceTensors(tensors, devices))
44 def _NcclReduce(nccl_fun, tensors, devices):
47 return [nccl_fun(_DeviceTensors(tensors, devices))]
50 def _NcclBroadcast(tensors, devices):
53 tensor = array_ops.identity(tensors[0])
68 nccl_reduce: A function taking a list of tensors and a list of devices,
69 and returns a list of reduced tensors and a list of ops to perform th
    [all...]
  /external/tensorflow/tensorflow/python/data/util/
sparse.py 78 def deserialize_sparse_tensors(tensors, types, shapes, classes):
79 """Deserializes sparse tensors.
82 tensors: a structure of tensors to deserialize.
83 types: a structure that holds information about types of `tensors`
84 shapes: a structure that holds information about shapes of `tensors`
88 `tensors` with any serialized sparse tensors replaced by their deserialized
95 nest.flatten(tensors), nest.flatten(types), nest.flatten(shapes),
101 def get_classes(tensors)
    [all...]
  /external/tensorflow/tensorflow/contrib/lite/kernels/
bidirectional_sequence_rnn.cc 35 // Forward and backward cell tensors.
42 // State and output tensors.
53 TfLiteTensor* input = &context->tensors[node->inputs->data[kInputTensor]];
55 &context->tensors[node->inputs->data[kFwWeightsTensor]];
57 &context->tensors[node->inputs->data[kFwRecurrentWeightsTensor]];
58 TfLiteTensor* fw_bias = &context->tensors[node->inputs->data[kFwBiasTensor]];
60 &context->tensors[node->inputs->data[kBwWeightsTensor]];
62 &context->tensors[node->inputs->data[kBwRecurrentWeightsTensor]];
63 TfLiteTensor* bw_bias = &context->tensors[node->inputs->data[kBwBiasTensor]];
81 &context->tensors[node->outputs->data[kFwOutputTensor]]
    [all...]
basic_rnn.cc 46 TfLiteTensor* input = &context->tensors[node->inputs->data[kInputTensor]];
48 &context->tensors[node->inputs->data[kWeightsTensor]];
50 &context->tensors[node->inputs->data[kRecurrentWeightsTensor]];
51 TfLiteTensor* bias = &context->tensors[node->inputs->data[kBiasTensor]];
63 &context->tensors[node->outputs->data[KHiddenStateTensor]];
64 TfLiteTensor* output = &context->tensors[node->outputs->data[kOutputTensor]];
89 TfLiteTensor* input = &context->tensors[node->inputs->data[kInputTensor]];
91 &context->tensors[node->inputs->data[kWeightsTensor]];
93 &context->tensors[node->inputs->data[kRecurrentWeightsTensor]];
94 TfLiteTensor* bias = &context->tensors[node->inputs->data[kBiasTensor]]
    [all...]
svdf.cc 60 TfLiteTensor* input = &context->tensors[node->inputs->data[kInputTensor]];
62 &context->tensors[node->inputs->data[kWeightsFeatureTensor]];
64 &context->tensors[node->inputs->data[kWeightsTimeTensor]];
82 TfLiteTensor* state = &context->tensors[node->outputs->data[kStateTensor]];
83 TfLiteTensor* output = &context->tensors[node->outputs->data[KOutputTensor]];
115 TfLiteTensor* scratch_tensor = &context->tensors[node->temporaries->data[0]];
127 TfLiteTensor* input = &context->tensors[node->inputs->data[kInputTensor]];
129 &context->tensors[node->inputs->data[kWeightsFeatureTensor]];
131 &context->tensors[node->inputs->data[kWeightsTimeTensor]];
133 TfLiteTensor* state = &context->tensors[node->outputs->data[kStateTensor]]
    [all...]
unidirectional_sequence_rnn.cc 46 TfLiteTensor* input = &context->tensors[node->inputs->data[kInputTensor]];
48 &context->tensors[node->inputs->data[kWeightsTensor]];
50 &context->tensors[node->inputs->data[kRecurrentWeightsTensor]];
51 TfLiteTensor* bias = &context->tensors[node->inputs->data[kBiasTensor]];
68 &context->tensors[node->outputs->data[kHiddenStateTensor]];
69 TfLiteTensor* output = &context->tensors[node->outputs->data[kOutputTensor]];
95 TfLiteTensor* input = &context->tensors[node->inputs->data[kInputTensor]];
97 &context->tensors[node->inputs->data[kWeightsTensor]];
99 &context->tensors[node->inputs->data[kRecurrentWeightsTensor]];
100 TfLiteTensor* bias = &context->tensors[node->inputs->data[kBiasTensor]]
    [all...]
kernel_util.h 29 return &context->tensors[node->inputs->data[index]];
33 return &context->tensors[node->outputs->data[index]];
50 return &context->tensors[node->inputs->data[index]];
75 // quantized depthwise convolution) involving the given tensors. Returns an
76 // error if the scales of the tensors are not compatible.
90 // Return true if the given tensors have the same shape.
94 // with broadcasting involving the two input tensors.
  /external/tensorflow/tensorflow/contrib/slim/python/slim/data/
prefetch_queue.py 33 def prefetch_queue(tensors,
39 """Creates a queue to prefetech tensors from `tensors`.
41 A queue runner for enqueing tensors into the prefetch_queue is automatically
56 tensors: A list or dictionary of `Tensors` to enqueue in the buffer.
65 A queue from which you can dequeue tensors with the same type and shape
66 as `tensors`.
68 if isinstance(tensors, dict):
71 names = list(sorted(tensors.keys())
    [all...]
  /external/tensorflow/tensorflow/core/kernels/
list_kernels.h 37 // Variant compatible type for a list of tensors. This is mutable but instances
54 std::vector<Tensor> tensors; member in struct:tensorflow::TensorList
88 OP_REQUIRES(c, l->tensors.size() == num_elements_,
92 l->tensors.size(), " elements."));
95 resulting_shape.AddDim(l->tensors.size());
106 inputs_flat.reserve(l->tensors.size());
107 for (const auto& t : l->tensors) {
155 output_list.tensors.reserve(t.shape().dim_size(0));
163 output_list.tensors.push_back(tmp);
169 output_list.tensors.push_back(aligned)
    [all...]
  /external/tensorflow/tensorflow/cc/framework/
testutil.h 25 /// Computes the outputs listed in 'tensors', returns the tensors in 'out'.
26 void GetTensors(const Scope& scope, OutputList tensors,
29 // Computes the outputs listed in 'tensors', returns the tensors in 'out'.
33 const OutputList& tensors, std::vector<Tensor>* out);
testutil.cc 27 void GetTensors(const Scope& scope, OutputList tensors,
30 TF_CHECK_OK(session.Run(tensors, out));
40 const OutputList& tensors, std::vector<Tensor>* out) {
43 TF_CHECK_OK(session.Run(tensors, out));
  /external/tensorflow/tensorflow/contrib/lite/java/src/main/java/org/tensorflow/lite/
Interpreter.java 112 Tensor[] tensors = wrapper.run(inputs); local
113 if (outputs == null || tensors == null || outputs.size() > tensors.length) {
116 final int size = tensors.length;
122 tensors[idx].copyTo(outputs.get(idx));
  /external/tensorflow/tensorflow/python/framework/
subscribe.py 31 def _recursive_apply(tensors, apply_fn):
32 """Helper method to recursively apply a function to structure of tensors.
34 The structure of the tensors should take the form similar to fetches in
39 tensors: Single `Tensor`, `list`, nested `list, `tuple`,
43 Returns the modified tensors with the same structure.
45 `TypeError` if undefined type in the tensors structure.
47 tensors_type = type(tensors)
49 return apply_fn(tensors)
51 return apply_fn(tensors.value())
52 elif isinstance(tensors, (list, tuple))
    [all...]
  /external/tensorflow/tensorflow/contrib/slim/python/slim/
summaries.py 152 def add_histogram_summaries(tensors, prefix=None):
153 """Adds a histogram summary for each of the given tensors.
156 tensors: A list of variable or op tensors.
160 A list of scalar `Tensors` of type `string` whose contents are the
164 for tensor in tensors:
169 def add_image_summaries(tensors, prefix=None):
170 """Adds an image summary for each of the given tensors.
173 tensors: A list of variable or op tensors
    [all...]
  /external/tensorflow/tensorflow/contrib/lite/toco/tflite/
export_test.cc 58 details::TensorsMap tensors; local
59 details::LoadTensorsMap(input_model_, &tensors);
60 EXPECT_EQ(0, tensors["tensor_one"]);
61 EXPECT_EQ(1, tensors["tensor_two"]);
107 // TODO(ahentz): tests for tensors, inputs, outpus, opcodes and operators.
  /external/tensorflow/tensorflow/contrib/kfac/python/ops/
estimator.py 284 def _get_grads_lists_gradients(self, tensors):
287 nest.flatten(tensors),
289 grads_all = nest.pack_sequence_as(tensors, grads_flat)
292 def _get_grads_lists_empirical(self, tensors):
295 nest.flatten(tensors),
297 grads_all = nest.pack_sequence_as(tensors, grads_flat)
308 def _get_grads_lists_curvature_prop(self, tensors):
313 nest.flatten(tensors),
316 grads_all = nest.pack_sequence_as(tensors, grads_flat)
319 def _get_grads_lists_exact(self, tensors)
    [all...]
  /external/tensorflow/tensorflow/contrib/learn/python/learn/estimators/
tensor_signature.py 36 Useful to check compatibility of tensors.
103 def tensors_compatible(tensors, signatures):
104 """Check that tensors are compatible with signatures.
107 tensors: Dict of `Tensor` objects or single `Tensor` object.
112 True if all tensors are compatible, False otherwise.
114 # Dict of Tensors as input.
115 if tensors is None:
118 if isinstance(tensors, dict):
122 if key not in tensors:
124 if not TensorSignature(tensors[key]).is_compatible_with(signatures[key])
    [all...]
  /external/tensorflow/tensorflow/contrib/lite/models/smartreply/ops/
predict.cc 79 TfLiteTensor* lookup = &context->tensors[node->inputs->data[0]];
80 TfLiteTensor* model_key = &context->tensors[node->inputs->data[1]];
81 TfLiteTensor* model_label = &context->tensors[node->inputs->data[2]];
82 TfLiteTensor* model_weight = &context->tensors[node->inputs->data[3]];
99 TfLiteTensor* output_label = &context->tensors[node->outputs->data[0]];
100 TfLiteTensor* output_weight = &context->tensors[node->outputs->data[1]];
117 TfLiteTensor* lookup = &context->tensors[node->inputs->data[0]];
118 TfLiteTensor* model_key = &context->tensors[node->inputs->data[1]];
119 TfLiteTensor* model_label = &context->tensors[node->inputs->data[2]];
120 TfLiteTensor* model_weight = &context->tensors[node->inputs->data[3]]
    [all...]
  /external/tensorflow/tensorflow/contrib/layers/python/layers/
summaries.py 112 other tensors, `histogram_summary` is used.
119 The summary op created or None for string tensors.
121 # Skips string tensors and boolean tensors (not handled by the summaries).
135 def summarize_tensors(tensors, summarizer=summarize_tensor):
136 """Summarize a set of tensors."""
137 return [summarizer(tensor) for tensor in tensors]
143 """Summarize a graph collection of tensors, possibly filtered by name."""
144 tensors = []
147 tensors.append(op
    [all...]
  /external/tensorflow/tensorflow/contrib/boosted_trees/python/ops/
batch_ops_utils.py 59 def _move_tensors(tensors, device):
60 """Moves a list of tensors to a device by concatenating/splitting them."""
64 if all(tensor.shape == tensor_shape.scalar() for tensor in tensors):
65 with ops.device(tensors[0].device):
66 values = array_ops.stack(tensors)
70 with ops.device(tensors[0].device):
72 [array_ops.shape(tensor)[0] for tensor in tensors])
73 values = array_ops.concat(tensors, axis=0)
  /external/tensorflow/tensorflow/contrib/opt/python/training/
external_optimizer.py 251 def _pack(cls, tensors):
253 if not tensors:
255 elif len(tensors) == 1:
256 return array_ops.reshape(tensors[0], [-1])
258 flattened = [array_ops.reshape(tensor, [-1]) for tensor in tensors]
261 def _make_eval_func(self, tensors, session, feed_dict, fetches,
264 if not isinstance(tensors, list):
265 tensors = [tensors]
266 num_tensors = len(tensors)
    [all...]

Completed in 276 milliseconds

1 2 3 4 5 6 7