Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tensorflow code TypeError: unsupported operand type(s) for *: 'int' and 'Flag'

I have give the mode,but it shows error,run it in tensorflow1.6 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);

this code suddenly can't run.Because tensorflow becomes 1.6 version?

enter image description here

like image 810
dongmei Avatar asked Mar 16 '18 03:03

dongmei


1 Answers

The API of these Flags changed. Basically, you have to write .value after each instance, e.g. self._hps.batch_size.value

like image 198
limes Avatar answered Oct 20 '22 21:10

limes