Home
last modified time | relevance | path

Searched full:one_hot (Results 1 – 25 of 117) sorted by relevance

12345

/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_OneHot.pbtxt80 [5.0 0.0 0.0] // one_hot(0)
81 [0.0 0.0 5.0] // one_hot(2)
82 [0.0 0.0 0.0] // one_hot(-1)
83 [0.0 5.0 0.0] // one_hot(1)
102 // ^ one_hot(0)
103 // ^ one_hot(2)
104 // ^ one_hot(-1)
105 // ^ one_hot(1)
121 [1.0, 0.0, 0.0] // one_hot(0)
122 [0.0, 0.0, 1.0] // one_hot(2)
[all …]
/external/tensorflow/tensorflow/python/ops/ragged/
Dragged_one_hot_op_test.py110 # array_ops.one_hot is -1.
129 array_ops.one_hot(
157 """Tests that tf.one_hot gives the same result for ragged & uniform tensors.
159 Runs tf.one_hot with a uniform tensor, and compares the output with the
160 results of calling tf.one_hot with ragged version of that tensor with
164 indices_shape: Shape for `indices` arg to `tf.one_hot`
165 depth: `depth` arg to `tf.one_hot`
166 on_value: `on_value` arg to `tf.one_hot`
167 off_value: `off_value` arg to `tf.one_hot`
168 axis: `axis` arg to `tf.one_hot`
[all …]
/external/tensorflow/tensorflow/lite/testing/op_tests/
Done_hot.py15 """Test configs for one_hot."""
24 """Make a set of tests to do one_hot."""
35 """Build the one_hot op testing graph."""
43 out = tf.one_hot(indices=indices, depth=depth)
50 out = tf.one_hot(
60 """Build the input for one_hot op."""
/external/tensorflow/tensorflow/python/eager/benchmarks/resnet50/
Dresnet50_test_util.py41 one_hot = tf.one_hot(labels, num_classes)
43 return images, one_hot
Dresnet50_graph_test.py40 one_hot = np.zeros((batch_size, num_classes)).astype(np.float32)
41 one_hot[np.arange(batch_size), labels] = 1.
42 return images, one_hot
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Done_hot_op.cc65 xla::XlaOp one_hot; in Compile() local
69 ctx->Input(3), &one_hot)); in Compile()
70 ctx->SetOutput(0, one_hot); in Compile()
/external/tensorflow/tensorflow/lite/kernels/
Done_hot.cc26 namespace one_hot { namespace
201 } // namespace one_hot
207 one_hot::Prepare, in Register_ONE_HOT()
208 one_hot::Eval, in Register_ONE_HOT()
/external/pytorch/torch/distributions/
Done_hot_categorical.py42 support = constraints.one_hot
84 return torch.nn.functional.one_hot(mode, num_classes=probs.shape[-1]).to(probs)
99 return torch.nn.functional.one_hot(indices, num_events).to(probs)
Dconstraints.py20 - ``constraints.one_hot``
58 "one_hot",
657 one_hot = _OneHot() variable
/external/tensorflow/tensorflow/python/ops/
Dctc_ops.py577 initial_state_log_probs = array_ops.one_hot(
584 label_final_state_mask = array_ops.one_hot(
602 one_hot = array_ops.one_hot(labels, depth=num_labels)
603 one_hot = array_ops.expand_dims(one_hot, axis=0)
605 state_log_probs = math_ops.reduce_sum(ilabel_log_probs * one_hot, axis=3)
618 one_hot = array_ops.one_hot(
623 one_hot = array_ops.expand_dims(one_hot, axis=0)
625 label_olabels = math_ops.reduce_logsumexp(label_states + one_hot, axis=2)
1274 one_hot = array_ops.one_hot(
1280 return math_ops.reduce_logsumexp(states + one_hot, axis=-1)
Dbincount_ops.py106 a token appears (equivalent to one_hot + reduce_any instead of one_hot +
282 a token appears (equivalent to one_hot + reduce_any instead of one_hot +
/external/pytorch/aten/src/ATen/native/
DOnehot.cpp17 Tensor one_hot(const Tensor &self, int64_t num_classes) { in one_hot() function
18 …TORCH_CHECK(self.dtype() == kLong, "one_hot is only applicable to index tensor of type LongTensor.… in one_hot()
/external/tensorflow/tensorflow/dtensor/mlir/expansions/
Dmeta_spmd_expander.cc962 const int axis, mlir::TF::OneHotOp& one_hot) { in RelayoutOneHotInput() argument
981 EmitRelayout(one_hot.indices(), *input_layout, new_input_layout)); in RelayoutOneHotInput()
983 one_hot->setOperand(0, new_input); in RelayoutOneHotInput()
1088 auto one_hot = mlir::dyn_cast<mlir::TF::OneHotOp>(op); in ComputeLayoutForward() local
1089 int axis = one_hot.axis(); in ComputeLayoutForward()
1090 if (axis == -1) axis = ValueRank(one_hot.indices()); in ComputeLayoutForward()
1113 auto one_hot = mlir::dyn_cast<mlir::TF::OneHotOp>(op); in ComputeLayoutBackward() local
1114 int axis = one_hot.axis(); in ComputeLayoutBackward()
1115 if (axis == -1) axis = ValueRank(one_hot.indices()); in ComputeLayoutBackward()
1118 llvm::DenseMap<int, Layout> input_layouts(one_hot->getNumOperands()); in ComputeLayoutBackward()
/external/pytorch/torch/csrc/api/include/torch/nn/functional/
Dembedding.h9 inline Tensor one_hot(const Tensor& tensor, int64_t num_classes = -1) {
10 return torch::one_hot(tensor, num_classes);
/external/pytorch/aten/src/ATen/functorch/
DBatchRulesModules.cpp220 TORCH_CHECK(self.dtype() == kLong, "one_hot is only applicable to index tensor."); in one_hot_decomposition_hack()
234 TORCH_CHECK(num_classes > 0, "When vmap-ing torch.nn.functional.one_hot, please " in one_hot_decomposition_hack()
238 // Maybe one_hot should be a primitive wrt autograd so we don't have to deal with this. in one_hot_decomposition_hack()
404 m.impl("one_hot", one_hot_decomposition_hack); in TORCH_LIBRARY_IMPL()
/external/tensorflow/tensorflow/core/kernels/fuzzing/
DBUILD75 tf_ops_fuzz_target_lib("one_hot")
/external/tensorflow/tensorflow/security/advisory/
Dtfsa-2021-088.md9 …nsorflow/blob/f61c57bd425878be108ec787f4d96390579fb83e/tensorflow/lite/kernels/one_hot.cc#L68-L72):
Dtfsa-2021-003.md28 data = tf.one_hot(indices=[62,50],depth=136,on_value=np.int32(237),off_value=158,axis=856,dtype=20)
/external/pytorch/test/functorch/
Dtest_vmap_registrations.py22 "aten::one_hot",
149 "aten::one_hot",
/external/pytorch/test/distributed/launcher/bin/
Dtest_script_init_method.py63 t = F.one_hot(torch.tensor(rank), num_classes=world_size)
/external/tensorflow/tensorflow/python/kernel_tests/array_ops/
Done_hot_op_test.py37 array_ops.one_hot(dtype=dtype, **inputs)
39 ans = array_ops.one_hot(dtype=dtype, **inputs)
457 tensor_one_hot = array_ops.one_hot(tensor, depth=10, axis=0)
/external/pytorch/docs/source/
Dnn.functional.rst150 one_hot
/external/tensorflow/tensorflow/compiler/tf2xla/
Dxla_helpers.cc93 const xla::XlaOp& off_value, xla::XlaOp* one_hot) { in OneHot() argument
107 *one_hot = xla::Select( in OneHot()
/external/tensorflow/tensorflow/lite/delegates/gpu/common/tasks/
Done_hot.cc15 #include "tensorflow/lite/delegates/gpu/common/tasks/one_hot.h"
/external/tensorflow/tensorflow/lite/testing/
Dbuild_def.bzl107 "one_hot",
239 "one_hot",

12345