Explorar o código

Update ops.py

Make sure range create a list, otherwise this won't create a list in Python 3.
Sergio Guadarrama %!s(int64=9) %!d(string=hai) anos
pai
achega
dd0671b773
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      inception/inception/slim/ops.py

+ 1 - 1
inception/inception/slim/ops.py

@@ -76,7 +76,7 @@ def batch_norm(inputs,
   """
   """
   inputs_shape = inputs.get_shape()
   inputs_shape = inputs.get_shape()
   with tf.variable_op_scope([inputs], scope, 'BatchNorm', reuse=reuse):
   with tf.variable_op_scope([inputs], scope, 'BatchNorm', reuse=reuse):
-    axis = range(len(inputs_shape) - 1)
+    axis = list(range(len(inputs_shape) - 1))
     params_shape = inputs_shape[-1:]
     params_shape = inputs_shape[-1:]
     with scopes.arg_scope([variables.variable], restore=restore):
     with scopes.arg_scope([variables.variable], restore=restore):
       # Allocate parameters for the beta and gamma of the normalization.
       # Allocate parameters for the beta and gamma of the normalization.