aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/ops/nn.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/ops/nn.py')
-rw-r--r--tensorflow/python/ops/nn.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/python/ops/nn.py b/tensorflow/python/ops/nn.py
index 72adf9e498..6fecea8666 100644
--- a/tensorflow/python/ops/nn.py
+++ b/tensorflow/python/ops/nn.py
@@ -686,7 +686,8 @@ def _compute_sampled_logits(weights, biases, inputs, labels, num_sampled,
if sampled_logits.dtype != acc_weights.dtype:
acc_weights = math_ops.cast(acc_weights, sampled_logits.dtype)
sampled_logits += sparse_ops.sparse_to_dense(
- sparse_indices, sampled_logits_shape, acc_weights, 0.0)
+ sparse_indices, sampled_logits_shape, acc_weights,
+ default_value=0.0, validate_indices=False)
if subtract_log_q:
# Subtract log of Q(l), prior probability that l appears in sampled.