Skip to content

Commit 4d8fd78

Browse files
author
cclauss
authored
Define xrange for Python 3
1 parent 151f74f commit 4d8fd78

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

utils.py

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
import tensorflow as tf
2020
from tensorflow import logging
2121

22+
try:
23+
xrange # Python 2
24+
except NameError:
25+
xrange = range # Python 3
26+
2227

2328
def Dequantize(feat_vector, max_quantized_value=2, min_quantized_value=-2):
2429
"""Dequantize the feature from the byte format to the float format.

0 commit comments

Comments
 (0)