Home
last modified time | relevance | path

Searched refs:softmax (Results 1 – 25 of 127) sorted by relevance

123456

/external/tensorflow/tensorflow/contrib/distributions/python/kernel_tests/bijectors/
Dsoftmax_centered_test.py39 softmax = SoftmaxCentered()
40 self.assertEqual("softmax_centered", softmax.name)
43 self.assertAllClose(y, softmax.forward(x).eval())
44 self.assertAllClose(x, softmax.inverse(y).eval())
47 softmax.inverse_log_det_jacobian(y, event_ndims=1).eval(),
51 -softmax.inverse_log_det_jacobian(y, event_ndims=1).eval(),
52 softmax.forward_log_det_jacobian(x, event_ndims=1).eval(),
58 softmax = SoftmaxCentered()
59 self.assertEqual("softmax_centered", softmax.name)
64 self.assertAllClose(real_y, softmax.forward(x).eval(
[all …]
/external/tensorflow/tensorflow/core/kernels/
Dsoftmax_op_functor.h35 typename TTypes<T>::Matrix softmax, const bool log);
45 typename TTypes<T>::Matrix softmax, const bool log) { in Compute()
73 softmax.device(d) = shifted_logits; in Compute()
75 softmax.device(d) = (softmax - softmax.exp() in Compute()
86 softmax.device(d) = shifted_logits.exp(); in Compute()
88 softmax.device(d) = (softmax * softmax.sum(along_class) in Compute()
Dsoftmax_op.cc42 typename TTypes<T>::Matrix softmax, const bool log) { in operator ()()
43 SoftmaxEigenImpl<Device, T>::Compute(d, logits, softmax, log); in operator ()()
/external/libtextclassifier/lang_id/common/math/
Dsoftmax.cc75 std::vector<float> softmax; in ComputeSoftmax() local
76 softmax.reserve(scores.size()); in ComputeSoftmax()
78 return softmax; in ComputeSoftmax()
97 softmax.push_back(exp_scores[i] / denominator); in ComputeSoftmax()
99 return softmax; in ComputeSoftmax()
/external/libtextclassifier/utils/math/
Dsoftmax.cc77 std::vector<float> softmax; in ComputeSoftmax() local
80 softmax.reserve(scores_size); in ComputeSoftmax()
99 softmax.push_back(exp_scores[i] / denominator); in ComputeSoftmax()
101 return softmax; in ComputeSoftmax()
/external/tensorflow/tensorflow/python/kernel_tests/
Dsoftmax_op_test.py48 softmax = e / np.reshape(np.sum(e, axis=dim), one_only_on_dim)
50 res = np.log(softmax)
52 res = softmax
67 tf_softmax = nn_ops.softmax(np_features, axis=dim, name=name)
214 op = nn_ops.softmax([[[1., 1., 1., 1.], [1., 2., 3., 4.]],
226 nn_ops.softmax(x, axis=0).eval()
234 nn_ops.softmax([1., 2., 3., 4.], axis=dim).eval()
241 nn_ops.softmax(ones, axis=2).eval()
254 y = nn_ops.softmax(x)
/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_Softmax.pbtxt10 name: "softmax"
15 summary: "Computes softmax activations."
19 $$softmax[i, j] = exp(logits[i, j]) / sum_j(exp(logits[i, j]))$$
Dapi_def_SparseSoftmax.pbtxt28 summary: "Applies softmax to a batched N-D `SparseTensor`."
33 This op is equivalent to applying the normal `tf.nn.softmax()` to each innermost
38 (1) Applies `tf.nn.softmax()` to a densified view of each innermost submatrix
Dapi_def_LogSoftmax.pbtxt15 summary: "Computes log softmax activations."
/external/tensorflow/tensorflow/contrib/labeled_tensor/python/ops/
Dnn.py35 softmax = core.define_unary_op('softmax', nn.softmax) variable
Dnn_test.py43 ('softmax', nn_ops.softmax, nn.softmax),
/external/tensorflow/tensorflow/contrib/specs/python/
Dspecs_ops.py84 Cm = Fun(layers.conv2d, activation_fn=nn_ops.softmax)
93 Fm = Fun(layers.fully_connected, activation_fn=nn_ops.softmax)
121 Smax = Fun(nn_ops.softmax)
/external/tensorflow/tensorflow/contrib/tensor_forest/hybrid/python/models/
Dhard_decisions_to_data_then_nn.py59 inference_result, output_size, activation_fn=nn_ops.softmax)
65 return nn_ops.softmax(
/external/libtextclassifier/lang_id/
Dlang-id.cc142 std::vector<float> softmax = ComputeSoftmax(scores); in FindLanguages() local
144 for (int i = 0; i < softmax.size(); ++i) { in FindLanguages()
146 softmax[i]); in FindLanguages()
/external/libtextclassifier/lang_id/common/flatbuffers/
Dembedding-network.fbs84 // hidden layer or the final (output / softmax) layer.
93 // is generally used for softmax classification. That's why we say that the
94 // last layer is the "softmax layer".
113 // Hidden layers, followed by the final (softmax) layer.
/external/tensorflow/tensorflow/python/keras/
Dactivations.py44 def softmax(x, axis=-1): function
59 return nn.softmax(x)
Dactivations_test.py60 f = keras.backend.function([x], [keras.activations.softmax(x)])
69 keras.activations.softmax(x)
73 f = keras.backend.function([x], [keras.activations.softmax(x)])
/external/tensorflow/tensorflow/examples/saved_model/integration_tests/
Dexport_text_rnn_model.py158 softmax = tf.nn.softmax(logits)
160 next_ids = tf.math.argmax(softmax, axis=1)
/external/tensorflow/tensorflow/python/ops/
Dnn_grad.py294 softmax = op.outputs[0]
295 sum_channels = math_ops.reduce_sum(grad_softmax * softmax, -1, keepdims=True)
296 return (grad_softmax - sum_channels) * softmax
313 softmax = math_ops.exp(op.outputs[0])
314 return grad - math_ops.reduce_sum(grad, -1, keepdims=True) * softmax
534 softmax = nn_ops.softmax(logits)
539 array_ops.expand_dims(softmax, 2)),
540 axis=1)) * softmax)
/external/tensorflow/tensorflow/core/grappler/costs/
Danalytical_cost_estimator_test.cc81 auto softmax = ops::Softmax(s.WithOpName("softmax"), logits); in CreateMiniGraph() local
82 auto lsm = ops::Log(s.WithOpName("lsm"), softmax); in CreateMiniGraph()
/external/tensorflow/tensorflow/lite/experimental/micro/kernels/
DBUILD18 "softmax.cc",
54 "softmax.cc",
/external/tensorflow/tensorflow/contrib/learn/python/learn/ops/
Dseq2seq_ops.py59 predictions.append(nn.softmax(sampling_decoding[i]))
61 predictions.append(nn.softmax(pred))
/external/tensorflow/tensorflow/contrib/tensor_forest/hybrid/python/
Dhybrid_model.py92 return nn_ops.softmax(self._base_inference(data, data_spec=data_spec))
102 probabilities = nn_ops.softmax(inference_result, name="probabilities")
/external/tensorflow/tensorflow/contrib/distributions/python/kernel_tests/
Dmixture_test.py257 cat_probs = nn_ops.softmax(dist.cat.logits)
279 cat_probs = nn_ops.softmax(dist.cat.logits)
307 cat_probs = nn_ops.softmax(dist.cat.logits)
350 cat_probs = nn_ops.softmax(dist.cat.logits)
412 cat_probs = nn_ops.softmax([dist.cat.logits])[0]
440 cat_probs = nn_ops.softmax([dist.cat.logits])[0]
466 cat_probs = nn_ops.softmax(dist.cat.logits)
494 cat_probs = nn_ops.softmax(dist.cat.logits)
683 cat_probs = nn_ops.softmax(dist.cat.logits)
/external/tensorflow/tensorflow/examples/udacity/
D2_fullyconnected.ipynb269 " # the softmax and cross-entropy (it's one operation in TensorFlow, because\n",
283 " train_prediction = tf.nn.softmax(logits)\n",
284 " valid_prediction = tf.nn.softmax(\n",
286 " test_prediction = tf.nn.softmax(tf.matmul(tf_test_dataset, weights) + biases)"
457 " train_prediction = tf.nn.softmax(logits)\n",
458 " valid_prediction = tf.nn.softmax(\n",
460 " test_prediction = tf.nn.softmax(tf.matmul(tf_test_dataset, weights) + biases)"

123456