tensorflow code TypeError: unsupported operand type(s) for *: 'int' and 'Flag'
tensorflow code TypeError: unsupported operand type(s) for *: 'int' and 'Flag'
BATCH_QUEUE_MAX = 100
self._data_path = data_path
self._vocab = vocab
self._hps = hps
self._single_pass = single_pass
# Initialize a queue of Batches waiting to be used, and a queue of Examples waiting to be batched
self._batch_queue = Queue.Queue(self.BATCH_QUEUE_MAX)
self._example_queue = Queue.Queue(self.BATCH_QUEUE_MAX * self._hps.batch_size);
这段代码突然不能run.Becausetensorflow变成1.6版本了?
这些Flags的API改变了。基本上,您必须在每个实例之后编写 .value,例如
self._hps.batch_size.value
BATCH_QUEUE_MAX = 100
self._data_path = data_path
self._vocab = vocab
self._hps = hps
self._single_pass = single_pass
# Initialize a queue of Batches waiting to be used, and a queue of Examples waiting to be batched
self._batch_queue = Queue.Queue(self.BATCH_QUEUE_MAX)
self._example_queue = Queue.Queue(self.BATCH_QUEUE_MAX * self._hps.batch_size);
这段代码突然不能run.Becausetensorflow变成1.6版本了?
这些Flags的API改变了。基本上,您必须在每个实例之后编写 .value,例如
self._hps.batch_size.value