Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit 5adadf3

Browse files
Niki Parmarlukaszkaiser
authored andcommitted
modifications to data reader and problem_hparams
PiperOrigin-RevId: 161027111
1 parent 1692515 commit 5adadf3

File tree

9 files changed

+127
-637
lines changed

9 files changed

+127
-637
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name='tensor2tensor',
8-
version='1.0.10',
8+
version='1.0.9',
99
description='Tensor2Tensor',
1010
author='Google Inc.',
1111
author_email='[email protected]',

tensor2tensor/data_generators/problem_hparams.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,8 +664,17 @@ def image_mscoco_tokens(model_hparams, vocab_count):
664664
}
665665
p.batch_size_multiplier = 256
666666
p.max_expected_batch_size_per_shard = 2
667+
668+
669+
def img2img_imagenet(unused_model_hparams):
670+
"""Image 2 Image for imagenet dataset."""
671+
p = default_problem_hparams()
672+
p.input_modality = {"inputs": ("image:identity", None)}
673+
p.target_modality = ("image:identity", None)
674+
p.batch_size_multiplier = 256
675+
p.max_expected_batch_size_per_shard = 4
667676
p.input_space_id = 1
668-
p.target_space_id = 3
677+
p.target_space_id = 1
669678
return p
670679

671680

@@ -732,4 +741,5 @@ def image_mscoco_tokens(model_hparams, vocab_count):
732741
"image_mscoco_tokens_128k_tune": lambda p: image_mscoco_tokens(p, 2**17),
733742
"image_mscoco_tokens_128k_test": lambda p: image_mscoco_tokens(p, 2**17),
734743
"image_imagenet": image_imagenet,
744+
"img2img_imagenet": img2img_imagenet,
735745
}

0 commit comments

Comments
 (0)