(self, dataset, strategy, limit_dataset_size=0)
| 212 | """ |
| 213 | |
| 214 | def __init__(self, dataset, strategy, limit_dataset_size=0): |
| 215 | # distributed dataset iterator |
| 216 | if limit_dataset_size > 0: |
| 217 | dataset = dataset.take(limit_dataset_size) |
| 218 | self.ds_iterator = strategy.experimental_distribute_dataset(dataset).make_initializable_iterator() |
| 219 | |
| 220 | # inception network on the dataset |
| 221 | self.inception_real = distributed( |
| 222 | lambda x_: run_inception(tfgan.eval.preprocess_image(x_['image'])), |
| 223 | args=(next(self.ds_iterator),), reduction='concat', strategy=strategy) |
| 224 | |
| 225 | self.cached_inception_real = None # cached inception features |
| 226 | self.real_inception_score = None # saved inception scores for the dataset |
| 227 | |
| 228 | def get(self, sess): |
| 229 | # On the first invocation, compute Inception activations for the eval dataset |
nothing calls this directly
no test coverage detected