Skip to content

Commit

Permalink
Merge pull request #1487 from chemelnucfin/range
Browse files Browse the repository at this point in the history
make xrange python 2 and 3 compatible in sdca_ops.py
  • Loading branch information
Vijay Vasudevan committed Mar 14, 2016
2 parents 5c61053 + 968078a commit 4248565
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tensorflow/contrib/linear_optimizer/python/ops/sdca_ops.py
Expand Up @@ -21,6 +21,8 @@
import threading
import uuid

from six.moves import range

from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.framework.load_library import load_op_library
Expand Down Expand Up @@ -223,7 +225,7 @@ def _linear_predictions(self, examples):
dense_features = self._convert_n_to_tensor(examples['dense_features'])
dense_variables = self._convert_n_to_tensor(self._variables[
'dense_features_weights'])
for i in xrange(len(dense_variables)):
for i in range(len(dense_variables)):
predictions += dense_features[i] * dense_variables[i]
return predictions

Expand Down

0 comments on commit 4248565

Please sign in to comment.