• Orion Reblitz-Richardson's avatar
    Fix issue in neural_gpu.py where TypeError is raised. · ba15af6e
    Orion Reblitz-Richardson authored
    * `python neural_gpu_trainer.py --task=rev` raises the following TypeError:
    
      File “..models/neural_gpu/neural_gpu.py", line 26, in conv_linear
        assert args
      File “..tensorflow/python/framework/ops.py", line 475, in __nonzero__
        raise TypeError("Using a `tf.Tensor` as a Python `bool` is not allowed. "
    TypeError: Using a `tf.Tensor` as a Python `bool` is not allowed. Use `if t is not None:` instead of `if t:` to test if a tensor is defined, and use the logical TensorFlow ops to test the value of a tensor.
    ba15af6e
neural_gpu.py 13 KB