SYMBOL INDEX (7112 symbols across 448 files) FILE: tensor2tensor/bin/build_vocab.py function main (line 50) | def main(_): FILE: tensor2tensor/bin/make_tf_configs.py function main (line 42) | def main(_): FILE: tensor2tensor/bin/t2t_attack.py function create_attack_params (line 72) | def create_attack_params(): function create_attack (line 76) | def create_attack(attack): function create_surrogate_hparams (line 80) | def create_surrogate_hparams(): function create_surrogate_run_config (line 84) | def create_surrogate_run_config(hp): function prepare_data (line 135) | def prepare_data(problem, hparams, params, config): function main (line 149) | def main(argv): FILE: tensor2tensor/bin/t2t_avg_all.py function main (line 43) | def main(_): FILE: tensor2tensor/bin/t2t_bleu.py function main (line 91) | def main(_): FILE: tensor2tensor/bin/t2t_datagen.py function set_random_seed (line 154) | def set_random_seed(): function main (line 161) | def main(_): function generate_data_for_problem (line 224) | def generate_data_for_problem(problem): function generate_data_in_process (line 254) | def generate_data_in_process(arg): function generate_data_for_env_problem (line 260) | def generate_data_for_env_problem(problem_name): function generate_data_for_registered_problem (line 278) | def generate_data_for_registered_problem(problem_name): FILE: tensor2tensor/bin/t2t_decoder.py function create_hparams (line 66) | def create_hparams(): function create_decode_hparams (line 78) | def create_decode_hparams(): function decode (line 89) | def decode(estimator, hparams, decode_hp): function score_file (line 114) | def score_file(filename): function main (line 174) | def main(_): FILE: tensor2tensor/bin/t2t_distill.py function main (line 59) | def main(argv): function create_teacher_experiment (line 122) | def create_teacher_experiment(run_config, hparams, argv): function create_student_experiment (line 148) | def create_student_experiment(run_config, hparams, argv): function create_experiment_fn (line 176) | def create_experiment_fn(argv, train_teacher): FILE: tensor2tensor/bin/t2t_eval.py function main (line 33) | def main(_): FILE: tensor2tensor/bin/t2t_prune.py function create_pruning_params (line 53) | def create_pruning_params(): function create_pruning_strategy (line 57) | def create_pruning_strategy(name): function main (line 61) | def main(argv): FILE: tensor2tensor/bin/t2t_trainer.py function set_hparams_from_args (line 150) | def set_hparams_from_args(args): function create_hparams (line 177) | def create_hparams(): function create_experiment_fn (line 188) | def create_experiment_fn(): function create_run_config (line 221) | def create_run_config(hp, output_dir=None): function generate_data (line 294) | def generate_data(): function profile_context (line 307) | def profile_context(): function maybe_log_registry_and_exit (line 318) | def maybe_log_registry_and_exit(): function is_chief (line 324) | def is_chief(): function save_metadata (line 329) | def save_metadata(hparams): function execute_schedule (line 367) | def execute_schedule(exp): function run_std_server (line 375) | def run_std_server(): function main (line 380) | def main(argv): FILE: tensor2tensor/bin/t2t_trainer_test.py class TrainerTest (line 29) | class TrainerTest(tf.test.TestCase): method setUpClass (line 32) | def setUpClass(cls): method testTrain (line 35) | def testTrain(self): FILE: tensor2tensor/bin/t2t_translate_all.py function main (line 66) | def main(_): FILE: tensor2tensor/data_generators/algorithmic.py class AlgorithmicProblem (line 34) | class AlgorithmicProblem(problem.Problem): method num_symbols (line 38) | def num_symbols(self): method generator (line 41) | def generator(self, nbr_symbols, max_length, nbr_cases): method train_length (line 46) | def train_length(self): method dev_length (line 50) | def dev_length(self): method train_size (line 54) | def train_size(self): method dev_size (line 58) | def dev_size(self): method num_shards (line 62) | def num_shards(self): method generate_data (line 65) | def generate_data(self, data_dir, _, task_id=-1): method hparams (line 84) | def hparams(self, defaults, unused_model_hparams): class AlgorithmicIdentityBinary40 (line 96) | class AlgorithmicIdentityBinary40(AlgorithmicProblem): method num_symbols (line 100) | def num_symbols(self): method generator (line 103) | def generator(self, nbr_symbols, max_length, nbr_cases): class AlgorithmicIdentityDecimal40 (line 126) | class AlgorithmicIdentityDecimal40(AlgorithmicIdentityBinary40): method num_symbols (line 130) | def num_symbols(self): class AlgorithmicIdentityVocab95Train20Eval30 (line 135) | class AlgorithmicIdentityVocab95Train20Eval30(AlgorithmicIdentityBinary40): method num_symbols (line 139) | def num_symbols(self): method train_length (line 143) | def train_length(self): method dev_length (line 147) | def dev_length(self): method train_size (line 151) | def train_size(self): class AlgorithmicShiftDecimal40 (line 156) | class AlgorithmicShiftDecimal40(AlgorithmicProblem): method num_symbols (line 160) | def num_symbols(self): method generator (line 163) | def generator(self, nbr_symbols, max_length, nbr_cases): method dev_length (line 186) | def dev_length(self): class AlgorithmicReverseBinary40 (line 191) | class AlgorithmicReverseBinary40(AlgorithmicProblem): method num_symbols (line 195) | def num_symbols(self): method generator (line 198) | def generator(self, nbr_symbols, max_length, nbr_cases): class AlgorithmicReverseDecimal40 (line 221) | class AlgorithmicReverseDecimal40(AlgorithmicReverseBinary40): method num_symbols (line 225) | def num_symbols(self): function zipf_distribution (line 229) | def zipf_distribution(nbr_symbols, alpha): function zipf_random_sample (line 247) | def zipf_random_sample(distr_map, sample_len): function reverse_generator_nlplike (line 264) | def reverse_generator_nlplike(nbr_symbols, class AlgorithmicReverseNlplike8k (line 299) | class AlgorithmicReverseNlplike8k(AlgorithmicProblem): method num_symbols (line 303) | def num_symbols(self): method generator (line 306) | def generator(self, nbr_symbols, max_length, nbr_cases): method train_length (line 311) | def train_length(self): method dev_length (line 315) | def dev_length(self): class AlgorithmicReverseNlplike32k (line 320) | class AlgorithmicReverseNlplike32k(AlgorithmicReverseNlplike8k): method num_symbols (line 324) | def num_symbols(self): method generator (line 327) | def generator(self, nbr_symbols, max_length, nbr_cases): function lower_endian_to_number (line 332) | def lower_endian_to_number(l, base): function number_to_lower_endian (line 337) | def number_to_lower_endian(n, base): function random_number_lower_endian (line 344) | def random_number_lower_endian(length, base): class AlgorithmicAdditionBinary40 (line 353) | class AlgorithmicAdditionBinary40(AlgorithmicProblem): method num_symbols (line 357) | def num_symbols(self): method generator (line 360) | def generator(self, base, max_length, nbr_cases): # pylint: disable=a... class AlgorithmicAdditionDecimal40 (line 394) | class AlgorithmicAdditionDecimal40(AlgorithmicAdditionBinary40): method num_symbols (line 398) | def num_symbols(self): class AlgorithmicMultiplicationBinary40 (line 403) | class AlgorithmicMultiplicationBinary40(AlgorithmicProblem): method num_symbols (line 407) | def num_symbols(self): method generator (line 410) | def generator(self, base, max_length, nbr_cases): # pylint: disable=a... class AlgorithmicMultiplicationDecimal40 (line 445) | class AlgorithmicMultiplicationDecimal40(AlgorithmicMultiplicationBinary... method num_symbols (line 449) | def num_symbols(self): class AlgorithmicReverseBinary40Test (line 454) | class AlgorithmicReverseBinary40Test(AlgorithmicReverseBinary40): method train_length (line 458) | def train_length(self): method dev_length (line 462) | def dev_length(self): method train_size (line 466) | def train_size(self): method dev_size (line 470) | def dev_size(self): method num_shards (line 474) | def num_shards(self): class AlgorithmicSortProblem (line 479) | class AlgorithmicSortProblem(AlgorithmicProblem): method num_symbols (line 483) | def num_symbols(self): method train_length (line 487) | def train_length(self): method dev_length (line 491) | def dev_length(self): method unique (line 495) | def unique(self): method generator (line 499) | def generator(self, nbr_symbols, max_length, nbr_cases): method eval_metrics (line 535) | def eval_metrics(self): class TinyAlgo (line 541) | class TinyAlgo(AlgorithmicIdentityBinary40): method generate_data (line 544) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method setup_for_test (line 557) | def setup_for_test(cls): FILE: tensor2tensor/data_generators/algorithmic_math.py class ExprOp (line 31) | class ExprOp(object): method __init__ (line 34) | def __init__(self, symbol, precedence, associative=False): method __str__ (line 48) | def __str__(self): method __eq__ (line 51) | def __eq__(self, other): class ExprNode (line 55) | class ExprNode(object): method __init__ (line 61) | def __init__(self, left, right, op): method __str__ (line 69) | def __str__(self): method is_in (line 81) | def is_in(self, expr): function is_in_expr (line 90) | def is_in_expr(expr, find): function random_expr_with_required_var (line 95) | def random_expr_with_required_var(depth, required_var, optional_list, ops): function random_expr (line 132) | def random_expr(depth, vlist, ops): function algebra_inverse_solve (line 158) | def algebra_inverse_solve(left, right, var, solve_ops): function format_sympy_expr (line 214) | def format_sympy_expr(sympy_expr, functions=None): function generate_algebra_inverse_sample (line 236) | def generate_algebra_inverse_sample(vlist, ops, solve_ops, min_depth, function generate_algebra_simplify_sample (line 277) | def generate_algebra_simplify_sample(vlist, ops, min_depth, max_depth): function generate_calculus_integrate_sample (line 302) | def generate_calculus_integrate_sample(vlist, ops, min_depth, max_depth, function math_dataset_init (line 358) | def math_dataset_init(alphabet_size=26, digits=None, functions=None): function algebra_inverse (line 439) | def algebra_inverse(alphabet_size=26, min_depth=0, max_depth=2, function algebra_simplify (line 480) | def algebra_simplify(alphabet_size=26, function calculus_integrate (line 520) | def calculus_integrate(alphabet_size=26, FILE: tensor2tensor/data_generators/algorithmic_math_deepmind.py class AlgorithmicMathDeepmindAll (line 40) | class AlgorithmicMathDeepmindAll(text_problems.Text2TextProblem): method vocab_type (line 44) | def vocab_type(self): method dataset_splits (line 48) | def dataset_splits(self): method is_generate_per_split (line 58) | def is_generate_per_split(self): method generate_samples (line 61) | def generate_samples(self, data_dir, tmp_dir, dataset_split): FILE: tensor2tensor/data_generators/algorithmic_math_test.py class AlgorithmicMathTest (line 29) | class AlgorithmicMathTest(tf.test.TestCase): method testAlgebraInverse (line 31) | def testAlgebraInverse(self): method testAlgebraSimplify (line 49) | def testAlgebraSimplify(self): method testCalculusIntegrate (line 61) | def testCalculusIntegrate(self): FILE: tensor2tensor/data_generators/algorithmic_math_two_variables.py function _download_mlu_data (line 60) | def _download_mlu_data(tmp_dir, data_dir): class AlgorithmicMathTwoVariables (line 89) | class AlgorithmicMathTwoVariables(text_problems.Text2TextProblem): method vocab_type (line 93) | def vocab_type(self): method dataset_splits (line 97) | def dataset_splits(self): method is_generate_per_split (line 107) | def is_generate_per_split(self): method generate_samples (line 110) | def generate_samples(self, data_dir, tmp_dir, dataset_split): FILE: tensor2tensor/data_generators/algorithmic_test.py class AlgorithmicTest (line 28) | class AlgorithmicTest(tf.test.TestCase): method testIdentityGenerator (line 30) | def testIdentityGenerator(self): method testReverseGenerator (line 38) | def testReverseGenerator(self): method testZipfDistribution (line 46) | def testZipfDistribution(self): method testReverseGeneratorNlpLike (line 54) | def testReverseGeneratorNlpLike(self): method testLowerEndianToNumber (line 61) | def testLowerEndianToNumber(self): method testNumberToLowerEndian (line 70) | def testNumberToLowerEndian(self): method testAdditionGenerator (line 79) | def testAdditionGenerator(self): method testMultiplicationGenerator (line 90) | def testMultiplicationGenerator(self): method testSortGenerator (line 101) | def testSortGenerator(self): FILE: tensor2tensor/data_generators/all_problems.py function _is_import_err_msg (line 114) | def _is_import_err_msg(err_str, module): function _handle_errors (line 124) | def _handle_errors(errors): function import_modules (line 140) | def import_modules(modules): FILE: tensor2tensor/data_generators/allen_brain.py function PIL_Image (line 77) | def PIL_Image(): # pylint: disable=invalid-name function _get_case_file_paths (line 82) | def _get_case_file_paths(tmp_dir, case, training_fraction=0.95): function maybe_download_image_dataset (line 125) | def maybe_download_image_dataset(image_ids, target_dir): function random_square_mask (line 167) | def random_square_mask(shape, fraction): function _generator (line 193) | def _generator(tmp_dir, training, size=_BASE_EXAMPLE_IMAGE_SIZE, class Img2imgAllenBrain (line 265) | class Img2imgAllenBrain(problem.Problem): method train_shards (line 277) | def train_shards(self): method dev_shards (line 281) | def dev_shards(self): method training_fraction (line 285) | def training_fraction(self): method num_channels (line 289) | def num_channels(self): method input_dim (line 294) | def input_dim(self): method output_dim (line 300) | def output_dim(self): method inpaint_fraction (line 305) | def inpaint_fraction(self): method preprocess_example (line 310) | def preprocess_example(self, example, mode, hparams): method feature_encoders (line 339) | def feature_encoders(self, data_dir): method example_reading_spec (line 346) | def example_reading_spec(self): method eval_metrics (line 362) | def eval_metrics(self): method generate_data (line 370) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method hparams (line 377) | def hparams(self, defaults, unused_model_hparams): method generator (line 387) | def generator(self, tmp_dir, is_training): class Img2imgAllenBrainDim48to64 (line 397) | class Img2imgAllenBrainDim48to64(Img2imgAllenBrain): method dataset_filename (line 400) | def dataset_filename(self): method input_dim (line 404) | def input_dim(self): method output_dim (line 408) | def output_dim(self): class Img2imgAllenBrainDim8to32 (line 413) | class Img2imgAllenBrainDim8to32(Img2imgAllenBrain): method dataset_filename (line 416) | def dataset_filename(self): method input_dim (line 420) | def input_dim(self): method output_dim (line 424) | def output_dim(self): class Img2imgAllenBrainDim16to16Paint1 (line 429) | class Img2imgAllenBrainDim16to16Paint1(Img2imgAllenBrain): method dataset_filename (line 432) | def dataset_filename(self): method input_dim (line 436) | def input_dim(self): method output_dim (line 440) | def output_dim(self): method inpaint_fraction (line 444) | def inpaint_fraction(self): FILE: tensor2tensor/data_generators/allen_brain_test.py function mock_raw_image (line 37) | def mock_raw_image(x_dim=1024, y_dim=1024, num_channels=3, function mock_raw_data (line 70) | def mock_raw_data(tmp_dir, raw_dim=1024, num_channels=3, num_images=1): class TemporaryDirectory (line 96) | class TemporaryDirectory(object): method __enter__ (line 99) | def __enter__(self): method __exit__ (line 103) | def __exit__(self, exc_type, exc_value, traceback): class TestAllenBrain (line 107) | class TestAllenBrain(tf.test.TestCase): method setUp (line 110) | def setUp(self): method test_generator_produces_examples (line 116) | def test_generator_produces_examples(self): method test_generate_data_produces_examples_of_correct_shape (line 127) | def test_generate_data_produces_examples_of_correct_shape(self): method test_transformer2d_single_step_e2e (line 161) | def test_transformer2d_single_step_e2e(self): class TestImageMock (line 247) | class TestImageMock(tf.test.TestCase): method test_image_mock_produces_expected_shape (line 250) | def test_image_mock_produces_expected_shape(self): class TestMockRawData (line 279) | class TestMockRawData(tf.test.TestCase): method test_runs (line 282) | def test_runs(self): FILE: tensor2tensor/data_generators/audio.py function _get_timit (line 42) | def _get_timit(directory): function _collect_data (line 54) | def _collect_data(directory, input_ext, target_ext): function _get_audio_data (line 75) | def _get_audio_data(filepath): function _get_text_data (line 87) | def _get_text_data(filepath): function timit_generator (line 96) | def timit_generator(data_dir, FILE: tensor2tensor/data_generators/audio_encoder.py class AudioEncoder (line 25) | class AudioEncoder(object): method __init__ (line 28) | def __init__(self, num_reserved_ids=0, sample_rate=16000): method num_reserved_ids (line 33) | def num_reserved_ids(self): method encode (line 36) | def encode(self, s): method decode (line 71) | def decode(self, ids): method decode_list (line 87) | def decode_list(self, ids): method vocab_size (line 99) | def vocab_size(self): FILE: tensor2tensor/data_generators/audio_test.py class AudioTest (line 29) | class AudioTest(tf.test.TestCase): method testDataCollection (line 31) | def testDataCollection(self): FILE: tensor2tensor/data_generators/babi_qa.py function _normalize_string (line 84) | def _normalize_string(raw_str): function _prepare_babi_data (line 98) | def _prepare_babi_data(tmp_dir, data_dir): function _build_vocab (line 126) | def _build_vocab(generator, vocab_dir, vocab_name): function _babi_parser (line 152) | def _babi_parser(tmp_dir, class FeatureNames (line 256) | class FeatureNames(object): method features (line 263) | def features(cls): class BabiQa (line 269) | class BabiQa(text_problems.QuestionAndContext2TextProblem): method __init__ (line 272) | def __init__(self, *args, **kwargs): method babi_subset (line 279) | def babi_subset(self): method babi_task_id (line 288) | def babi_task_id(self): method dataset_filename (line 296) | def dataset_filename(self): method vocab_file (line 300) | def vocab_file(self): method dataset_splits (line 304) | def dataset_splits(self): method is_generate_per_split (line 314) | def is_generate_per_split(self): method joint_training (line 318) | def joint_training(self): method vocab_type (line 323) | def vocab_type(self): method get_labels_encoder (line 326) | def get_labels_encoder(self, data_dir): method generate_samples (line 338) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method generate_encoded_samples (line 364) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): method feature_encoders (line 388) | def feature_encoders(self, data_dir): method generate_text_for_vocab (line 403) | def generate_text_for_vocab(self, data_dir, tmp_dir): method hparams (line 417) | def hparams(self, defaults, unused_model_hparams): method example_reading_spec (line 431) | def example_reading_spec(self): method eval_metrics (line 437) | def eval_metrics(self): class BabiQaConcat (line 446) | class BabiQaConcat(BabiQa): method preprocess_example (line 449) | def preprocess_example(self, example, unused_mode, unused_model_hparams): method hparams (line 456) | def hparams(self, defaults, unused_model_hparams): function _problems_to_register (line 467) | def _problems_to_register(): function _register_babi_problems (line 510) | def _register_babi_problems(): FILE: tensor2tensor/data_generators/bair_robot_pushing.py function PIL_Image (line 46) | def PIL_Image(): # pylint: disable=invalid-name class VideoBairRobotPushing (line 52) | class VideoBairRobotPushing(video_utils.VideoProblem): method num_channels (line 56) | def num_channels(self): method frame_height (line 60) | def frame_height(self): method frame_width (line 64) | def frame_width(self): method is_generate_per_split (line 68) | def is_generate_per_split(self): method total_number_of_frames (line 73) | def total_number_of_frames(self): method max_frames_per_video (line 76) | def max_frames_per_video(self, hparams): method random_skip (line 80) | def random_skip(self): method only_keep_videos_from_0th_frame (line 84) | def only_keep_videos_from_0th_frame(self): method use_not_breaking_batching (line 88) | def use_not_breaking_batching(self): method dataset_splits (line 92) | def dataset_splits(self): method extra_reading_spec (line 100) | def extra_reading_spec(self): method hparams (line 111) | def hparams(self, defaults, unused_model_hparams): method parse_frames (line 118) | def parse_frames(self, filenames): method generate_samples (line 149) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class VideoBairRobotPushingWithActions (line 180) | class VideoBairRobotPushingWithActions(VideoBairRobotPushing): method extra_reading_spec (line 184) | def extra_reading_spec(self): FILE: tensor2tensor/data_generators/celeba.py class ImageCeleba (line 33) | class ImageCeleba(image_utils.ImageProblem): method hparams (line 57) | def hparams(self, defaults, unused_model_hparams): method generator (line 67) | def generator(self, tmp_dir, how_many, start_from=0): method train_shards (line 137) | def train_shards(self): method dev_shards (line 141) | def dev_shards(self): method test_shards (line 145) | def test_shards(self): method generate_data (line 148) | def generate_data(self, data_dir, tmp_dir, task_id=-1): class ImageCelebaMultiResolution (line 166) | class ImageCelebaMultiResolution(ImageCeleba): method dataset_filename (line 172) | def dataset_filename(self): method preprocess_example (line 175) | def preprocess_example(self, example, mode, hparams): class Img2imgCeleba (line 209) | class Img2imgCeleba(ImageCeleba): method dataset_filename (line 212) | def dataset_filename(self): method preprocess_example (line 215) | def preprocess_example(self, example, unused_mode, unused_hparams): class Img2imgCeleba64 (line 229) | class Img2imgCeleba64(Img2imgCeleba): method preprocess_example (line 232) | def preprocess_example(self, example, unused_mode, unused_hparams): class ImageCeleba32 (line 246) | class ImageCeleba32(Img2imgCeleba): method preprocess_example (line 249) | def preprocess_example(self, example, unused_mode, unused_hparams): class ImageCeleba64 (line 262) | class ImageCeleba64(Img2imgCeleba): method preprocess_example (line 265) | def preprocess_example(self, example, unused_mode, unused_hparams): FILE: tensor2tensor/data_generators/celeba_test.py class CelebaTest (line 30) | class CelebaTest(parameterized.TestCase, tf.test.TestCase): method testCelebaMultiResolutionPreprocessExample (line 36) | def testCelebaMultiResolutionPreprocessExample(self, resize_method): FILE: tensor2tensor/data_generators/celebahq.py class ImageCelebahq128 (line 33) | class ImageCelebahq128(image_utils.ImageProblem): method dataset_filename (line 36) | def dataset_filename(self): method example_reading_spec (line 39) | def example_reading_spec(self): method filepattern (line 48) | def filepattern(self, data_dir, mode, shard=None): method generate_data (line 74) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method hparams (line 80) | def hparams(self, defaults, unused_model_hparams): method preprocess_example (line 87) | def preprocess_example(self, example, mode, hparams): class ImageCelebahq128Dmol (line 94) | class ImageCelebahq128Dmol(ImageCelebahq128): method eval_metrics (line 97) | def eval_metrics(self): class ImageCelebahq256 (line 104) | class ImageCelebahq256(ImageCelebahq128): method dataset_filename (line 107) | def dataset_filename(self): method preprocess_example (line 110) | def preprocess_example(self, example, mode, hparams): class ImageCelebahq256Dmol (line 117) | class ImageCelebahq256Dmol(ImageCelebahq256): method eval_metrics (line 120) | def eval_metrics(self): FILE: tensor2tensor/data_generators/cifar.py function _get_cifar (line 56) | def _get_cifar(directory, url): function cifar_generator (line 63) | def cifar_generator(cifar_version, tmp_dir, training, how_many, start_fr... class ImageCifar10Tune (line 118) | class ImageCifar10Tune(mnist.ImageMnistTune): method num_channels (line 122) | def num_channels(self): method class_labels (line 126) | def class_labels(self): method preprocess_example (line 132) | def preprocess_example(self, example, mode, unused_hparams): method generator (line 142) | def generator(self, data_dir, tmp_dir, is_training): class ImageCifar10 (line 150) | class ImageCifar10(ImageCifar10Tune): method generator (line 152) | def generator(self, data_dir, tmp_dir, is_training): class ImageCifar10Plain (line 160) | class ImageCifar10Plain(ImageCifar10): method preprocess_example (line 162) | def preprocess_example(self, example, mode, unused_hparams): class ImageCifar10PlainGen (line 172) | class ImageCifar10PlainGen(ImageCifar10Plain): method dataset_filename (line 175) | def dataset_filename(self): method preprocess_example (line 178) | def preprocess_example(self, example, mode, unused_hparams): class ImageCifar10PlainGenFlat (line 185) | class ImageCifar10PlainGenFlat(ImageCifar10PlainGen): method preprocess_example (line 188) | def preprocess_example(self, example, mode, unused_hparams): method hparams (line 197) | def hparams(self, defaults, model_hparams): class ImageCifar10PlainRandomShift (line 206) | class ImageCifar10PlainRandomShift(ImageCifar10Plain): method dataset_filename (line 209) | def dataset_filename(self): method preprocess_example (line 212) | def preprocess_example(self, example, mode, unused_hparams): class ImageCifar10PlainGenDmol (line 222) | class ImageCifar10PlainGenDmol(ImageCifar10PlainGen): method dataset_filename (line 225) | def dataset_filename(self): method eval_metrics (line 228) | def eval_metrics(self): class ImageCifar10Plain8 (line 235) | class ImageCifar10Plain8(ImageCifar10): method dataset_filename (line 238) | def dataset_filename(self): method preprocess_example (line 241) | def preprocess_example(self, example, mode, unused_hparams): class Img2imgCifar10 (line 251) | class Img2imgCifar10(ImageCifar10): method dataset_filename (line 254) | def dataset_filename(self): method preprocess_example (line 257) | def preprocess_example(self, example, unused_mode, unused_hparams): method hparams (line 264) | def hparams(self, defaults, unused_model_hparams): class ImageCifar100Tune (line 276) | class ImageCifar100Tune(mnist.ImageMnistTune): method num_classes (line 280) | def num_classes(self): method num_channels (line 284) | def num_channels(self): method class_labels (line 288) | def class_labels(self): method preprocess_example (line 392) | def preprocess_example(self, example, mode, unused_hparams): method generator (line 402) | def generator(self, data_dir, tmp_dir, is_training): class ImageCifar100 (line 410) | class ImageCifar100(ImageCifar100Tune): method generator (line 412) | def generator(self, data_dir, tmp_dir, is_training): class ImageCifar100Plain (line 420) | class ImageCifar100Plain(ImageCifar100): method preprocess_example (line 422) | def preprocess_example(self, example, mode, unused_hparams): class ImageCifar100PlainGen (line 432) | class ImageCifar100PlainGen(ImageCifar100Plain): method dataset_filename (line 435) | def dataset_filename(self): method preprocess_example (line 438) | def preprocess_example(self, example, mode, unused_hparams): class ImageCifar100Plain8 (line 445) | class ImageCifar100Plain8(ImageCifar100): method dataset_filename (line 448) | def dataset_filename(self): method preprocess_example (line 451) | def preprocess_example(self, example, mode, unused_hparams): class Img2imgCifar100 (line 461) | class Img2imgCifar100(ImageCifar100): method dataset_filename (line 464) | def dataset_filename(self): method preprocess_example (line 467) | def preprocess_example(self, example, unused_mode, unused_hparams): method hparams (line 474) | def hparams(self, defaults, unused_model_hparams): class ImageCifar20Tune (line 487) | class ImageCifar20Tune(mnist.ImageMnistTune): method num_classes (line 491) | def num_classes(self): method num_channels (line 495) | def num_channels(self): method class_labels (line 499) | def class_labels(self): method preprocess_example (line 523) | def preprocess_example(self, example, mode, unused_hparams): method generator (line 533) | def generator(self, data_dir, tmp_dir, is_training): class ImageCifar20 (line 541) | class ImageCifar20(ImageCifar20Tune): method generator (line 543) | def generator(self, data_dir, tmp_dir, is_training): class ImageCifar20Plain (line 551) | class ImageCifar20Plain(ImageCifar20): method preprocess_example (line 553) | def preprocess_example(self, example, mode, unused_hparams): class ImageCifar20PlainGen (line 563) | class ImageCifar20PlainGen(ImageCifar20Plain): method dataset_filename (line 566) | def dataset_filename(self): method preprocess_example (line 569) | def preprocess_example(self, example, mode, unused_hparams): class ImageCifar20Plain8 (line 576) | class ImageCifar20Plain8(ImageCifar20): method dataset_filename (line 579) | def dataset_filename(self): method preprocess_example (line 582) | def preprocess_example(self, example, mode, unused_hparams): FILE: tensor2tensor/data_generators/cipher.py class AlgorithmicCipherShift5 (line 29) | class AlgorithmicCipherShift5(algorithmic.AlgorithmicProblem): method num_symbols (line 33) | def num_symbols(self): method distribution (line 37) | def distribution(self): method shift (line 41) | def shift(self): method generator (line 44) | def generator(self, nbr_symbols, max_length, nbr_cases): method train_length (line 53) | def train_length(self): method dev_length (line 57) | def dev_length(self): class AlgorithmicCipherVigenere5 (line 62) | class AlgorithmicCipherVigenere5(algorithmic.AlgorithmicProblem): method num_symbols (line 66) | def num_symbols(self): method distribution (line 70) | def distribution(self): method key (line 74) | def key(self): method generator (line 77) | def generator(self, nbr_symbols, max_length, nbr_cases): method train_length (line 86) | def train_length(self): method dev_length (line 90) | def dev_length(self): class AlgorithmicCipherShift200 (line 95) | class AlgorithmicCipherShift200(AlgorithmicCipherShift5): method num_symbols (line 99) | def num_symbols(self): method distribution (line 103) | def distribution(self): class AlgorithmicCipherVigenere200 (line 110) | class AlgorithmicCipherVigenere200(AlgorithmicCipherVigenere5): method num_symbols (line 114) | def num_symbols(self): method distribution (line 118) | def distribution(self): method key (line 124) | def key(self): class ShiftEncryptionLayer (line 128) | class ShiftEncryptionLayer(object): method __init__ (line 131) | def __init__(self, vocab, shift): method encrypt_character (line 147) | def encrypt_character(self, character): method decrypt_character (line 150) | def decrypt_character(self, character): function generate_plaintext_random (line 154) | def generate_plaintext_random(plain_vocab, distribution, train_samples, function encipher_shift (line 180) | def encipher_shift(plaintext, plain_vocab, shift): function encipher_vigenere (line 203) | def encipher_vigenere(plaintext, plain_vocab, key): FILE: tensor2tensor/data_generators/cleaner_en_xx.py function paracrawl_v3_pairs (line 66) | def paracrawl_v3_pairs(paracrawl_file): function _raw_sentences (line 89) | def _raw_sentences(paracrawl_file): function clean_en_xx_pairs (line 113) | def clean_en_xx_pairs(en_xx_pairs): function _regex_filter (line 145) | def _regex_filter(sentence): function _is_match (line 165) | def _is_match(sentence, regex): function _split_sentences (line 169) | def _split_sentences(s1, s2): FILE: tensor2tensor/data_generators/cnn_dailymail.py function _maybe_download_corpora (line 67) | def _maybe_download_corpora(tmp_dir, dataset_split): function example_splits (line 110) | def example_splits(url_file, all_files): function example_generator (line 137) | def example_generator(all_files, urls_path, sum_token): function _story_summary_split (line 176) | def _story_summary_split(story): function write_raw_text_to_files (line 183) | def write_raw_text_to_files(all_files, urls_path, dataset_split, tmp_dir): class SummarizeCnnDailymail32k (line 211) | class SummarizeCnnDailymail32k(text_problems.Text2TextProblem): method generate_text_for_vocab (line 214) | def generate_text_for_vocab(self, data_dir, tmp_dir): method dataset_splits (line 221) | def dataset_splits(self): method is_generate_per_split (line 234) | def is_generate_per_split(self): method generate_samples (line 237) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class SummarizeCnnDailymailWikiLMSharedVocab (line 247) | class SummarizeCnnDailymailWikiLMSharedVocab(SummarizeCnnDailymail32k): method use_vocab_from_other_problem (line 251) | def use_vocab_from_other_problem(self): class SummarizeCnnDailymailWikiLMSharedVocab64k (line 256) | class SummarizeCnnDailymailWikiLMSharedVocab64k(SummarizeCnnDailymail32k): method use_vocab_from_other_problem (line 260) | def use_vocab_from_other_problem(self): class SummarizeCnnDailymailWikiLMMultiVocab64k (line 265) | class SummarizeCnnDailymailWikiLMMultiVocab64k(SummarizeCnnDailymail32k): method use_vocab_from_other_problem (line 269) | def use_vocab_from_other_problem(self): class SummarizeCnnDailymailMulti64kPacked1k (line 274) | class SummarizeCnnDailymailMulti64kPacked1k(SummarizeCnnDailymail32k): method use_vocab_from_other_problem (line 278) | def use_vocab_from_other_problem(self): method packed_length (line 282) | def packed_length(self): method num_training_examples (line 286) | def num_training_examples(self): method inputs_prefix (line 290) | def inputs_prefix(self): method targets_prefix (line 294) | def targets_prefix(self): class SummarizeFracCnnDailymailWikiLMSharedVocab64k (line 299) | class SummarizeFracCnnDailymailWikiLMSharedVocab64k(SummarizeCnnDailymai... method use_vocab_from_other_problem (line 303) | def use_vocab_from_other_problem(self): method fraction_of_data (line 306) | def fraction_of_data(self): method generate_samples (line 309) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class SummarizeFrac0p1CnnDailymailWikiLMSharedVocab64k (line 328) | class SummarizeFrac0p1CnnDailymailWikiLMSharedVocab64k( method fraction_of_data (line 331) | def fraction_of_data(self): class SummarizeFrac1CnnDailymailWikiLMSharedVocab64k (line 336) | class SummarizeFrac1CnnDailymailWikiLMSharedVocab64k( method fraction_of_data (line 339) | def fraction_of_data(self): class SummarizeFrac2CnnDailymailWikiLMSharedVocab64k (line 344) | class SummarizeFrac2CnnDailymailWikiLMSharedVocab64k( method fraction_of_data (line 347) | def fraction_of_data(self): class SummarizeFrac5CnnDailymailWikiLMSharedVocab64k (line 352) | class SummarizeFrac5CnnDailymailWikiLMSharedVocab64k( method fraction_of_data (line 355) | def fraction_of_data(self): class SummarizeFrac10CnnDailymailWikiLMSharedVocab64k (line 360) | class SummarizeFrac10CnnDailymailWikiLMSharedVocab64k( method fraction_of_data (line 363) | def fraction_of_data(self): class SummarizeFrac20CnnDailymailWikiLMSharedVocab64k (line 368) | class SummarizeFrac20CnnDailymailWikiLMSharedVocab64k( method fraction_of_data (line 371) | def fraction_of_data(self): class SummarizeFrac50CnnDailymailWikiLMSharedVocab64k (line 376) | class SummarizeFrac50CnnDailymailWikiLMSharedVocab64k( method fraction_of_data (line 379) | def fraction_of_data(self): FILE: tensor2tensor/data_generators/cola.py class Cola (line 35) | class Cola(text_problems.Text2ClassProblem): method is_generate_per_split (line 45) | def is_generate_per_split(self): method dataset_splits (line 49) | def dataset_splits(self): method approx_vocab_size (line 59) | def approx_vocab_size(self): method num_classes (line 63) | def num_classes(self): method class_labels (line 66) | def class_labels(self, data_dir): method _maybe_download_corpora (line 71) | def _maybe_download_corpora(self, tmp_dir): method example_generator (line 83) | def example_generator(self, filename): method generate_samples (line 92) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class ColaCharacters (line 105) | class ColaCharacters(Cola): method vocab_type (line 109) | def vocab_type(self): method global_task_id (line 112) | def global_task_id(self): FILE: tensor2tensor/data_generators/common_voice.py function _collect_data (line 42) | def _collect_data(directory): function _file_exists (line 69) | def _file_exists(path, filename): function _is_relative (line 74) | def _is_relative(path, filename): class CommonVoice (line 80) | class CommonVoice(speech_recognition.SpeechRecognitionProblem): method num_shards (line 89) | def num_shards(self): method use_subword_tokenizer (line 93) | def use_subword_tokenizer(self): method num_dev_shards (line 97) | def num_dev_shards(self): method num_test_shards (line 101) | def num_test_shards(self): method use_train_shards_for_dev (line 105) | def use_train_shards_for_dev(self): method generator (line 109) | def generator(self, method generate_data (line 157) | def generate_data(self, data_dir, tmp_dir, task_id=-1): class CommonVoiceTrainFullTestClean (line 180) | class CommonVoiceTrainFullTestClean(CommonVoice): method training_filepaths (line 183) | def training_filepaths(self, data_dir, num_shards, shuffled): method dev_filepaths (line 186) | def dev_filepaths(self, data_dir, num_shards, shuffled): method test_filepaths (line 189) | def test_filepaths(self, data_dir, num_shards, shuffled): method generate_data (line 192) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method filepattern (line 195) | def filepattern(self, data_dir, mode, shard=None): class CommonVoiceClean (line 228) | class CommonVoiceClean(CommonVoice): class CommonVoiceNoisy (line 238) | class CommonVoiceNoisy(CommonVoice): function set_common_voice_length_hparams (line 247) | def set_common_voice_length_hparams(hparams): FILE: tensor2tensor/data_generators/common_voice_test.py class CommonVoiceTest (line 31) | class CommonVoiceTest(tf.test.TestCase): method testCollectData (line 33) | def testCollectData(self): FILE: tensor2tensor/data_generators/conll_ner.py class Conll2002Ner (line 33) | class Conll2002Ner(text_problems.Text2textTmpdir): method source_data_files (line 36) | def source_data_files(self, dataset_split): method generate_samples (line 40) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class Conll2002EsNer (line 74) | class Conll2002EsNer(Conll2002Ner): method source_data_files (line 79) | def source_data_files(self, dataset_split): class Conll2002NlNer (line 85) | class Conll2002NlNer(Conll2002Ner): method source_data_files (line 90) | def source_data_files(self, dataset_split): FILE: tensor2tensor/data_generators/desc2code.py class Desc2CodeProblem (line 76) | class Desc2CodeProblem(text_problems.Text2TextProblem): method dataset_splits (line 80) | def dataset_splits(self): method input_vocab_size (line 90) | def input_vocab_size(self): method target_vocab_size (line 94) | def target_vocab_size(self): method vocab_input_filename (line 98) | def vocab_input_filename(self): method vocab_target_filename (line 102) | def vocab_target_filename(self): method preprocess_target (line 106) | def preprocess_target(self, target): method feature_encoders (line 119) | def feature_encoders(self, data_dir): method is_generate_per_split (line 129) | def is_generate_per_split(self): method generate_encoded_samples (line 132) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): class ProgrammingDesc2codePy (line 208) | class ProgrammingDesc2codePy(Desc2CodeProblem): method pb_constants (line 212) | def pb_constants(self): method preprocess_target (line 215) | def preprocess_target(self, target): class ProgrammingDesc2codeCpp (line 221) | class ProgrammingDesc2codeCpp(Desc2CodeProblem): method pb_constants (line 225) | def pb_constants(self): method preprocess_target (line 228) | def preprocess_target(self, target): function generator_samples (line 240) | def generator_samples(tmp_dir, pb_cst): FILE: tensor2tensor/data_generators/desc2code_test.py class Desc2codeTest (line 45) | class Desc2codeTest(tf.test.TestCase): method testCppPreprocess (line 47) | def testCppPreprocess(self): FILE: tensor2tensor/data_generators/dialog_abstract.py class DialogAbstract (line 42) | class DialogAbstract(text_problems.Text2TextProblem): method vocab_type (line 46) | def vocab_type(self): method is_generate_per_split (line 50) | def is_generate_per_split(self): method vocab_file (line 54) | def vocab_file(self): method vocab_filename (line 58) | def vocab_filename(self): method oov_token (line 62) | def oov_token(self): method use_subword_tokenizer (line 66) | def use_subword_tokenizer(self): method input_space_id (line 70) | def input_space_id(self): method target_space_id (line 74) | def target_space_id(self): method targeted_vocab_size (line 78) | def targeted_vocab_size(self): method targeted_dataset_size (line 82) | def targeted_dataset_size(self): method dataset_split (line 88) | def dataset_split(self): method dataset_splits (line 92) | def dataset_splits(self): method data_dir (line 105) | def data_dir(self): method raw_data_dir (line 109) | def raw_data_dir(self): method raw_data (line 113) | def raw_data(self): method zipped_data (line 117) | def zipped_data(self): method url (line 121) | def url(self): method data_dir (line 125) | def data_dir(self, value): method raw_data_dir (line 129) | def raw_data_dir(self, value): method raw_data (line 133) | def raw_data(self, value): method zipped_data (line 137) | def zipped_data(self, value): method url (line 141) | def url(self, value): method preprocess_data (line 145) | def preprocess_data(self, train_mode): method create_data (line 149) | def create_data(self, train_mode): method data_pipeline_status (line 152) | def data_pipeline_status(self, train_mode): method download_data (line 205) | def download_data(self, train_mode): method extract_data (line 224) | def extract_data(self, train_mode): method hparams (line 248) | def hparams(self, defaults, unused_model_hparams): method eval_metrics (line 273) | def eval_metrics(self): method generate_data (line 280) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method generate_samples (line 311) | def generate_samples(self, data_dir, tmp_dir, data_split): method save_vocab (line 345) | def save_vocab(self, vocab): method open_6_files (line 363) | def open_6_files(self): method close_n_files (line 375) | def close_n_files(self, files): method clean_line (line 379) | def clean_line(self, line): FILE: tensor2tensor/data_generators/dialog_cornell.py class DialogCornell32k (line 36) | class DialogCornell32k(dialog_abstract.DialogAbstract): method targeted_vocab_size (line 43) | def targeted_vocab_size(self): method preprocess_data (line 46) | def preprocess_data(self, train_mode): method create_data (line 68) | def create_data(self, train_mode): method extract_dialog_ids (line 161) | def extract_dialog_ids(self): FILE: tensor2tensor/data_generators/dialog_dailydialog.py class DialogDailydialog16k (line 35) | class DialogDailydialog16k(dialog_abstract.DialogAbstract): method preprocess_data (line 42) | def preprocess_data(self, train_mode): method create_data (line 62) | def create_data(self, train_mode): FILE: tensor2tensor/data_generators/dialog_opensubtitles.py class DialogOpensubtitles64k2009 (line 37) | class DialogOpensubtitles64k2009(dialog_abstract.DialogAbstract): method targeted_vocab_size (line 44) | def targeted_vocab_size(self): method dataset_version (line 48) | def dataset_version(self): method extract_data (line 52) | def extract_data(self, train_mode): method preprocess_data (line 73) | def preprocess_data(self, train_mode): method create_data (line 94) | def create_data(self, train_mode): method clean_line (line 193) | def clean_line(self, line): class DialogOpensubtitles64k2011 (line 217) | class DialogOpensubtitles64k2011(DialogOpensubtitles64k2009): method dataset_version (line 220) | def dataset_version(self): class DialogOpensubtitles64k2012 (line 226) | class DialogOpensubtitles64k2012(DialogOpensubtitles64k2009): method dataset_version (line 229) | def dataset_version(self): class DialogOpensubtitles64k2013 (line 235) | class DialogOpensubtitles64k2013(DialogOpensubtitles64k2009): method dataset_version (line 238) | def dataset_version(self): class DialogOpensubtitles64k2016 (line 244) | class DialogOpensubtitles64k2016(DialogOpensubtitles64k2009): method dataset_version (line 247) | def dataset_version(self): class DialogOpensubtitles64k2018 (line 253) | class DialogOpensubtitles64k2018(DialogOpensubtitles64k2009): method dataset_version (line 256) | def dataset_version(self): FILE: tensor2tensor/data_generators/dialog_personachat.py class DialogPersonachat16k (line 37) | class DialogPersonachat16k(dialog_abstract.DialogAbstract): method preprocess_data (line 44) | def preprocess_data(self, train_mode): method extract_data (line 63) | def extract_data(self, train_mode): method create_data (line 86) | def create_data(self, train_mode): FILE: tensor2tensor/data_generators/dna_encoder.py class DNAEncoder (line 32) | class DNAEncoder(text_encoder.TextEncoder): method __init__ (line 44) | def __init__(self, method _tokens (line 56) | def _tokens(self): method vocab_size (line 67) | def vocab_size(self): method encode (line 70) | def encode(self, s): method decode (line 88) | def decode(self, ids, strip_extraneous=False): class DelimitedDNAEncoder (line 103) | class DelimitedDNAEncoder(DNAEncoder): method __init__ (line 109) | def __init__(self, delimiter=",", **kwargs): method delimiter (line 115) | def delimiter(self): method _tokens (line 118) | def _tokens(self): method encode (line 121) | def encode(self, s): FILE: tensor2tensor/data_generators/dna_encoder_test.py class DnaEncoderTest (line 25) | class DnaEncoderTest(tf.test.TestCase): method test_encode_decode (line 27) | def test_encode_decode(self): method test_delimited_dna_encoder (line 37) | def test_delimited_dna_encoder(self): FILE: tensor2tensor/data_generators/enwik8.py function _maybe_download_corpus (line 33) | def _maybe_download_corpus(tmp_dir): class Enwik8L65k (line 55) | class Enwik8L65k(text_problems.Text2SelfProblem): method is_generate_per_split (line 62) | def is_generate_per_split(self): method vocab_type (line 66) | def vocab_type(self): method global_task_id (line 69) | def global_task_id(self): method dataset_splits (line 73) | def dataset_splits(self): method max_length (line 86) | def max_length(self, model_hparams): method sequence_length (line 90) | def sequence_length(self): method generate_samples (line 94) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method generate_encoded_samples (line 124) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): class Enwik8L2k (line 133) | class Enwik8L2k(Enwik8L65k): method sequence_length (line 144) | def sequence_length(self): method generate_encoded_samples (line 148) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): class Enwik8L32k (line 153) | class Enwik8L32k(Enwik8L2k): method sequence_length (line 156) | def sequence_length(self): class Enwik8L16k (line 162) | class Enwik8L16k(Enwik8L2k): method sequence_length (line 165) | def sequence_length(self): class Enwik8L8k (line 171) | class Enwik8L8k(Enwik8L2k): method sequence_length (line 174) | def sequence_length(self): class Enwik8L4k (line 180) | class Enwik8L4k(Enwik8L2k): method sequence_length (line 183) | def sequence_length(self): class Enwik8L1k (line 189) | class Enwik8L1k(Enwik8L2k): method sequence_length (line 192) | def sequence_length(self): class Enwik8L512 (line 198) | class Enwik8L512(Enwik8L2k): method sequence_length (line 201) | def sequence_length(self): FILE: tensor2tensor/data_generators/fsns.py class ImageFSNS (line 35) | class ImageFSNS(image_utils.ImageProblem): method generate_data (line 38) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method feature_encoders (line 56) | def feature_encoders(self, data_dir): method hparams (line 64) | def hparams(self, defaults, unused_model_hparams): method example_reading_spec (line 74) | def example_reading_spec(self): FILE: tensor2tensor/data_generators/function_docstring.py class GithubFunctionDocstring (line 28) | class GithubFunctionDocstring(text_problems.Text2TextProblem): method base_url (line 41) | def base_url(self): method pair_files_list (line 45) | def pair_files_list(self): method is_generate_per_split (line 56) | def is_generate_per_split(self): method approx_vocab_size (line 60) | def approx_vocab_size(self): method max_samples_for_vocab (line 64) | def max_samples_for_vocab(self): method generate_samples (line 68) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method preprocess_example (line 102) | def preprocess_example(self, example, mode, unused_hparams): method eval_metrics (line 107) | def eval_metrics(self): FILE: tensor2tensor/data_generators/gene_expression.py class GeneExpressionProblem (line 59) | class GeneExpressionProblem(problem.Problem): method download_url (line 63) | def download_url(self): method h5_file (line 67) | def h5_file(self): method num_output_predictions (line 71) | def num_output_predictions(self): method chunk_size (line 76) | def chunk_size(self): method feature_encoders (line 79) | def feature_encoders(self, data_dir): method num_shards (line 88) | def num_shards(self): method generate_data (line 91) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method hparams (line 143) | def hparams(self, defaults, unused_model_hparams): method example_reading_spec (line 152) | def example_reading_spec(self): method preprocess_example (line 160) | def preprocess_example(self, example, mode, unused_hparams): method eval_metrics (line 172) | def eval_metrics(self): class GenomicsExpressionCage10 (line 177) | class GenomicsExpressionCage10(GeneExpressionProblem): method download_url (line 180) | def download_url(self): method h5_file (line 184) | def h5_file(self): class GenomicsExpressionGm12878 (line 189) | class GenomicsExpressionGm12878(GeneExpressionProblem): method download_url (line 192) | def download_url(self): method h5_file (line 196) | def h5_file(self): class GenomicsExpressionL262k (line 201) | class GenomicsExpressionL262k(GeneExpressionProblem): method h5_file (line 204) | def h5_file(self): function generate_shard_args (line 208) | def generate_shard_args(outfiles, num_examples): function generate_dataset (line 219) | def generate_dataset(h5_filepath, function dataset_generator (line 232) | def dataset_generator(filepath, function to_example_dict (line 263) | def to_example_dict(encoder, inputs, mask, outputs): FILE: tensor2tensor/data_generators/gene_expression_test.py class GeneticsTest (line 28) | class GeneticsTest(tf.test.TestCase): method _one_hot_bases (line 30) | def _one_hot_bases(self, bases): method testRecordToExample (line 40) | def testRecordToExample(self): method testGenerateShardArgs (line 58) | def testGenerateShardArgs(self): FILE: tensor2tensor/data_generators/generator_utils.py function to_example (line 47) | def to_example(dictionary): function generate_files_distributed (line 74) | def generate_files_distributed(generator, function _data_filenames (line 101) | def _data_filenames(output_name, output_dir, num_shards): function train_data_filenames (line 108) | def train_data_filenames(problem, output_dir, num_shards): function dev_data_filenames (line 112) | def dev_data_filenames(problem, output_dir, num_shards): function test_data_filenames (line 116) | def test_data_filenames(problem, output_dir, num_shards): function combined_data_filenames (line 120) | def combined_data_filenames(problem, output_dir, num_training_shards): function sharded_name (line 126) | def sharded_name(base_name, shard, total_shards): function shard_filepath (line 130) | def shard_filepath(fname, num_shards): function outputs_exist (line 136) | def outputs_exist(filenames): function generate_files (line 143) | def generate_files(generator, output_filenames, function download_report_hook (line 205) | def download_report_hook(count, block_size, total_size): function maybe_download (line 217) | def maybe_download(directory, filename, uri): function maybe_download_from_drive (line 260) | def maybe_download_from_drive(directory, filename, url): function gunzip_file (line 310) | def gunzip_file(gz_path, new_path): function get_or_generate_vocab_inner (line 330) | def get_or_generate_vocab_inner(data_dir, vocab_filename, vocab_size, function get_or_generate_vocab (line 370) | def get_or_generate_vocab(data_dir, tmp_dir, vocab_filename, vocab_size, function generate_lines_for_vocab (line 380) | def generate_lines_for_vocab(tmp_dir, sources, file_byte_budget=1e6): function get_or_generate_tabbed_vocab (line 425) | def get_or_generate_tabbed_vocab(data_dir, tmp_dir, source_filename, function get_or_generate_txt_vocab (line 459) | def get_or_generate_txt_vocab(data_dir, vocab_filename, vocab_size, function read_records (line 477) | def read_records(filename): function write_records (line 487) | def write_records(records, out_filename): function generate_dataset_and_shuffle (line 496) | def generate_dataset_and_shuffle(train_gen, function _shuffle_single (line 508) | def _shuffle_single(fname, extra_fn=None): function shuffle_dataset (line 525) | def shuffle_dataset(filenames, extra_fn=None): class SequencePacker (line 542) | class SequencePacker(object): method __init__ (line 548) | def __init__(self, first_sequence, spacing=2): method add (line 554) | def add(self, ids): method can_fit (line 561) | def can_fit(self, ids, packed_length): method to_dict (line 564) | def to_dict(self): class SequencePairPacker (line 571) | class SequencePairPacker(object): method __init__ (line 577) | def __init__(self, first_sequence_pair, spacing=2): method add (line 581) | def add(self, pair): method can_fit (line 585) | def can_fit(self, pair, packed_length): method to_dict (line 589) | def to_dict(self): function pack_examples (line 598) | def pack_examples(examples, function pack_dataset (line 672) | def pack_dataset(dataset, length, keys=None, use_custom_ops=False): function _pack_with_custom_ops (line 734) | def _pack_with_custom_ops(dataset, keys, length): class SequenceDatasetPacker (line 783) | class SequenceDatasetPacker(object): method __init__ (line 796) | def __init__(self, packed_length=256, spacing=0, queue_size=10, method __call__ (line 805) | def __call__(self, dataset, **kwargs): method _concurrent_pack (line 810) | def _concurrent_pack(self, dataset, window_size=None, cycle_length=None, method _pack (line 833) | def _pack(self, dataset, window_size=None, cycle_length=None, method _standardize (line 869) | def _standardize(self, dataset, keys): method _eviction_fn (line 900) | def _eviction_fn(self, _): method _scan_initial_state (line 904) | def _scan_initial_state(self): method _scanning_pack (line 961) | def _scanning_pack(self, dataset): method _compute_auxiliary_structure (line 986) | def _compute_auxiliary_structure(self, contents_and_mask): method _finalize (line 1009) | def _finalize(self, _, contents): function _scan_step_fn (line 1028) | def _scan_step_fn(state, example, packed_length, queue_size, spacing, function make_tmp_dir (line 1156) | def make_tmp_dir(suffix="", prefix="tmp", dir=None): # pylint: disable=... function tfrecord_iterator_for_problem (line 1171) | def tfrecord_iterator_for_problem(problem, data_dir, function tfrecord_iterator (line 1179) | def tfrecord_iterator(filenames, gzipped=False, example_spec=None): function random_deinterleave (line 1219) | def random_deinterleave(text, separator_symbol="X"): FILE: tensor2tensor/data_generators/generator_utils_test.py function example_generator (line 69) | def example_generator(): function trim_right (line 74) | def trim_right(x): function reference_packing (line 81) | def reference_packing(trim_fn=None): class GeneratorUtilsTest (line 94) | class GeneratorUtilsTest(tf.test.TestCase): method testGenerateFiles (line 96) | def testGenerateFiles(self): method testMaybeDownload (line 113) | def testMaybeDownload(self): method testMaybeDownloadFromDrive (line 127) | def testMaybeDownloadFromDrive(self): method testGunzipFile (line 141) | def testGunzipFile(self): method testGetOrGenerateTxtVocab (line 162) | def testGetOrGenerateTxtVocab(self): method testPacking (line 184) | def testPacking(self): method testDatasetPacking (line 193) | def testDatasetPacking(self): FILE: tensor2tensor/data_generators/google_robot_pushing.py function PIL_Image (line 47) | def PIL_Image(): # pylint: disable=invalid-name class VideoGoogleRobotPushing (line 53) | class VideoGoogleRobotPushing(video_utils.VideoProblem): method num_channels (line 57) | def num_channels(self): method frame_height (line 61) | def frame_height(self): method frame_width (line 65) | def frame_width(self): method total_number_of_frames (line 69) | def total_number_of_frames(self): method max_number_of_frames_per_video (line 74) | def max_number_of_frames_per_video(self): method is_generate_per_split (line 78) | def is_generate_per_split(self): method parse_frames (line 81) | def parse_frames(self, filename): method get_urls (line 113) | def get_urls(self, count, url_part): method generate_samples (line 117) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method hparams (line 134) | def hparams(self, defaults, unused_model_hparams): FILE: tensor2tensor/data_generators/gym_env.py class Observation (line 49) | class Observation(object): method __init__ (line 57) | def __init__(self, data, decode_fn): method __eq__ (line 61) | def __eq__(self, other): method __ne__ (line 68) | def __ne__(self, other): method decode (line 72) | def decode(self): class _Noncopyable (line 77) | class _Noncopyable(object): method __init__ (line 79) | def __init__(self, obj): method __deepcopy__ (line 82) | def __deepcopy__(self, memo): class EnvSimulationProblem (line 86) | class EnvSimulationProblem(video_utils.VideoProblem): method num_actions (line 99) | def num_actions(self): method num_rewards (line 103) | def num_rewards(self): method hparams (line 107) | def hparams(self, defaults, unused_model_hparams): class T2TEnv (line 129) | class T2TEnv(EnvSimulationProblem): method __init__ (line 149) | def __init__(self, batch_size, *args, **kwargs): method __str__ (line 172) | def __str__(self): method start_new_epoch (line 176) | def start_new_epoch(self, epoch, load_data_dir=None): method current_epoch_rollouts (line 189) | def current_epoch_rollouts(self, split=None, minimal_rollout_frames=0): method _preprocess_observations (line 215) | def _preprocess_observations(self, obs): method _decode_png (line 228) | def _decode_png(self, encoded_observation): method _encode_observations (line 235) | def _encode_observations(self, observations): method _step (line 248) | def _step(self, actions): method step (line 265) | def step(self, actions): method _reset (line 304) | def _reset(self, indices): method reset (line 315) | def reset(self, indices=None): method close (line 354) | def close(self): method num_channels (line 362) | def num_channels(self): method eval_metrics (line 366) | def eval_metrics(self): method extra_reading_spec (line 374) | def extra_reading_spec(self): method frame_height (line 387) | def frame_height(self): method frame_width (line 391) | def frame_width(self): method only_keep_videos_from_0th_frame (line 395) | def only_keep_videos_from_0th_frame(self): method _generate_frames (line 398) | def _generate_frames(self, rollouts): method _calc_num_frames (line 415) | def _calc_num_frames(rollouts): method _split_current_epoch (line 418) | def _split_current_epoch(self): method splits_and_paths (line 465) | def splits_and_paths(self, data_dir): method filepattern (line 487) | def filepattern(self, data_dir, mode, shard=None, only_last=False): method generate_data (line 495) | def generate_data(self, data_dir, tmp_dir=None, task_id=-1): method _load_epoch_data (line 520) | def _load_epoch_data(self, data_dir): method _load_epoch_split (line 535) | def _load_epoch_split(self, split, paths): class T2TGymEnv (line 585) | class T2TGymEnv(T2TEnv): method __init__ (line 594) | def __init__(self, base_env_name=None, batch_size=1, grayscale=False, method hparams (line 660) | def hparams(self, defaults, unused_model_hparams): method new_like (line 669) | def new_like(self, **kwargs): method base_env_name (line 684) | def base_env_name(self): method num_channels (line 688) | def num_channels(self): method _derive_observation_space (line 692) | def _derive_observation_space(self, orig_observ_space): method __str__ (line 703) | def __str__(self): method _encode_observations (line 706) | def _encode_observations(self, observations): method _preprocess_observations (line 711) | def _preprocess_observations(self, observations): method state (line 720) | def state(self): method set_initial_state (line 724) | def set_initial_state(self, initial_state, initial_frames): method _step (line 730) | def _step(self, actions): method _reset (line 736) | def _reset(self, indices): method close (line 765) | def close(self): class DummyWorldModelProblem (line 770) | class DummyWorldModelProblem(EnvSimulationProblem): method __init__ (line 773) | def __init__(self, action_space, reward_range, frame_height, frame_wid... method frame_height (line 781) | def frame_height(self): method frame_width (line 786) | def frame_width(self): function register_game (line 885) | def register_game(game_name, game_mode="NoFrameskip-v4"): FILE: tensor2tensor/data_generators/gym_env_test.py class TestEnv (line 37) | class TestEnv(gym.Env): method __init__ (line 50) | def __init__(self): method _generate_ob (line 53) | def _generate_ob(self): method step (line 56) | def step(self, action): method reset (line 62) | def reset(self): class GymEnvTest (line 70) | class GymEnvTest(tf.test.TestCase): method setUp (line 78) | def setUp(self): method init_batch_and_play (line 84) | def init_batch_and_play(self, env_name, steps_per_epoch=1, epochs=(0,), method play (line 102) | def play(self, env, n_steps): method test_splits_dataset (line 117) | def test_splits_dataset(self): method test_split_preserves_number_of_rollouts (line 125) | def test_split_preserves_number_of_rollouts(self): method test_split_preserves_number_of_frames (line 141) | def test_split_preserves_number_of_frames(self): method test_generates_data (line 158) | def test_generates_data(self): method test_shards_per_epoch (line 171) | def test_shards_per_epoch(self): method test_frame_numbers_are_continuous (line 195) | def test_frame_numbers_are_continuous(self): method test_clipping (line 217) | def test_clipping(self): method test_resize (line 223) | def test_resize(self): method test_no_resize_option (line 240) | def test_no_resize_option(self): method assert_channels (line 258) | def assert_channels(self, env, obs, n_channels): method test_channels (line 265) | def test_channels(self): method test_generating_and_loading_preserves_rollouts (line 273) | def test_generating_and_loading_preserves_rollouts(self): FILE: tensor2tensor/data_generators/ice_parsing.py function tabbed_parsing_token_generator (line 37) | def tabbed_parsing_token_generator(data_dir, tmp_dir, train, prefix, function tabbed_parsing_character_generator (line 53) | def tabbed_parsing_character_generator(tmp_dir, train): class ParsingIcelandic16k (line 63) | class ParsingIcelandic16k(problem.Problem): method source_vocab_size (line 67) | def source_vocab_size(self): method targeted_vocab_size (line 71) | def targeted_vocab_size(self): method input_space_id (line 75) | def input_space_id(self): method target_space_id (line 79) | def target_space_id(self): method num_shards (line 83) | def num_shards(self): method feature_encoders (line 86) | def feature_encoders(self, data_dir): method generate_data (line 98) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method hparams (line 109) | def hparams(self, defaults, unused_model_hparams): FILE: tensor2tensor/data_generators/image_lsun.py function pil_image (line 35) | def pil_image(): function _get_lsun (line 40) | def _get_lsun(directory, category, split_name): class ImageLsunBedrooms (line 48) | class ImageLsunBedrooms(image_utils.ImageProblem): method num_channels (line 52) | def num_channels(self): method generate_data (line 56) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method read_and_convert_to_png (line 64) | def read_and_convert_to_png(self, tmp_dir, split_name): FILE: tensor2tensor/data_generators/image_utils.py function matplotlib_pyplot (line 37) | def matplotlib_pyplot(): function image_to_tf_summary_value (line 44) | def image_to_tf_summary_value(image, tag): function convert_predictions_to_image_summaries (line 66) | def convert_predictions_to_image_summaries(hook_args): function resize_by_area (line 92) | def resize_by_area(img, size): function make_multiscale (line 98) | def make_multiscale(image, resolutions, function make_multiscale_dilated (line 126) | def make_multiscale_dilated(image, resolutions, num_channels=3): class ImageProblem (line 155) | class ImageProblem(problem.Problem): method num_channels (line 159) | def num_channels(self): method vocab_size (line 164) | def vocab_size(self): method example_reading_spec (line 168) | def example_reading_spec(self): method preprocess_example (line 184) | def preprocess_example(self, example, mode, hparams): method eval_metrics (line 189) | def eval_metrics(self): method decode_hooks (line 199) | def decode_hooks(self): class Image2ClassProblem (line 203) | class Image2ClassProblem(ImageProblem): method is_small (line 207) | def is_small(self): method num_classes (line 211) | def num_classes(self): method train_shards (line 215) | def train_shards(self): method dev_shards (line 219) | def dev_shards(self): method class_labels (line 223) | def class_labels(self): method feature_encoders (line 226) | def feature_encoders(self, data_dir): method generator (line 233) | def generator(self, data_dir, tmp_dir, is_training): method example_reading_spec (line 236) | def example_reading_spec(self): method hparams (line 246) | def hparams(self, defaults, unused_model_hparams): method generate_data (line 259) | def generate_data(self, data_dir, tmp_dir, task_id=-1): function encode_images_as_png (line 267) | def encode_images_as_png(images): function image_generator (line 283) | def image_generator(images, labels): class Image2TextProblem (line 315) | class Image2TextProblem(ImageProblem): method is_character_level (line 319) | def is_character_level(self): method vocab_problem (line 323) | def vocab_problem(self): method target_space_id (line 327) | def target_space_id(self): method train_shards (line 331) | def train_shards(self): method dev_shards (line 335) | def dev_shards(self): method generator (line 338) | def generator(self, data_dir, tmp_dir, is_training): method example_reading_spec (line 341) | def example_reading_spec(self): method feature_encoders (line 350) | def feature_encoders(self, data_dir): method hparams (line 360) | def hparams(self, defaults, unused_model_hparams): method generate_data (line 371) | def generate_data(self, data_dir, tmp_dir, task_id=-1): function image_augmentation (line 379) | def image_augmentation(images, do_colors=False, crop_size=None): function cifar_image_augmentation (line 393) | def cifar_image_augmentation(images): function random_shift (line 409) | def random_shift(image, wsr=0.1, hsr=0.1): FILE: tensor2tensor/data_generators/image_utils_test.py class ImageTest (line 28) | class ImageTest(tf.test.TestCase): method testImageAugmentation (line 30) | def testImageAugmentation(self): method testImageGenerator (line 37) | def testImageGenerator(self): method testMakeMultiscaleDivisible (line 75) | def testMakeMultiscaleDivisible(self): method testMakeMultiscaleIndivisible (line 84) | def testMakeMultiscaleIndivisible(self): method testMakeMultiscaleLarger (line 90) | def testMakeMultiscaleLarger(self): method testMakeMultiscaleDilatedDivisible (line 96) | def testMakeMultiscaleDilatedDivisible(self): method testMakeMultiscaleDilatedIndivisible (line 105) | def testMakeMultiscaleDilatedIndivisible(self): method testMakeMultiscaleDilatedLarger (line 111) | def testMakeMultiscaleDilatedLarger(self): method testRandomShift (line 117) | def testRandomShift(self): method testImageToSummaryValue (line 122) | def testImageToSummaryValue(self): method testConvertPredictionsToImageSummaries (line 128) | def testConvertPredictionsToImageSummaries(self): FILE: tensor2tensor/data_generators/imagenet.py function imagenet_pixelrnn_generator (line 57) | def imagenet_pixelrnn_generator(tmp_dir, function imagenet_preprocess_example (line 102) | def imagenet_preprocess_example(example, mode, resize_size=None, class ImageImagenet (line 121) | class ImageImagenet(image_utils.Image2ClassProblem): method is_small (line 125) | def is_small(self): method num_classes (line 129) | def num_classes(self): method generate_data (line 132) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method preprocess_example (line 138) | def preprocess_example(self, example, mode, _): class ImageImagenetRescaled (line 142) | class ImageImagenetRescaled(ImageImagenet): method rescale_size (line 146) | def rescale_size(self): method normalize_image (line 151) | def normalize_image(self): method dataset_filename (line 155) | def dataset_filename(self): method generate_data (line 158) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method preprocess_example (line 162) | def preprocess_example(self, example, mode, _): class ImageImagenet224 (line 169) | class ImageImagenet224(ImageImagenetRescaled): method rescale_size (line 173) | def rescale_size(self): class ImageImagenet224NoNormalization (line 178) | class ImageImagenet224NoNormalization(ImageImagenet224): method normalize_image (line 182) | def normalize_image(self): class ImageImagenet256 (line 188) | class ImageImagenet256(ImageImagenetRescaled): method rescale_size (line 192) | def rescale_size(self): class ImageImagenet32 (line 197) | class ImageImagenet32(ImageImagenetRescaled): method rescale_size (line 201) | def rescale_size(self): method is_small (line 205) | def is_small(self): method preprocess_example (line 208) | def preprocess_example(self, example, mode, _): class ImageImagenet32Gen (line 222) | class ImageImagenet32Gen(ImageImagenet): method train_shards (line 226) | def train_shards(self): method dev_shards (line 230) | def dev_shards(self): method generate_data (line 233) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method generator (line 240) | def generator(self, data_dir, tmp_dir, is_training): method preprocess_example (line 248) | def preprocess_example(self, example, mode, unused_hparams): class ImageImagenet64Gen (line 256) | class ImageImagenet64Gen(ImageImagenet): method train_shards (line 260) | def train_shards(self): method dev_shards (line 264) | def dev_shards(self): method generate_data (line 267) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method generator (line 274) | def generator(self, data_dir, tmp_dir, is_training): method preprocess_example (line 282) | def preprocess_example(self, example, mode, unused_hparams): class ImageImagenetMultiResolutionGen (line 290) | class ImageImagenetMultiResolutionGen(ImageImagenet64Gen): method dataset_filename (line 296) | def dataset_filename(self): method train_shards (line 300) | def train_shards(self): method dev_shards (line 304) | def dev_shards(self): method preprocess_example (line 307) | def preprocess_example(self, example, mode, hparams): class ImageImagenet64GenFlat (line 336) | class ImageImagenet64GenFlat(ImageImagenet64Gen): method dataset_filename (line 339) | def dataset_filename(self): method preprocess_example (line 342) | def preprocess_example(self, example, mode, unused_hparams): method hparams (line 352) | def hparams(self, defaults, model_hparams): class ImageImagenet32Small (line 361) | class ImageImagenet32Small(ImageImagenet): method is_small (line 365) | def is_small(self): method num_classes (line 369) | def num_classes(self): method train_shards (line 373) | def train_shards(self): method dev_shards (line 377) | def dev_shards(self): method preprocess_example (line 380) | def preprocess_example(self, example, mode, unused_hparams): class ImageImagenet64 (line 388) | class ImageImagenet64(ImageImagenet32): method rescale_size (line 392) | def rescale_size(self): class Img2imgImagenet (line 397) | class Img2imgImagenet(image_utils.ImageProblem): method dataset_filename (line 400) | def dataset_filename(self): method preprocess_example (line 403) | def preprocess_example(self, example, unused_mode, unused_hparams): method generate_data (line 411) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method hparams (line 414) | def hparams(self, defaults, unused_model_hparams): function _crop (line 428) | def _crop(image, offset_height, offset_width, crop_height, crop_width): function distorted_bounding_box_crop (line 470) | def distorted_bounding_box_crop(image, function _random_crop (line 528) | def _random_crop(image, size): function _flip (line 547) | def _flip(image): function _at_least_x_are_true (line 553) | def _at_least_x_are_true(a, b, x): function _do_scale (line 560) | def _do_scale(image, size): function _center_crop (line 571) | def _center_crop(image, size): function _normalize (line 582) | def _normalize(image): function preprocess_for_train (line 592) | def preprocess_for_train(image, image_size=224, normalize=True): function preprocess_for_eval (line 611) | def preprocess_for_eval(image, image_size=224, normalize=True): FILE: tensor2tensor/data_generators/imagenet_test.py class ImagenetTest (line 30) | class ImagenetTest(parameterized.TestCase, tf.test.TestCase): method testImagenetMultiResolutionPreprocessExample (line 36) | def testImagenetMultiResolutionPreprocessExample(self, resize_method): method testImagenetIsNormalized (line 48) | def testImagenetIsNormalized(self): FILE: tensor2tensor/data_generators/imdb.py class SentimentIMDB (line 33) | class SentimentIMDB(text_problems.Text2ClassProblem): method is_generate_per_split (line 38) | def is_generate_per_split(self): method dataset_splits (line 42) | def dataset_splits(self): method approx_vocab_size (line 52) | def approx_vocab_size(self): method num_classes (line 56) | def num_classes(self): method class_labels (line 59) | def class_labels(self, data_dir): method doc_generator (line 63) | def doc_generator(self, imdb_dir, dataset, include_label=False): method generate_samples (line 76) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class SentimentIMDBCharacters (line 98) | class SentimentIMDBCharacters(SentimentIMDB): method vocab_type (line 102) | def vocab_type(self): method global_task_id (line 105) | def global_task_id(self): FILE: tensor2tensor/data_generators/inspect_tfrecord.py function main (line 48) | def main(_): FILE: tensor2tensor/data_generators/lambada.py function _prepare_lambada_data (line 57) | def _prepare_lambada_data(tmp_dir, data_dir, vocab_size, vocab_filename): function get_dataset_split (line 89) | def get_dataset_split(tmp_dir, split, use_control_set): class LambadaLm (line 130) | class LambadaLm(text_problems.Text2SelfProblem): method is_generate_per_split (line 134) | def is_generate_per_split(self): method dataset_splits (line 143) | def dataset_splits(self): method vocab_type (line 161) | def vocab_type(self): method vocab_size (line 165) | def vocab_size(self): method oov_token (line 170) | def oov_token(self): method use_control_set (line 174) | def use_control_set(self): method generate_samples (line 178) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class LambadaLmControl (line 211) | class LambadaLmControl(LambadaLm): method control_set (line 215) | def control_set(self): class LambadaRc (line 221) | class LambadaRc(text_problems.Text2ClassProblem): method is_generate_per_split (line 225) | def is_generate_per_split(self): method dataset_splits (line 234) | def dataset_splits(self): method vocab_type (line 252) | def vocab_type(self): method vocab_size (line 256) | def vocab_size(self): method oov_token (line 261) | def oov_token(self): method use_control_set (line 265) | def use_control_set(self): method get_labels_encoder (line 269) | def get_labels_encoder(self, data_dir): method generate_samples (line 282) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method generate_encoded_samples (line 316) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): method feature_encoders (line 337) | def feature_encoders(self, data_dir): method hparams (line 351) | def hparams(self, defaults, unused_model_hparams): class LambadaRcControl (line 368) | class LambadaRcControl(LambadaRc): method control_set (line 372) | def control_set(self): FILE: tensor2tensor/data_generators/librispeech.py function _collect_data (line 63) | def _collect_data(directory, input_ext, transcription_ext): class Librispeech (line 89) | class Librispeech(speech_recognition.SpeechRecognitionProblem): method num_shards (line 98) | def num_shards(self): method use_subword_tokenizer (line 102) | def use_subword_tokenizer(self): method num_dev_shards (line 106) | def num_dev_shards(self): method num_test_shards (line 110) | def num_test_shards(self): method use_train_shards_for_dev (line 114) | def use_train_shards_for_dev(self): method generator (line 118) | def generator(self, data_dir, tmp_dir, datasets, method generate_data (line 160) | def generate_data(self, data_dir, tmp_dir, task_id=-1): class LibrispeechTrainFullTestClean (line 183) | class LibrispeechTrainFullTestClean(Librispeech): method training_filepaths (line 186) | def training_filepaths(self, data_dir, num_shards, shuffled): method dev_filepaths (line 189) | def dev_filepaths(self, data_dir, num_shards, shuffled): method test_filepaths (line 192) | def test_filepaths(self, data_dir, num_shards, shuffled): method generate_data (line 195) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method filepattern (line 198) | def filepattern(self, data_dir, mode, shard=None): class LibrispeechTrainFullTestOther (line 231) | class LibrispeechTrainFullTestOther(Librispeech): method training_filepaths (line 234) | def training_filepaths(self, data_dir, num_shards, shuffled): method dev_filepaths (line 237) | def dev_filepaths(self, data_dir, num_shards, shuffled): method test_filepaths (line 240) | def test_filepaths(self, data_dir, num_shards, shuffled): method generate_data (line 243) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method filepattern (line 246) | def filepattern(self, data_dir, mode, shard=None): class LibrispeechCleanSmall (line 279) | class LibrispeechCleanSmall(Librispeech): class LibrispeechClean (line 289) | class LibrispeechClean(Librispeech): class LibrispeechNoisy (line 299) | class LibrispeechNoisy(Librispeech): function add_librispeech_hparams (line 309) | def add_librispeech_hparams(hparams): function set_librispeech_length_hparams (line 324) | def set_librispeech_length_hparams(hparams): FILE: tensor2tensor/data_generators/lm1b.py function _original_vocab (line 35) | def _original_vocab(tmp_dir): function _replace_oov (line 58) | def _replace_oov(original_vocab, line): function _train_data_filenames (line 74) | def _train_data_filenames(tmp_dir): function _dev_data_filenames (line 83) | def _dev_data_filenames(tmp_dir): function _maybe_download_corpus (line 90) | def _maybe_download_corpus(tmp_dir): class LanguagemodelLm1b32k (line 107) | class LanguagemodelLm1b32k(text_problems.Text2SelfProblem): method approx_vocab_size (line 115) | def approx_vocab_size(self): method max_samples_for_vocab (line 119) | def max_samples_for_vocab(self): method is_generate_per_split (line 122) | def is_generate_per_split(self): method generate_samples (line 125) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class LanguagemodelLm1b8k (line 142) | class LanguagemodelLm1b8k(LanguagemodelLm1b32k): method approx_vocab_size (line 145) | def approx_vocab_size(self): class LanguagemodelLm1b32kPacked (line 150) | class LanguagemodelLm1b32kPacked(LanguagemodelLm1b32k): method packed_length (line 154) | def packed_length(self): method vocab_filename (line 158) | def vocab_filename(self): class LanguagemodelLm1b8kPacked (line 163) | class LanguagemodelLm1b8kPacked(LanguagemodelLm1b8k): method packed_length (line 171) | def packed_length(self): method vocab_filename (line 175) | def vocab_filename(self): class LanguagemodelLm1bCharacters (line 180) | class LanguagemodelLm1bCharacters(LanguagemodelLm1b32k): method vocab_type (line 188) | def vocab_type(self): method global_task_id (line 191) | def global_task_id(self): class LanguagemodelLm1bCharactersPacked (line 196) | class LanguagemodelLm1bCharactersPacked(LanguagemodelLm1bCharacters): method packed_length (line 204) | def packed_length(self): FILE: tensor2tensor/data_generators/lm1b_imdb.py class LanguagemodelLm1bSentimentIMDB (line 30) | class LanguagemodelLm1bSentimentIMDB(multi_problem.MultiProblem): method __init__ (line 33) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 39) | def vocab_type(self): FILE: tensor2tensor/data_generators/lm1b_mnli.py class LanguagemodelLm1bMultiNLISubwords (line 30) | class LanguagemodelLm1bMultiNLISubwords(multi_problem.MultiProblem): method __init__ (line 33) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 40) | def vocab_type(self): class LanguagemodelLm1bMultiNLI (line 45) | class LanguagemodelLm1bMultiNLI(multi_problem.MultiProblem): method __init__ (line 48) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 54) | def vocab_type(self): FILE: tensor2tensor/data_generators/mnist.py function _get_mnist (line 42) | def _get_mnist(directory): function _extract_mnist_images (line 51) | def _extract_mnist_images(filename, num_images): function _extract_mnist_labels (line 69) | def _extract_mnist_labels(filename, num_labels): function mnist_common_generator (line 86) | def mnist_common_generator(tmp_dir, function mnist_generator (line 117) | def mnist_generator(tmp_dir, training, how_many, start_from=0): class ImageMnistTune (line 136) | class ImageMnistTune(image_utils.Image2ClassProblem): method num_channels (line 140) | def num_channels(self): method is_small (line 144) | def is_small(self): method num_classes (line 148) | def num_classes(self): method class_labels (line 152) | def class_labels(self): method train_shards (line 156) | def train_shards(self): method preprocess_example (line 159) | def preprocess_example(self, example, mode, unused_hparams): method generator (line 167) | def generator(self, data_dir, tmp_dir, is_training): class ImageMnist (line 175) | class ImageMnist(ImageMnistTune): method generator (line 177) | def generator(self, data_dir, tmp_dir, is_training): function _get_fashion_mnist (line 191) | def _get_fashion_mnist(directory): function fashion_mnist_generator (line 204) | def fashion_mnist_generator(tmp_dir, training, how_many, start_from=0): class ImageFashionMnist (line 225) | class ImageFashionMnist(image_utils.Image2ClassProblem): method is_small (line 229) | def is_small(self): method num_channels (line 233) | def num_channels(self): method num_classes (line 237) | def num_classes(self): method class_labels (line 241) | def class_labels(self): method train_shards (line 245) | def train_shards(self): method preprocess_example (line 248) | def preprocess_example(self, example, mode, unused_hparams): method generator (line 254) | def generator(self, data_dir, tmp_dir, is_training): FILE: tensor2tensor/data_generators/moving_mnist.py class VideoMovingMnist (line 52) | class VideoMovingMnist(video_utils.VideoProblem): method num_channels (line 56) | def num_channels(self): method frame_height (line 60) | def frame_height(self): method frame_width (line 64) | def frame_width(self): method is_generate_per_split (line 68) | def is_generate_per_split(self): method total_number_of_frames (line 73) | def total_number_of_frames(self): method max_frames_per_video (line 76) | def max_frames_per_video(self, hparams): method random_skip (line 80) | def random_skip(self): method dataset_splits (line 84) | def dataset_splits(self): method extra_reading_spec (line 92) | def extra_reading_spec(self): method hparams (line 103) | def hparams(self, defaults, unused_model_hparams): method get_test_iterator (line 110) | def get_test_iterator(self, tmp_dir): method map_fn (line 120) | def map_fn(self, image, label): method get_train_iterator (line 125) | def get_train_iterator(self): method generate_samples (line 133) | def generate_samples(self, data_dir, tmp_dir, dataset_split): FILE: tensor2tensor/data_generators/mrpc.py class MSRParaphraseCorpus (line 34) | class MSRParaphraseCorpus(text_problems.TextConcat2ClassProblem): method is_generate_per_split (line 49) | def is_generate_per_split(self): method dataset_splits (line 53) | def dataset_splits(self): method approx_vocab_size (line 66) | def approx_vocab_size(self): method num_classes (line 70) | def num_classes(self): method class_labels (line 73) | def class_labels(self, data_dir): method _maybe_download_corpora (line 77) | def _maybe_download_corpora(self, tmp_dir): method example_generator (line 94) | def example_generator(self, filename, dev_ids, dataset_split): method generate_samples (line 111) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class MSRParaphraseCorpusCharacters (line 128) | class MSRParaphraseCorpusCharacters(MSRParaphraseCorpus): method vocab_type (line 132) | def vocab_type(self): method global_task_id (line 135) | def global_task_id(self): FILE: tensor2tensor/data_generators/mscoco.py function _get_mscoco (line 49) | def _get_mscoco(directory): function mscoco_generator (line 60) | def mscoco_generator(data_dir, class ImageMsCocoCharacters (line 146) | class ImageMsCocoCharacters(image_utils.Image2TextProblem): method is_character_level (line 150) | def is_character_level(self): method target_space_id (line 154) | def target_space_id(self): method train_shards (line 158) | def train_shards(self): method dev_shards (line 162) | def dev_shards(self): method preprocess_example (line 165) | def preprocess_example(self, example, mode, _): method generator (line 168) | def generator(self, data_dir, tmp_dir, is_training): class ImageMsCocoTokens32k (line 177) | class ImageMsCocoTokens32k(ImageMsCocoCharacters): method is_character_level (line 181) | def is_character_level(self): method vocab_problem (line 185) | def vocab_problem(self): method target_space_id (line 189) | def target_space_id(self): method train_shards (line 193) | def train_shards(self): method dev_shards (line 197) | def dev_shards(self): method generator (line 200) | def generator(self, data_dir, tmp_dir, is_training): class ImageTextMsCocoMultiResolution (line 222) | class ImageTextMsCocoMultiResolution(ImageMsCocoTokens32k): method dataset_filename (line 225) | def dataset_filename(self): method preprocess_example (line 228) | def preprocess_example(self, example, mode, hparams): class ImageTextMsCoco (line 257) | class ImageTextMsCoco(ImageMsCocoTokens32k): method dataset_filename (line 261) | def dataset_filename(self): method preprocess_example (line 264) | def preprocess_example(self, example, mode, unused_hparams): FILE: tensor2tensor/data_generators/mscoco_test.py class MscocoTest (line 30) | class MscocoTest(parameterized.TestCase, tf.test.TestCase): method testMsCocoMultiResolutionPreprocessExample (line 36) | def testMsCocoMultiResolutionPreprocessExample(self, resize_method): FILE: tensor2tensor/data_generators/multi_problem.py class MixingSchedule (line 32) | class MixingSchedule(object): function normalize_example_nlp (line 39) | def normalize_example_nlp(task, example, is_infer, vocab_type, vocab_off... function flatten_zip_dataset (line 112) | def flatten_zip_dataset(*args): class MultiProblem (line 132) | class MultiProblem(problem.Problem): method __init__ (line 137) | def __init__(self, was_reversed=False, was_copy=False): method generate_data (line 141) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method normalize_example (line 146) | def normalize_example(self, task, example, encoder, hparams, is_infer): method filepattern (line 157) | def filepattern(self, data_dir, mode, shard=None): method get_hparams (line 161) | def get_hparams(self, model_hparams=None): method dataset (line 179) | def dataset(self, method eval_metrics (line 375) | def eval_metrics(self): method update_task_ids (line 386) | def update_task_ids(self, encoder_vocab_size): method get_max_num_classes (line 400) | def get_max_num_classes(self): function aggregate_task_losses (line 420) | def aggregate_task_losses(hparams, function aggregate_task_lm_losses (line 526) | def aggregate_task_lm_losses(hparams, FILE: tensor2tensor/data_generators/multi_problem_v2.py class MultiProblemV2 (line 67) | class MultiProblemV2(problem.Problem): method __init__ (line 70) | def __init__(self, problems, schedule, **kwargs): method filepattern (line 82) | def filepattern(self, *args, **kwargs): method generate_data (line 86) | def generate_data(self, *args, **kwargs): method only_eval_first_problem (line 92) | def only_eval_first_problem(self): method normalize_example (line 96) | def normalize_example(self, example, hparams): method dataset (line 101) | def dataset(self, mode, hparams=None, global_step=None, **kwargs): class MultiText2TextProblem (line 136) | class MultiText2TextProblem(MultiProblemV2, text_problems.Text2TextProbl... method normalize_example (line 139) | def normalize_example(self, example, hparams): method generate_data_with_shared_vocab (line 183) | def generate_data_with_shared_vocab(self, data_dir, tmp_dir, task_id=-1): method packed_length (line 200) | def packed_length(self): function get_multi_dataset (line 205) | def get_multi_dataset(datasets, pmf=None): function get_schedule_distribution (line 226) | def get_schedule_distribution(schedule, global_step=None): function categorical_case (line 256) | def categorical_case(pmf, fns, rand=None): function linear_interpolation (line 274) | def linear_interpolation(x, xp, fp, **kwargs): function step_interpolation (line 297) | def step_interpolation(x, xp, fp, **kwargs): function constant_schedule (line 328) | def constant_schedule(pmf): function example_rates_to_pmf (line 341) | def example_rates_to_pmf(example_rates): function epoch_rates_to_pmf (line 353) | def epoch_rates_to_pmf(problems, epoch_rates=None): function encode_schedule (line 378) | def encode_schedule(schedule): function decode_schedule (line 397) | def decode_schedule(string): function tuplize (line 413) | def tuplize(nested): FILE: tensor2tensor/data_generators/multi_problem_v2_test.py class MultiProblemV2Test (line 30) | class MultiProblemV2Test(parameterized.TestCase, tf.test.TestCase): method test_tuplize (line 42) | def test_tuplize(self, inputs, targets): method test_encode_decode_schedule (line 59) | def test_encode_decode_schedule(self, schedule, string): method test_linear_interpolation (line 78) | def test_linear_interpolation(self, x, xp, fp, y): method test_step_interpolation (line 96) | def test_step_interpolation(self, x, xp, fp, y): method test_get_schedule_distribution (line 115) | def test_get_schedule_distribution(self, schedule, steps, pmfs): method test_categorical_case (line 138) | def test_categorical_case(self, pmf, fns, rands, targets): method test_get_multi_dataset (line 161) | def test_get_multi_dataset(self, pmf, num_datasets, sample_size): method test_multi_problem_v2 (line 186) | def test_multi_problem_v2(self, schedule, num_datasets, sample_size): FILE: tensor2tensor/data_generators/multinli.py function _maybe_download_corpora (line 42) | def _maybe_download_corpora(tmp_dir): function _example_generator (line 62) | def _example_generator(filename): class MultiNLI (line 83) | class MultiNLI(text_problems.TextConcat2ClassProblem): method is_generate_per_split (line 87) | def is_generate_per_split(self): method dataset_splits (line 91) | def dataset_splits(self): method approx_vocab_size (line 101) | def approx_vocab_size(self): method num_classes (line 105) | def num_classes(self): method class_labels (line 108) | def class_labels(self, data_dir): method generate_samples (line 113) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class MultiNLIText2text (line 132) | class MultiNLIText2text(text_problems.Text2TextProblem): method is_generate_per_split (line 136) | def is_generate_per_split(self): method approx_vocab_size (line 140) | def approx_vocab_size(self): method generate_samples (line 143) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class MultiNLIText2textMulti64kPacked1k (line 162) | class MultiNLIText2textMulti64kPacked1k(MultiNLIText2text): method packed_length (line 166) | def packed_length(self): method use_vocab_from_other_problem (line 170) | def use_vocab_from_other_problem(self): method num_training_examples (line 174) | def num_training_examples(self): class MultiNLICharacters (line 179) | class MultiNLICharacters(MultiNLI): method vocab_type (line 183) | def vocab_type(self): method global_task_id (line 186) | def global_task_id(self): class MultiNLISharedVocab (line 191) | class MultiNLISharedVocab(MultiNLI): method use_vocab_from_other_problem (line 195) | def use_vocab_from_other_problem(self): class MultiNLIWikiLMSharedVocab (line 200) | class MultiNLIWikiLMSharedVocab(MultiNLI): method use_vocab_from_other_problem (line 204) | def use_vocab_from_other_problem(self): class MultiNLIWikiLMSharedVocab64k (line 209) | class MultiNLIWikiLMSharedVocab64k(MultiNLIWikiLMSharedVocab): method use_vocab_from_other_problem (line 213) | def use_vocab_from_other_problem(self): class MultiNLIWikiLMMultiVocab64k (line 218) | class MultiNLIWikiLMMultiVocab64k(MultiNLIWikiLMSharedVocab): method use_vocab_from_other_problem (line 222) | def use_vocab_from_other_problem(self): FILE: tensor2tensor/data_generators/ocr.py class OcrTest (line 31) | class OcrTest(image_utils.Image2TextProblem): method is_small (line 35) | def is_small(self): method is_character_level (line 39) | def is_character_level(self): method target_space_id (line 43) | def target_space_id(self): method train_shards (line 47) | def train_shards(self): method dev_shards (line 51) | def dev_shards(self): method preprocess_example (line 54) | def preprocess_example(self, example, mode, _): method generator (line 63) | def generator(self, data_dir, tmp_dir, is_training): FILE: tensor2tensor/data_generators/ops/pack_sequences_ops.cc type tensor2tensor (line 9) | namespace tensor2tensor { class PackSequences2Op (line 51) | class PackSequences2Op : public OpKernel { method PackSequences2Op (line 53) | explicit PackSequences2Op( method Compute (line 57) | void Compute(OpKernelContext* ctx) override { type PackingSpec (line 244) | struct PackingSpec { class PackSequencesKOp (line 255) | class PackSequencesKOp : public OpKernel { method PackSequencesKOp (line 257) | explicit PackSequencesKOp(OpKernelConstruction* ctx) : OpKernel(ctx) { method Compute (line 266) | void Compute(OpKernelContext* ctx) override { method GetInputLengths (line 386) | std::vector GetInputLengths( method GetInputLengths (line 407) | std::vector GetInputLengths( method GetInputLengths (line 425) | std::vector GetInputLengths( method GetInputLengths (line 442) | std::vector GetInputLengths( method SetZero (line 461) | void SetZero(OpKernelContext* ctx, Tensor* inputs) { method SetZero (line 482) | void SetZero(OpKernelContext* ctx, Tensor* inputs) { method PackSequence (line 496) | void PackSequence(OpKernelContext* ctx, const Tensor& inputs, Tensor... method PackSequence (line 524) | void PackSequence(OpKernelContext* ctx, const Tensor& inputs, Tensor... method PackSequence (line 554) | void PackSequence(OpKernelContext* ctx, method PackSequence (line 568) | void PackSequence(OpKernelContext* ctx, FILE: tensor2tensor/data_generators/ops/pack_sequences_ops_test.py function _pack_sequences_k (line 27) | def _pack_sequences_k(inputs, targets, input_max_length, target_max_leng... class PackSequencesOpsTest (line 42) | class PackSequencesOpsTest(tf.test.TestCase): method do_test_pack_sequences_length3 (line 44) | def do_test_pack_sequences_length3(self, pack_fn): method do_test_pack_sequences_length4 (line 91) | def do_test_pack_sequences_length4(self, pack_fn): method do_test_pack_sequences_length5 (line 132) | def do_test_pack_sequences_length5(self, pack_fn): method do_test_pack_sequences_length6 (line 178) | def do_test_pack_sequences_length6(self, pack_fn): method do_test_pack_sequences_length7 (line 212) | def do_test_pack_sequences_length7(self, pack_fn): method do_test_pack_sequences_length_different_lengths (line 246) | def do_test_pack_sequences_length_different_lengths(self, pack_fn): method test_pack_sequences2 (line 293) | def test_pack_sequences2(self): method test_pack_sequences_k (line 302) | def test_pack_sequences_k(self): method test_random_inputs (line 310) | def test_random_inputs(self): method test_pack_sequences_k_multi_input (line 350) | def test_pack_sequences_k_multi_input(self): method test_pack_sequences_k_int64 (line 419) | def test_pack_sequences_k_int64(self): method test_pack_sequences_k_bfloat16 (line 448) | def test_pack_sequences_k_bfloat16(self): FILE: tensor2tensor/data_generators/ops/subword_text_encoder.cc type tensor2tensor (line 11) | namespace tensor2tensor { FILE: tensor2tensor/data_generators/ops/subword_text_encoder.h function namespace (line 10) | namespace tensor2tensor { FILE: tensor2tensor/data_generators/ops/subword_text_encoder_ops.cc type tensor2tensor (line 9) | namespace tensor2tensor { class SubwordTextEncoderEncodeOp (line 31) | class SubwordTextEncoderEncodeOp : public OpKernel { method SubwordTextEncoderEncodeOp (line 33) | explicit SubwordTextEncoderEncodeOp( method Compute (line 40) | void Compute(OpKernelContext* ctx) override { FILE: tensor2tensor/data_generators/ops/subword_text_encoder_ops_test.py class SubwordTextEncoderOpsTest (line 29) | class SubwordTextEncoderOpsTest(tf.test.TestCase): method test_subword_text_encoder_encode (line 31) | def test_subword_text_encoder_encode(self): FILE: tensor2tensor/data_generators/ops/subword_text_encoder_test.cc type tensor2tensor (line 7) | namespace tensor2tensor { function TEST (line 10) | TEST(SubwordTextEncoderTest, EncodesSubTokens) { function TEST (line 18) | TEST(SubwordTextEncoderTest, EncodesUnicodeSubTokens) { function TEST (line 26) | TEST(SubwordTextEncoderTest, EncodesUnicodeCodePoints) { function TEST (line 34) | TEST(SubwordTextEncoderTest, EncodesCharactersNotInAlphabet) { FILE: tensor2tensor/data_generators/paraphrase_ms_coco.py function create_combination (line 42) | def create_combination(list_of_sentences): class ParaphraseGenerationProblem (line 70) | class ParaphraseGenerationProblem(text_problems.Text2TextProblem): method bidirectional (line 74) | def bidirectional(self): method prepare_data (line 82) | def prepare_data(self, data_dir, tmp_dir, dataset_split): method generate_samples (line 85) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class ParaphraseGenerationMsCocoProblem (line 98) | class ParaphraseGenerationMsCocoProblem(ParaphraseGenerationProblem): method is_generate_per_split (line 102) | def is_generate_per_split(self): method dataset_splits (line 106) | def dataset_splits(self): method approx_vocab_size (line 116) | def approx_vocab_size(self): method prepare_data (line 119) | def prepare_data(self, data_dir, tmp_dir, dataset_split): method _maybe_download (line 133) | def _maybe_download(self, tmp_dir, dataset_split): method _get_captions (line 149) | def _get_captions(self, ms_coco_path): class ParaphraseGenerationMsCocoProblem2d (line 164) | class ParaphraseGenerationMsCocoProblem2d( method bidirectional (line 168) | def bidirectional(self): class ParaphraseGenerationMsCocoProblem1d (line 173) | class ParaphraseGenerationMsCocoProblem1d( method bidirectional (line 177) | def bidirectional(self): class ParaphraseGenerationMsCocoProblem2dCharacters (line 182) | class ParaphraseGenerationMsCocoProblem2dCharacters( method vocab_type (line 186) | def vocab_type(self): class ParaphraseGenerationMsCocoProblem1dCharacters (line 191) | class ParaphraseGenerationMsCocoProblem1dCharacters( method vocab_type (line 195) | def vocab_type(self): FILE: tensor2tensor/data_generators/paraphrase_ms_coco_test.py class ParaphraseGenerationProblemTest (line 29) | class ParaphraseGenerationProblemTest(tf.test.TestCase): method testCombinationPairs (line 31) | def testCombinationPairs(self): method testBidirectionalTrue (line 42) | def testBidirectionalTrue(self, data, bidirectional): method testBidirectionalFalse (line 59) | def testBidirectionalFalse(self, data, bidirectional): FILE: tensor2tensor/data_generators/pointer_generator_word.py class Text2textCopyableTokens (line 31) | class Text2textCopyableTokens(text_problems.Text2textTmpdirTokens): method get_or_create_vocab (line 39) | def get_or_create_vocab(self, data_dir, tmp_dir, force_get=False): method generate_encoded_samples (line 45) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): method text2text_generate_encoded_oovs (line 51) | def text2text_generate_encoded_oovs(self, method example_reading_spec (line 71) | def example_reading_spec(self): class TokenTextEncoderOov (line 82) | class TokenTextEncoderOov(text_encoder.TokenTextEncoder): method encode (line 93) | def encode(self, s): method encode_target (line 138) | def encode_target(self, target, source_oovs): method decode_oov (line 175) | def decode_oov(self, ids, source_oov): method decode_list_oov (line 178) | def decode_list_oov(self, ids, source_oov_id_to_token): FILE: tensor2tensor/data_generators/problem.py class DatasetSplit (line 47) | class DatasetSplit(object): class SpaceID (line 53) | class SpaceID(object): class TaskID (line 119) | class TaskID(object): function default_model_hparams (line 141) | def default_model_hparams(): function preprocess_example_common (line 150) | def preprocess_example_common(example, mode, hparams): class Problem (line 173) | class Problem(object): method generate_data (line 232) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method multiprocess_generate (line 236) | def multiprocess_generate(self): method num_generate_tasks (line 241) | def num_generate_tasks(self): method num_training_examples (line 246) | def num_training_examples(self): method prepare_to_generate (line 250) | def prepare_to_generate(self, data_dir, tmp_dir): method hparams (line 264) | def hparams(self, defaults, model_hparams): method max_length (line 267) | def max_length(self, model_hparams): method tpu_batch_size_per_shard (line 280) | def tpu_batch_size_per_shard(self, model_hparams): method batch_size_means_tokens (line 294) | def batch_size_means_tokens(self): method skip_random_fraction_when_training (line 313) | def skip_random_fraction_when_training(self): method dataset_filename (line 321) | def dataset_filename(self): method feature_encoders (line 324) | def feature_encoders(self, data_dir): method example_reading_spec (line 331) | def example_reading_spec(self): method preprocess_example (line 346) | def preprocess_example(self, example, mode, hparams): method eval_metrics (line 362) | def eval_metrics(self): method all_metrics_fns (line 369) | def all_metrics_fns(self): method eval_metric_fns (line 372) | def eval_metric_fns(self, model_hparams): method eval_hooks (line 386) | def eval_hooks(self, features, logits, hparams): method task_id (line 391) | def task_id(self): method set_task_id (line 396) | def set_task_id(self, new_task_id): method preprocess (line 404) | def preprocess(self, dataset, mode, hparams, interleave=True): method training_filepaths (line 436) | def training_filepaths(self, data_dir, num_shards, shuffled): method dev_filepaths (line 443) | def dev_filepaths(self, data_dir, num_shards, shuffled): method test_filepaths (line 450) | def test_filepaths(self, data_dir, num_shards, shuffled): method data_filepaths (line 457) | def data_filepaths(self, split, output_dir, num_shards, shuffled): method filepattern (line 467) | def filepattern(self, data_dir, mode, shard=None): method __init__ (line 496) | def __init__(self, was_reversed=False, was_copy=False): method was_reversed (line 513) | def was_reversed(self): method get_feature_encoders (line 517) | def get_feature_encoders(self, data_dir=None): method get_hparams (line 522) | def get_hparams(self, model_hparams=None): method maybe_reverse_features (line 553) | def maybe_reverse_features(self, feature_map): method maybe_copy_features (line 576) | def maybe_copy_features(self, feature_map): method maybe_reverse_and_copy (line 587) | def maybe_reverse_and_copy(self, example): method dataset (line 593) | def dataset(self, method decode_example (line 710) | def decode_example(self, serialized_example): method decode_hooks (line 741) | def decode_hooks(self): method has_inputs (line 752) | def has_inputs(self): method feature_info (line 756) | def feature_info(self): method make_estimator_input_fn (line 792) | def make_estimator_input_fn(self, method _dataset_partition (line 814) | def _dataset_partition(self, mode, config, params): method input_fn (line 851) | def input_fn(self, method export_assets (line 910) | def export_assets(self): method serving_input_fn (line 920) | def serving_input_fn(self, hparams, decode_hparams=None, use_tpu=False): class FeatureInfo (line 955) | class FeatureInfo(object): method __init__ (line 958) | def __init__(self, function _copy_problem_hparams (line 969) | def _copy_problem_hparams(p_hparams): function _reverse_problem_hparams (line 984) | def _reverse_problem_hparams(p_hparams): function _default_hparams (line 1042) | def _default_hparams(): function problem_hparams_to_features (line 1078) | def problem_hparams_to_features(problem_hparams): FILE: tensor2tensor/data_generators/problem_hparams.py class AudioTimitProblem (line 35) | class AudioTimitProblem(problem.Problem): method example_reading_spec (line 38) | def example_reading_spec(self): method preprocess_example (line 47) | def preprocess_example(self, example, mode, hparams): class AudioTimitCharactersTune (line 60) | class AudioTimitCharactersTune(AudioTimitProblem): method feature_encoders (line 63) | def feature_encoders(self, _): method hparams (line 69) | def hparams(self, defaults, model_hparams): class AudioTimitTokens8kTune (line 78) | class AudioTimitTokens8kTune(AudioTimitProblem): method target_vocab_size (line 82) | def target_vocab_size(self): method feature_encoders (line 85) | def feature_encoders(self, data_dir): method hparams (line 94) | def hparams(self, defaults, model_hparams): class AudioTimitTokens8kTest (line 109) | class AudioTimitTokens8kTest(AudioTimitTokens8kTune): class ParsingEnglishPtb8k (line 115) | class ParsingEnglishPtb8k(problem.Problem): method target_vocab_size (line 119) | def target_vocab_size(self): method feature_encoders (line 122) | def feature_encoders(self, data_dir): method hparams (line 131) | def hparams(self, defaults, model_hparams): class ParsingEnglishPtb16k (line 146) | class ParsingEnglishPtb16k(problem.Problem): method vocab_prefix (line 150) | def vocab_prefix(self): method inputs_target_vocab_size (line 154) | def inputs_target_vocab_size(self): method targets_target_vocab_size (line 158) | def targets_target_vocab_size(self): method feature_encoders (line 161) | def feature_encoders(self, data_dir): method hparams (line 175) | def hparams(self, defaults, model_hparams): class TestProblem (line 187) | class TestProblem(problem.Problem): method __init__ (line 190) | def __init__(self, input_vocab_size, target_vocab_size): method hparams (line 195) | def hparams(self, defaults, model_hparams): function test_problem_hparams (line 203) | def test_problem_hparams(input_vocab_size=None, FILE: tensor2tensor/data_generators/problem_test.py function assert_tensors_equal (line 37) | def assert_tensors_equal(sess, t1, t2, n): class ProblemTest (line 53) | class ProblemTest(parameterized.TestCase, tf.test.TestCase): method setUpClass (line 56) | def setUpClass(cls): method testNoShuffleDeterministic (line 60) | def testNoShuffleDeterministic(self): method testNoShufflePreprocess (line 73) | def testNoShufflePreprocess(self): method testProblemHparamsModality (line 90) | def testProblemHparamsModality(self): method testProblemHparamsInputOnlyModality (line 100) | def testProblemHparamsInputOnlyModality(self): method testProblemHparamsTargetOnlyModality (line 115) | def testProblemHparamsTargetOnlyModality(self): method testDataFilenames (line 130) | def testDataFilenames(self): method testServingInputFnUseTpu (line 155) | def testServingInputFnUseTpu(self): method testInputAndTargetVocabSizesAreReversed (line 194) | def testInputAndTargetVocabSizesAreReversed(self): method testInputAndTargetModalitiesAreReversed (line 216) | def testInputAndTargetModalitiesAreReversed(self): FILE: tensor2tensor/data_generators/program_search.py class ProgramSearchAlgolisp (line 35) | class ProgramSearchAlgolisp(text_problems.Text2TextProblem): method _extract_filename_from_url (line 55) | def _extract_filename_from_url(url): method _flatten_target_programs (line 65) | def _flatten_target_programs(iterable): method _parse_json_to_dict (line 78) | def _parse_json_to_dict(json_line): method is_generate_per_split (line 98) | def is_generate_per_split(self): method maybe_download_dataset (line 102) | def maybe_download_dataset(self, tmp_dir, dataset_split): method generate_samples (line 116) | def generate_samples(self, data_dir, tmp_dir, dataset_split): FILE: tensor2tensor/data_generators/program_search_test.py class ProgramSearchAlgolispStub (line 34) | class ProgramSearchAlgolispStub(program_search.ProgramSearchAlgolisp): method maybe_download_dataset (line 66) | def maybe_download_dataset(self, tmp_dir, dataset_split): class ProgramSearchAlgolispTest (line 76) | class ProgramSearchAlgolispTest(tf.test.TestCase): method setUpClass (line 79) | def setUpClass(cls): method tearDownClass (line 86) | def tearDownClass(cls): method testEndToEnd (line 90) | def testEndToEnd(self): FILE: tensor2tensor/data_generators/ptb.py function _read_words (line 39) | def _read_words(filename): function _build_vocab (line 48) | def _build_vocab(filename, vocab_path, vocab_size): function _get_token_encoder (line 67) | def _get_token_encoder(vocab_dir, vocab_name, filename): function _maybe_download_corpus (line 75) | def _maybe_download_corpus(tmp_dir, vocab_type): class LanguagemodelPtb10k (line 111) | class LanguagemodelPtb10k(text_problems.Text2SelfProblem): method dataset_splits (line 115) | def dataset_splits(self): method is_generate_per_split (line 125) | def is_generate_per_split(self): method vocab_filename (line 129) | def vocab_filename(self): method vocab_type (line 133) | def vocab_type(self): method generate_samples (line 136) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class LanguagemodelPtbCharacters (line 164) | class LanguagemodelPtbCharacters(LanguagemodelPtb10k): method vocab_type (line 168) | def vocab_type(self): FILE: tensor2tensor/data_generators/qnli.py class QuestionNLI (line 35) | class QuestionNLI(text_problems.TextConcat2ClassProblem): method is_generate_per_split (line 45) | def is_generate_per_split(self): method dataset_splits (line 49) | def dataset_splits(self): method approx_vocab_size (line 59) | def approx_vocab_size(self): method num_classes (line 63) | def num_classes(self): method class_labels (line 66) | def class_labels(self, data_dir): method _maybe_download_corpora (line 71) | def _maybe_download_corpora(self, tmp_dir): method example_generator (line 83) | def example_generator(self, filename): method generate_samples (line 96) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class QuestionNLICharacters (line 109) | class QuestionNLICharacters(QuestionNLI): method vocab_type (line 113) | def vocab_type(self): method global_task_id (line 116) | def global_task_id(self): FILE: tensor2tensor/data_generators/quora_qpairs.py class QuoraQuestionPairs (line 35) | class QuoraQuestionPairs(text_problems.TextConcat2ClassProblem): method is_generate_per_split (line 45) | def is_generate_per_split(self): method dataset_splits (line 49) | def dataset_splits(self): method approx_vocab_size (line 59) | def approx_vocab_size(self): method num_classes (line 63) | def num_classes(self): method class_labels (line 66) | def class_labels(self, data_dir): method _maybe_download_corpora (line 70) | def _maybe_download_corpora(self, tmp_dir): method example_generator (line 82) | def example_generator(self, filename): method generate_samples (line 102) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class QuoraQuestionPairsCharacters (line 115) | class QuoraQuestionPairsCharacters(QuoraQuestionPairs): method vocab_type (line 119) | def vocab_type(self): method global_task_id (line 122) | def global_task_id(self): FILE: tensor2tensor/data_generators/rte.py class RTE (line 35) | class RTE(text_problems.TextConcat2ClassProblem): method is_generate_per_split (line 45) | def is_generate_per_split(self): method dataset_splits (line 49) | def dataset_splits(self): method approx_vocab_size (line 59) | def approx_vocab_size(self): method num_classes (line 63) | def num_classes(self): method class_labels (line 66) | def class_labels(self, data_dir): method _maybe_download_corpora (line 71) | def _maybe_download_corpora(self, tmp_dir): method example_generator (line 83) | def example_generator(self, filename): method generate_samples (line 96) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class RTECharacters (line 109) | class RTECharacters(RTE): method vocab_type (line 113) | def vocab_type(self): method global_task_id (line 116) | def global_task_id(self): FILE: tensor2tensor/data_generators/scitail.py class SciTail (line 36) | class SciTail(text_problems.TextConcat2ClassProblem): method is_generate_per_split (line 44) | def is_generate_per_split(self): method dataset_splits (line 48) | def dataset_splits(self): method approx_vocab_size (line 58) | def approx_vocab_size(self): method num_classes (line 62) | def num_classes(self): method class_labels (line 65) | def class_labels(self, data_dir): method _maybe_download_corpora (line 70) | def _maybe_download_corpora(self, tmp_dir): method example_generator (line 82) | def example_generator(self, filename): method generate_samples (line 95) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class SciTailCharacters (line 108) | class SciTailCharacters(SciTail): method vocab_type (line 112) | def vocab_type(self): method global_task_id (line 115) | def global_task_id(self): class SciTailSharedVocab (line 120) | class SciTailSharedVocab(SciTail): method vocab_filename (line 124) | def vocab_filename(self): FILE: tensor2tensor/data_generators/seq2edits.py function pointer_top (line 33) | def pointer_top(body_output, targets, model_hparams, vocab_size): function pointer_bottom (line 39) | def pointer_bottom(x, model_hparams, vocab_size): class Seq2editsGec (line 46) | class Seq2editsGec(text_problems.Text2TextProblem): method dataset_filename (line 49) | def dataset_filename(self): method vocab_file (line 53) | def vocab_file(self): method vocab_filename (line 57) | def vocab_filename(self): method error_tag_vocab_file (line 61) | def error_tag_vocab_file(self): method feature_encoders (line 64) | def feature_encoders(self, data_dir): method hparams (line 75) | def hparams(self, defaults, model_hparams): method example_reading_spec (line 114) | def example_reading_spec(self): class Seq2editsGecPacked256 (line 123) | class Seq2editsGecPacked256(Seq2editsGec): method dataset_filename (line 126) | def dataset_filename(self): method packed_length (line 130) | def packed_length(self): method max_segment_length (line 134) | def max_segment_length(self): class Seq2editsGecNoTags (line 139) | class Seq2editsGecNoTags(Seq2editsGec): method dataset_filename (line 142) | def dataset_filename(self): method hparams (line 145) | def hparams(self, defaults, model_hparams): class Seq2editsGecNoTagsPacked256 (line 151) | class Seq2editsGecNoTagsPacked256(Seq2editsGecPacked256): method dataset_filename (line 154) | def dataset_filename(self): method hparams (line 157) | def hparams(self, defaults, model_hparams): class Seq2editsGecDeep (line 163) | class Seq2editsGecDeep(Seq2editsGec): method hparams (line 166) | def hparams(self, defaults, model_hparams): class Seq2editsGecDeepPacked256 (line 172) | class Seq2editsGecDeepPacked256(Seq2editsGecPacked256): method hparams (line 175) | def hparams(self, defaults, model_hparams): class Seq2editsGecDeepNoTags (line 181) | class Seq2editsGecDeepNoTags(Seq2editsGec): method hparams (line 184) | def hparams(self, defaults, model_hparams): class Seq2editsGecDeepNoTagsPacked256 (line 191) | class Seq2editsGecDeepNoTagsPacked256(Seq2editsGecPacked256): method hparams (line 194) | def hparams(self, defaults, model_hparams): class Seq2editsTextnorm (line 202) | class Seq2editsTextnorm(Seq2editsGec): method dataset_filename (line 205) | def dataset_filename(self): method source_vocab_file (line 209) | def source_vocab_file(self): method target_vocab_file (line 213) | def target_vocab_file(self): method error_tag_vocab_file (line 217) | def error_tag_vocab_file(self): method feature_encoders (line 220) | def feature_encoders(self, data_dir): class Seq2editsTextnormPacked256 (line 235) | class Seq2editsTextnormPacked256(Seq2editsTextnorm): method dataset_filename (line 238) | def dataset_filename(self): method packed_length (line 242) | def packed_length(self): method max_segment_length (line 246) | def max_segment_length(self): class Seq2editsTextnormNoTags (line 251) | class Seq2editsTextnormNoTags(Seq2editsTextnorm): method hparams (line 254) | def hparams(self, defaults, model_hparams): class Seq2editsTextnormNoTagsPacked256 (line 260) | class Seq2editsTextnormNoTagsPacked256(Seq2editsTextnormPacked256): method hparams (line 263) | def hparams(self, defaults, model_hparams): FILE: tensor2tensor/data_generators/snli.py function _download_and_parse_dataset (line 51) | def _download_and_parse_dataset(tmp_dir, train): function _get_tokens_and_tags (line 63) | def _get_tokens_and_tags(parse_str): function _parse_dataset (line 76) | def _parse_dataset(file_path, tmp_dir, train): function _get_or_generate_vocab (line 131) | def _get_or_generate_vocab(tmp_dir, vocab_filename, vocab_size): function snli_token_generator (line 149) | def snli_token_generator(tmp_dir, train, vocab_size): FILE: tensor2tensor/data_generators/speech_recognition.py class ByteTextEncoderWithEos (line 35) | class ByteTextEncoderWithEos(text_encoder.ByteTextEncoder): method encode (line 38) | def encode(self, s): class SpeechRecognitionProblem (line 42) | class SpeechRecognitionProblem(problem.Problem): method hparams (line 45) | def hparams(self, defaults, model_hparams): method is_character_level (line 73) | def is_character_level(self): method input_space_id (line 77) | def input_space_id(self): method target_space_id (line 81) | def target_space_id(self): method feature_encoders (line 84) | def feature_encoders(self, _): method example_reading_spec (line 93) | def example_reading_spec(self): method preprocess_example (line 103) | def preprocess_example(self, example, mode, hparams): method eval_metrics (line 144) | def eval_metrics(self): FILE: tensor2tensor/data_generators/squad.py function _generate_examples (line 39) | def _generate_examples(tmp_dir, dataset_split): class SquadText2text (line 89) | class SquadText2text(text_problems.Text2TextProblem): method is_generate_per_split (line 93) | def is_generate_per_split(self): method generate_samples (line 96) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class SquadText2textMulti64kPacked1k (line 107) | class SquadText2textMulti64kPacked1k(SquadText2text): method packed_length (line 111) | def packed_length(self): method use_vocab_from_other_problem (line 115) | def use_vocab_from_other_problem(self): method num_training_examples (line 119) | def num_training_examples(self): class Squad (line 124) | class Squad(text_problems.QuestionAndContext2TextProblem): method dataset_splits (line 128) | def dataset_splits(self): method is_generate_per_split (line 138) | def is_generate_per_split(self): method generate_samples (line 141) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class SquadConcat (line 152) | class SquadConcat(Squad): method dataset_filename (line 155) | def dataset_filename(self): method preprocess_example (line 158) | def preprocess_example(self, example, unused_mode, unused_model_hparams): method hparams (line 165) | def hparams(self, defaults, unused_model_hparams): class SquadConcatMulti64k (line 174) | class SquadConcatMulti64k(SquadConcat): method dataset_splits (line 178) | def dataset_splits(self): method preprocess_example (line 187) | def preprocess_example(self, example, unused_mode, unused_model_hparams): method dataset_filename (line 195) | def dataset_filename(self): method use_vocab_from_other_problem (line 199) | def use_vocab_from_other_problem(self): class SquadConcatSharedVocab (line 204) | class SquadConcatSharedVocab(SquadConcatMulti64k): method dataset_filename (line 207) | def dataset_filename(self): method use_vocab_from_other_problem (line 211) | def use_vocab_from_other_problem(self): class SquadConcatPositioned (line 216) | class SquadConcatPositioned(SquadConcat): method generate_targets (line 219) | def generate_targets(self, targets, context): method generate_encoded_samples (line 231) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): FILE: tensor2tensor/data_generators/sst_binary.py class SentimentSSTBinary (line 35) | class SentimentSSTBinary(text_problems.Text2ClassProblem): method is_generate_per_split (line 45) | def is_generate_per_split(self): method dataset_splits (line 49) | def dataset_splits(self): method approx_vocab_size (line 59) | def approx_vocab_size(self): method num_classes (line 63) | def num_classes(self): method class_labels (line 66) | def class_labels(self, data_dir): method _maybe_download_corpora (line 71) | def _maybe_download_corpora(self, tmp_dir): method example_generator (line 83) | def example_generator(self, filename): method generate_samples (line 93) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class SentimentSSTBinaryCharacters (line 106) | class SentimentSSTBinaryCharacters(SentimentSSTBinary): method vocab_type (line 110) | def vocab_type(self): method global_task_id (line 113) | def global_task_id(self): FILE: tensor2tensor/data_generators/stanford_nli.py class StanfordNLI (line 37) | class StanfordNLI(text_problems.TextConcat2ClassProblem): method is_generate_per_split (line 44) | def is_generate_per_split(self): method dataset_splits (line 48) | def dataset_splits(self): method approx_vocab_size (line 58) | def approx_vocab_size(self): method num_classes (line 62) | def num_classes(self): method class_labels (line 65) | def class_labels(self, data_dir): method _maybe_download_corpora (line 70) | def _maybe_download_corpora(self, tmp_dir): method example_generator (line 82) | def example_generator(self, filename): method generate_samples (line 99) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class StanfordNLICharacters (line 112) | class StanfordNLICharacters(StanfordNLI): method vocab_type (line 116) | def vocab_type(self): method global_task_id (line 119) | def global_task_id(self): class StanfordNLISharedVocab (line 124) | class StanfordNLISharedVocab(StanfordNLI): method vocab_filename (line 128) | def vocab_filename(self): class StanfordNLIWikiLMSharedVocab (line 133) | class StanfordNLIWikiLMSharedVocab(StanfordNLI): method vocab_filename (line 137) | def vocab_filename(self): class StanfordNLIWikiLMSharedVocab64k (line 142) | class StanfordNLIWikiLMSharedVocab64k(StanfordNLIWikiLMSharedVocab): method vocab_filename (line 146) | def vocab_filename(self): FILE: tensor2tensor/data_generators/style_transfer.py class StyleTransferProblemShakespeare (line 57) | class StyleTransferProblemShakespeare(text_problems.Text2TextProblem): method target (line 61) | def target(self): method source (line 65) | def source(self): method dataset_url (line 68) | def dataset_url(self, dataset_split): method vocab_data_files (line 74) | def vocab_data_files(self): method approx_vocab_size (line 79) | def approx_vocab_size(self): method dataset_splits (line 83) | def dataset_splits(self): method is_generate_per_split (line 94) | def is_generate_per_split(self): method generate_samples (line 97) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method source_target_paths (line 118) | def source_target_paths(self, dataset_split, tmp_dir): class StyleTransferShakespeareToModern (line 126) | class StyleTransferShakespeareToModern(StyleTransferProblemShakespeare): method target (line 130) | def target(self): method source (line 134) | def source(self): class StyleTransferModernToShakespeare (line 139) | class StyleTransferModernToShakespeare(StyleTransferProblemShakespeare): method target (line 143) | def target(self): method source (line 147) | def source(self): class StyleTransferShakespeareToModernCharacters (line 152) | class StyleTransferShakespeareToModernCharacters( method vocab_type (line 156) | def vocab_type(self): class StyleTransferModernToShakespeareCharacters (line 161) | class StyleTransferModernToShakespeareCharacters( method vocab_type (line 165) | def vocab_type(self): FILE: tensor2tensor/data_generators/style_transfer_test.py class StyleTransferProblemShakespeareTest (line 27) | class StyleTransferProblemShakespeareTest(tf.test.TestCase): method testSourceAndTargetPathsTrainModern2Shakespeare (line 29) | def testSourceAndTargetPathsTrainModern2Shakespeare(self): method testSourceAndTargetPathsTrainShakespeare2Modern (line 43) | def testSourceAndTargetPathsTrainShakespeare2Modern(self): method testSourceAndTargetPathsDevModern2Shakespeare (line 57) | def testSourceAndTargetPathsDevModern2Shakespeare(self): method testSourceAndTargetPathsDevShakespeare2Modern (line 71) | def testSourceAndTargetPathsDevShakespeare2Modern(self): FILE: tensor2tensor/data_generators/subject_verb_agreement.py function _build_vocab (line 50) | def _build_vocab(examples, example_field, vocab_dir, vocab_name): function load_examples (line 77) | def load_examples(tmp_dir, prop_train=0.09, prop_val=0.01): class SvaNumberPrediction (line 115) | class SvaNumberPrediction(text_problems.Text2ClassProblem): method is_generate_per_split (line 119) | def is_generate_per_split(self): method dataset_splits (line 124) | def dataset_splits(self): method train_proportion (line 145) | def train_proportion(self): method validation_proportion (line 150) | def validation_proportion(self): method vocab_type (line 155) | def vocab_type(self): method num_classes (line 159) | def num_classes(self): method class_labels (line 162) | def class_labels(self, data_dir): method generate_samples (line 167) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method eval_metrics (line 209) | def eval_metrics(self): class SvaLanguageModeling (line 220) | class SvaLanguageModeling(text_problems.Text2SelfProblem): method is_generate_per_split (line 224) | def is_generate_per_split(self): method dataset_splits (line 229) | def dataset_splits(self): method train_proportion (line 250) | def train_proportion(self): method validation_proportion (line 255) | def validation_proportion(self): method vocab_type (line 260) | def vocab_type(self): method generate_samples (line 263) | def generate_samples(self, data_dir, tmp_dir, dataset_split): FILE: tensor2tensor/data_generators/text_encoder.py function native_to_unicode (line 62) | def native_to_unicode(s): function unicode_to_native (line 73) | def unicode_to_native(s): function is_unicode (line 80) | def is_unicode(s): function to_unicode (line 84) | def to_unicode(s, ignore_errors=False): function to_unicode_ignore_errors (line 91) | def to_unicode_ignore_errors(s): function to_unicode_utf8 (line 95) | def to_unicode_utf8(s): function strip_ids (line 99) | def strip_ids(ids, ids_to_strip): class TextEncoder (line 107) | class TextEncoder(object): method __init__ (line 110) | def __init__(self, num_reserved_ids=NUM_RESERVED_TOKENS): method num_reserved_ids (line 114) | def num_reserved_ids(self): method encode (line 117) | def encode(self, s): method decode (line 133) | def decode(self, ids, strip_extraneous=False): method decode_list (line 150) | def decode_list(self, ids): method vocab_size (line 172) | def vocab_size(self): class ByteTextEncoder (line 176) | class ByteTextEncoder(TextEncoder): method encode (line 179) | def encode(self, s): method decode (line 188) | def decode(self, ids, strip_extraneous=False): method decode_list (line 204) | def decode_list(self, ids): method vocab_size (line 217) | def vocab_size(self): class ClassLabelEncoder (line 221) | class ClassLabelEncoder(TextEncoder): method __init__ (line 224) | def __init__(self, class_labels=None, class_labels_fname=None): method encode (line 234) | def encode(self, s): method decode (line 238) | def decode(self, ids, strip_extraneous=False): method decode_list (line 248) | def decode_list(self, ids): method vocab_size (line 252) | def vocab_size(self): class OneHotClassLabelEncoder (line 256) | class OneHotClassLabelEncoder(ClassLabelEncoder): method encode (line 259) | def encode(self, label_str, on_value=1, off_value=0): # pylint: disab... method decode (line 264) | def decode(self, ids, strip_extraneous=False): method vocab_size (line 274) | def vocab_size(self): class TokenTextEncoder (line 278) | class TokenTextEncoder(TextEncoder): method __init__ (line 281) | def __init__(self, method encode (line 314) | def encode(self, s): method decode (line 324) | def decode(self, ids, strip_extraneous=False): method decode_list (line 327) | def decode_list(self, ids): method vocab_size (line 332) | def vocab_size(self): method _safe_id_to_token (line 335) | def _safe_id_to_token(self, idx): method _init_vocab_from_file (line 338) | def _init_vocab_from_file(self, filename): method _init_vocab_from_list (line 353) | def _init_vocab_from_list(self, vocab_list): method _init_vocab (line 369) | def _init_vocab(self, token_generator, add_reserved_tokens=True): method store_to_file (line 386) | def store_to_file(self, filename): function _escape_token (line 400) | def _escape_token(token, alphabet): function _unescape_token (line 425) | def _unescape_token(escaped_token): class SubwordTextEncoder (line 448) | class SubwordTextEncoder(TextEncoder): method __init__ (line 481) | def __init__(self, filename=None): method encode (line 494) | def encode(self, s): method encode_without_tokenizing (line 505) | def encode_without_tokenizing(self, token_text): method decode (line 522) | def decode(self, ids, strip_extraneous=False): method decode_list (line 538) | def decode_list(self, ids): method vocab_size (line 542) | def vocab_size(self): method _tokens_to_subtoken_ids (line 546) | def _tokens_to_subtoken_ids(self, tokens): method _token_to_subtoken_ids (line 559) | def _token_to_subtoken_ids(self, token): method _subtoken_ids_to_tokens (line 576) | def _subtoken_ids_to_tokens(self, subtokens): method _subtoken_id_to_subtoken_string (line 595) | def _subtoken_id_to_subtoken_string(self, subtoken): method _escaped_token_to_subtoken_strings (line 601) | def _escaped_token_to_subtoken_strings(self, escaped_token): method _escaped_token_to_subtoken_ids (line 633) | def _escaped_token_to_subtoken_ids(self, escaped_token): method build_from_generator (line 647) | def build_from_generator(cls, method build_to_target_size (line 679) | def build_to_target_size(cls, method build_from_token_counts (line 752) | def build_from_token_counts(self, method all_subtoken_strings (line 871) | def all_subtoken_strings(self): method dump (line 874) | def dump(self): method _init_subtokens_from_list (line 881) | def _init_subtokens_from_list(self, subtoken_strings, reserved_tokens=... method _init_alphabet_from_tokens (line 914) | def _init_alphabet_from_tokens(self, tokens): method _load_from_file_object (line 921) | def _load_from_file_object(self, f): method _load_from_file (line 938) | def _load_from_file(self, filename): method store_to_file (line 945) | def store_to_file(self, filename, add_single_quotes=True): class ImageEncoder (line 954) | class ImageEncoder(object): method __init__ (line 957) | def __init__(self, num_reserved_ids=0, height=None, width=None, channe... method num_reserved_ids (line 964) | def num_reserved_ids(self): method encode (line 967) | def encode(self, s): method decode (line 984) | def decode(self, ids, strip_extraneous=False): method decode_list (line 1022) | def decode_list(self, ids): method vocab_size (line 1034) | def vocab_size(self): class RealEncoder (line 1038) | class RealEncoder(object): method encode (line 1041) | def encode(self, s): method decode (line 1052) | def decode(self, ids, strip_extraneous=False): FILE: tensor2tensor/data_generators/text_encoder_build_subword.py function main (line 53) | def main(unused_argv): FILE: tensor2tensor/data_generators/text_encoder_test.py class NativeToUnicodeTest (line 38) | class NativeToUnicodeTest(tf.test.TestCase): method test_native_to_unicode (line 40) | def test_native_to_unicode(self): class EscapeUnescapeTokenTest (line 48) | class EscapeUnescapeTokenTest(tf.test.TestCase): method test_escape_token (line 50) | def test_escape_token(self): method test_unescape_token (line 58) | def test_unescape_token(self): class TokenTextEncoderTest (line 66) | class TokenTextEncoderTest(tf.test.TestCase): method setUpClass (line 69) | def setUpClass(cls): method test_save_and_reload (line 75) | def test_save_and_reload(self): method test_reserved_tokens_in_corpus (line 95) | def test_reserved_tokens_in_corpus(self): class SubwordTextEncoderTest (line 110) | class SubwordTextEncoderTest(tf.test.TestCase): method setUpClass (line 113) | def setUpClass(cls): method test_encode_decode (line 119) | def test_encode_decode(self): method test_unicode (line 153) | def test_unicode(self): method test_small_vocab (line 163) | def test_small_vocab(self): method test_long_tokens (line 178) | def test_long_tokens(self): method test_custom_reserved_tokens (line 213) | def test_custom_reserved_tokens(self): method test_encodable_when_not_in_alphabet (line 233) | def test_encodable_when_not_in_alphabet(self): method test_raises_exception_when_not_encodable (line 251) | def test_raises_exception_when_not_encodable(self): method test_load_from_file (line 265) | def test_load_from_file(self): method test_reserved_token_chars_not_in_alphabet (line 283) | def test_reserved_token_chars_not_in_alphabet(self): method test_save_and_reload (line 300) | def test_save_and_reload(self): method test_save_and_reload_no_single_quotes (line 320) | def test_save_and_reload_no_single_quotes(self): method test_build_from_generator (line 340) | def test_build_from_generator(self): class OneHotClassLabelEncoderTest (line 367) | class OneHotClassLabelEncoderTest(tf.test.TestCase): method test_one_hot_encode (line 369) | def test_one_hot_encode(self): method test_one_hot_decode (line 376) | def test_one_hot_decode(self): FILE: tensor2tensor/data_generators/text_problems.py class VocabType (line 46) | class VocabType(object): class Text2TextProblem (line 53) | class Text2TextProblem(problem.Problem): method dataset_splits (line 63) | def dataset_splits(self): method is_generate_per_split (line 74) | def is_generate_per_split(self): method generate_samples (line 91) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method vocab_type (line 115) | def vocab_type(self): method approx_vocab_size (line 136) | def approx_vocab_size(self): method additional_reserved_tokens (line 141) | def additional_reserved_tokens(self): method oov_token (line 151) | def oov_token(self): method max_samples_for_vocab (line 156) | def max_samples_for_vocab(self): method packed_length (line 169) | def packed_length(self): method packed_spacing (line 181) | def packed_spacing(self): method has_inputs (line 192) | def has_inputs(self): method max_length (line 195) | def max_length(self, model_hparams): method feature_encoders (line 199) | def feature_encoders(self, data_dir): method generate_text_for_vocab (line 206) | def generate_text_for_vocab(self, data_dir, tmp_dir): method vocab_filename (line 216) | def vocab_filename(self): method use_vocab_from_other_problem (line 228) | def use_vocab_from_other_problem(self): method get_or_create_vocab (line 239) | def get_or_create_vocab(self, data_dir, tmp_dir, force_get=False): method _pack_fn (line 265) | def _pack_fn(self): method _maybe_pack_examples (line 291) | def _maybe_pack_examples(self, generator): method generate_encoded_samples (line 302) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): method max_subtoken_length (line 316) | def max_subtoken_length(self): method batch_size_means_tokens (line 328) | def batch_size_means_tokens(self): method already_shuffled (line 332) | def already_shuffled(self): method inputs_prefix (line 336) | def inputs_prefix(self): method targets_prefix (line 341) | def targets_prefix(self): method generate_data (line 345) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method hparams (line 371) | def hparams(self, defaults, unused_model_hparams): method example_reading_spec (line 394) | def example_reading_spec(self): method eval_metrics (line 409) | def eval_metrics(self): class QuestionAndContext2TextProblem (line 418) | class QuestionAndContext2TextProblem(Text2TextProblem): method additional_reserved_tokens (line 428) | def additional_reserved_tokens(self): method feature_encoders (line 431) | def feature_encoders(self, data_dir): method generate_text_for_vocab (line 437) | def generate_text_for_vocab(self, data_dir, tmp_dir): method generate_encoded_samples (line 446) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): method hparams (line 457) | def hparams(self, defaults, unused_model_hparams): method example_reading_spec (line 467) | def example_reading_spec(self): class Text2SelfProblem (line 475) | class Text2SelfProblem(Text2TextProblem): method generate_samples (line 481) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method has_inputs (line 500) | def has_inputs(self): class Text2ClassProblem (line 504) | class Text2ClassProblem(Text2TextProblem): method generate_samples (line 507) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method num_classes (line 528) | def num_classes(self): method class_labels (line 532) | def class_labels(self, data_dir): method generate_text_for_vocab (line 539) | def generate_text_for_vocab(self, data_dir, tmp_dir): method generate_encoded_samples (line 546) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): method feature_encoders (line 555) | def feature_encoders(self, data_dir): method hparams (line 563) | def hparams(self, defaults, unused_model_hparams): method example_reading_spec (line 570) | def example_reading_spec(self): class TextConcat2ClassProblem (line 579) | class TextConcat2ClassProblem(Text2ClassProblem): method generate_text_for_vocab (line 587) | def generate_text_for_vocab(self, data_dir, tmp_dir): method generate_encoded_samples (line 595) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): class Text2RealProblem (line 609) | class Text2RealProblem(Text2TextProblem): method ntasks (line 618) | def ntasks(self): method generate_samples (line 622) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method generate_text_for_vocab (line 639) | def generate_text_for_vocab(self, data_dir, tmp_dir): method generate_encoded_samples (line 646) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): method feature_encoders (line 654) | def feature_encoders(self, data_dir): method hparams (line 662) | def hparams(self, defaults, unused_model_hparams): method max_length (line 675) | def max_length(self, model_hparams): method preprocess_example (line 678) | def preprocess_example(self, example, unused_mode, unused_hparams): method example_reading_spec (line 684) | def example_reading_spec(self): method eval_metrics (line 692) | def eval_metrics(self): function txt_line_iterator (line 699) | def txt_line_iterator(txt_path): function txt_and_label_iterator (line 706) | def txt_and_label_iterator(txt_path): function text2text_txt_iterator (line 724) | def text2text_txt_iterator(source_txt_path, target_txt_path): function text2text_txt_iterator_with_label (line 731) | def text2text_txt_iterator_with_label(source_txt_path, target_txt_path): function text2text_txt_iterator_with_index (line 739) | def text2text_txt_iterator_with_index(source_txt_path, target_txt_path): function text2text_distill_iterator (line 747) | def text2text_distill_iterator(source_txt_path, target_txt_path, function text2self_txt_iterator (line 756) | def text2self_txt_iterator(txt_path): function text2class_txt_iterator (line 761) | def text2class_txt_iterator(source_txt_path, label_txt_path, class_strs=... function text2real_txt_iterator (line 786) | def text2real_txt_iterator(source_txt_path, target_txt_path): function txt_line_sharded_iterator (line 802) | def txt_line_sharded_iterator(txt_pattern): function text2text_txt_sharded_iterator (line 811) | def text2text_txt_sharded_iterator(source_txt_pattern, target_txt_pattern): function text2text_txt_tab_iterator (line 828) | def text2text_txt_tab_iterator(txt_path): function text2text_generate_encoded (line 849) | def text2text_generate_encoded(sample_generator, class Text2textTmpdir (line 867) | class Text2textTmpdir(Text2TextProblem): method is_generate_per_split (line 882) | def is_generate_per_split(self): method generate_samples (line 885) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method _tmp_dir_override (line 894) | def _tmp_dir_override(self): class Text2TextRemotedir (line 898) | class Text2TextRemotedir(Text2textTmpdir): method _tmp_dir_override (line 914) | def _tmp_dir_override(self): class Text2textTmpdirTokens (line 920) | class Text2textTmpdirTokens(Text2textTmpdir): method vocab_type (line 935) | def vocab_type(self): method oov_token (line 939) | def oov_token(self): method _generate_vocab (line 942) | def _generate_vocab(self, tmp_dir): method generate_samples (line 952) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class ChoppedTextProblem (line 962) | class ChoppedTextProblem(Text2SelfProblem): method train_text_filepaths (line 972) | def train_text_filepaths(self, tmp_dir): method dev_text_filepaths (line 984) | def dev_text_filepaths(self, tmp_dir): method sequence_length (line 997) | def sequence_length(self): method max_length (line 1001) | def max_length(self, model_hparams): method text_filepaths_for_task (line 1004) | def text_filepaths_for_task(self, tmp_dir, task_id): method filepath_to_unicode_strings (line 1026) | def filepath_to_unicode_strings(self, filepath): method file_generator (line 1044) | def file_generator(self, method example_generator (line 1084) | def example_generator(self, encoder, tmp_dir, task_id): method remainder_policy (line 1119) | def remainder_policy(self): method prepare_to_generate (line 1127) | def prepare_to_generate(self, data_dir, tmp_dir): method generate_text_for_vocab (line 1133) | def generate_text_for_vocab(self, data_dir, tmp_dir): method generate_data (line 1138) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method max_chars_for_vocab (line 1163) | def max_chars_for_vocab(self): method num_train_shards (line 1168) | def num_train_shards(self): method num_dev_shards (line 1172) | def num_dev_shards(self): method max_dev_chars (line 1176) | def max_dev_chars(self): method multiprocess_generate (line 1181) | def multiprocess_generate(self): method num_generate_tasks (line 1185) | def num_generate_tasks(self): method eval_metrics (line 1188) | def eval_metrics(self): class DistributedText2TextProblem (line 1192) | class DistributedText2TextProblem(Text2TextProblem): method generate_samples (line 1212) | def generate_samples(self, data_dir, tmp_dir, dataset_split, input_fil... method input_files (line 1231) | def input_files(self, dataset_split=problem.DatasetSplit.TRAIN): method num_output_shards (line 1249) | def num_output_shards(self): method split_to_input_filenames (line 1257) | def split_to_input_filenames(self): method _task_id_to_output_split (line 1280) | def _task_id_to_output_split(self, task_id): method _task_id_to_output_file (line 1291) | def _task_id_to_output_file(self, data_dir, task_id): method _divide_equally (line 1305) | def _divide_equally(input_files, num_tasks, task_id): method _task_id_to_input_files (line 1326) | def _task_id_to_input_files(self, task_id): method generate_text_for_vocab (line 1341) | def generate_text_for_vocab(self, data_dir, tmp_dir): method generate_encoded_samples (line 1369) | def generate_encoded_samples(self, method generate_data (line 1389) | def generate_data(self, data_dir, tmp_dir, task_id=-1): FILE: tensor2tensor/data_generators/text_problems_test.py class Test1 (line 32) | class Test1(text_problems.Text2textTmpdir): method name (line 35) | def name(self): method approx_vocab_size (line 42) | def approx_vocab_size(self): method dataset_splits (line 46) | def dataset_splits(self): class TextProblems (line 56) | class TextProblems(tf.test.TestCase): method setUpClass (line 59) | def setUpClass(cls): method testTxtLineIterator (line 104) | def testTxtLineIterator(self): method testText2TextTxtIterator (line 108) | def testText2TextTxtIterator(self): method testText2SelfTxtIterator (line 118) | def testText2SelfTxtIterator(self): method testText2ClassTxtIterator (line 125) | def testText2ClassTxtIterator(self): method testText2ClassTxtIteratorWithStrs (line 135) | def testText2ClassTxtIteratorWithStrs(self): method testText2RealTxtIterator (line 146) | def testText2RealTxtIterator(self): method testText2TextTxtTabIterator (line 156) | def testText2TextTxtTabIterator(self): method testText2TextTmpDir (line 165) | def testText2TextTmpDir(self): class FakeDistributedProblem (line 204) | class FakeDistributedProblem(text_problems.DistributedText2TextProblem): method __init__ (line 206) | def __init__(self): method generate_samples (line 211) | def generate_samples(self, data_dir, tmp_dir, dataset_split, input_fil... method is_generate_per_split (line 220) | def is_generate_per_split(self): method dataset_splits (line 224) | def dataset_splits(self): method input_files (line 236) | def input_files(self, dataset_split=problem_lib.DatasetSplit.TRAIN): method setup_for_test (line 244) | def setup_for_test(cls): class FakeDistributedProblemNotPerSplit (line 269) | class FakeDistributedProblemNotPerSplit(FakeDistributedProblem): method is_generate_per_split (line 272) | def is_generate_per_split(self): class DistributedText2TextProblemsTest (line 276) | class DistributedText2TextProblemsTest(tf.test.TestCase): method setUp (line 278) | def setUp(self): method testOutputSharding (line 281) | def testOutputSharding(self): method testInputShardingNoGeneratePerSplit (line 326) | def testInputShardingNoGeneratePerSplit(self): method testInputShardingWithGeneratePerSplit (line 357) | def testInputShardingWithGeneratePerSplit(self): method testVocabularyIsAllTrain (line 400) | def testVocabularyIsAllTrain(self): FILE: tensor2tensor/data_generators/timeseries.py class TimeseriesProblem (line 33) | class TimeseriesProblem(problem.Problem): method feature_encoders (line 36) | def feature_encoders(self, data_dir): method is_generate_per_split (line 44) | def is_generate_per_split(self): method dataset_splits (line 49) | def dataset_splits(self): method has_inputs (line 63) | def has_inputs(self): method num_train_shards (line 67) | def num_train_shards(self): method num_eval_shards (line 72) | def num_eval_shards(self): method num_test_shards (line 77) | def num_test_shards(self): method num_series (line 82) | def num_series(self): method num_input_timestamps (line 87) | def num_input_timestamps(self): method num_target_timestamps (line 92) | def num_target_timestamps(self): method timeseries_dataset (line 96) | def timeseries_dataset(self): method eval_metrics (line 100) | def eval_metrics(self): method normalizing_constant (line 105) | def normalizing_constant(self): method preprocess_example (line 109) | def preprocess_example(self, example, unused_mode, unused_hparams): method generate_samples (line 124) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method hparams (line 152) | def hparams(self, defaults, unused_model_hparams): method generate_data (line 161) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method example_reading_spec (line 187) | def example_reading_spec(self): class TimeseriesToyProblem (line 197) | class TimeseriesToyProblem(TimeseriesProblem): method num_train_shards (line 201) | def num_train_shards(self): method num_eval_shards (line 206) | def num_eval_shards(self): method num_test_shards (line 211) | def num_test_shards(self): method num_series (line 216) | def num_series(self): method num_input_timestamps (line 221) | def num_input_timestamps(self): method num_target_timestamps (line 226) | def num_target_timestamps(self): method timeseries_dataset (line 230) | def timeseries_dataset(self): class TimeseriesToyProblemNoInputs (line 237) | class TimeseriesToyProblemNoInputs(TimeseriesToyProblem): method has_inputs (line 241) | def has_inputs(self): method num_input_timestamps (line 245) | def num_input_timestamps(self): class TimeseriesSyntheticDataSeries10Samples100k (line 251) | class TimeseriesSyntheticDataSeries10Samples100k(TimeseriesProblem): method num_train_shards (line 255) | def num_train_shards(self): method num_eval_shards (line 260) | def num_eval_shards(self): method num_series (line 265) | def num_series(self): method num_input_timestamps (line 270) | def num_input_timestamps(self): method num_target_timestamps (line 275) | def num_target_timestamps(self): method normalizing_constant (line 280) | def normalizing_constant(self): method timeseries_params (line 284) | def timeseries_params(self): method timeseries_dataset (line 360) | def timeseries_dataset(self): FILE: tensor2tensor/data_generators/timeseries_data_generator.py function generate_data (line 24) | def generate_data(timeseries_length, timeseries_params): FILE: tensor2tensor/data_generators/timeseries_data_generator_test.py class TimeseriesDataGeneratorTest (line 29) | class TimeseriesDataGeneratorTest(tf.test.TestCase): method testGenerateData (line 31) | def testGenerateData(self): FILE: tensor2tensor/data_generators/timeseries_test.py class TimeseriesTest (line 31) | class TimeseriesTest(tf.test.TestCase): method setUpClass (line 34) | def setUpClass(cls): method testTimeseriesToyProblem (line 39) | def testTimeseriesToyProblem(self): method testTimeseriesToyProblemNoInputs (line 65) | def testTimeseriesToyProblemNoInputs(self): method testTimeseriesSyntheticData10Series100kSamples (line 89) | def testTimeseriesSyntheticData10Series100kSamples(self): FILE: tensor2tensor/data_generators/tokenizer.py function encode (line 66) | def encode(text): function decode (line 91) | def decode(tokens): function _read_filepattern (line 108) | def _read_filepattern(filepattern, max_lines=None, split_on_newlines=True): function corpus_token_counts (line 148) | def corpus_token_counts( function vocab_token_counts (line 174) | def vocab_token_counts(text_filepattern, max_lines): FILE: tensor2tensor/data_generators/tokenizer_test.py class TokenizerTest (line 35) | class TokenizerTest(tf.test.TestCase): method test_encode (line 37) | def test_encode(self): method test_decode (line 49) | def test_decode(self): method test_invertibility_on_random_strings (line 55) | def test_invertibility_on_random_strings(self): class TestTokenCounts (line 61) | class TestTokenCounts(tf.test.TestCase): method setUp (line 63) | def setUp(self): method test_corpus_token_counts_split_on_newlines (line 68) | def test_corpus_token_counts_split_on_newlines(self): method test_corpus_token_counts_no_split_on_newlines (line 90) | def test_corpus_token_counts_no_split_on_newlines(self): method test_corpus_token_counts_split_with_max_lines (line 96) | def test_corpus_token_counts_split_with_max_lines(self): method test_corpus_token_counts_no_split_with_max_lines (line 103) | def test_corpus_token_counts_no_split_with_max_lines(self): method test_vocab_token_counts (line 115) | def test_vocab_token_counts(self): method test_vocab_token_counts_with_max_lines (line 127) | def test_vocab_token_counts_with_max_lines(self): FILE: tensor2tensor/data_generators/transduction_problems.py class TransductionProblem (line 49) | class TransductionProblem(text_problems.Text2TextProblem): method __init__ (line 53) | def __init__(self, was_reversed=False, was_copy=False): method num_symbols (line 59) | def num_symbols(self): method min_sequence_length (line 63) | def min_sequence_length(self, dataset_split): method max_sequence_length (line 78) | def max_sequence_length(self, dataset_split): method num_samples (line 93) | def num_samples(self, dataset_split): method num_shards (line 109) | def num_shards(self): method is_generate_per_split (line 114) | def is_generate_per_split(self): method vocab_type (line 118) | def vocab_type(self): method sequence_length (line 121) | def sequence_length(self, dataset_split): method build_vocab (line 125) | def build_vocab(self): method get_or_create_vocab (line 128) | def get_or_create_vocab(self, data_dir, tmp_dir, force_get=False): method generate_random_sequence (line 139) | def generate_random_sequence(self, dataset_split): method transpose_sequence (line 143) | def transpose_sequence(self, input_sequence): method generate_samples (line 146) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class CopySequence (line 157) | class CopySequence(TransductionProblem): method transpose_sequence (line 160) | def transpose_sequence(self, input_sequence): class CopySequenceSmall (line 165) | class CopySequenceSmall(CopySequence): method num_symbols (line 170) | def num_symbols(self): method min_sequence_length (line 173) | def min_sequence_length(self, dataset_split): method max_sequence_length (line 180) | def max_sequence_length(self, dataset_split): method num_samples (line 187) | def num_samples(self, dataset_split): class ReverseSequence (line 196) | class ReverseSequence(TransductionProblem): method transpose_sequence (line 200) | def transpose_sequence(self, input_sequence): class ReverseSequenceSmall (line 205) | class ReverseSequenceSmall(ReverseSequence): method num_symbols (line 210) | def num_symbols(self): method min_sequence_length (line 213) | def min_sequence_length(self, dataset_split): method max_sequence_length (line 220) | def max_sequence_length(self, dataset_split): method num_samples (line 227) | def num_samples(self, dataset_split): class FlipBiGramSequence (line 236) | class FlipBiGramSequence(TransductionProblem): method sequence_length (line 240) | def sequence_length(self, dataset_split): method transpose_sequence (line 258) | def transpose_sequence(self, input_sequence): FILE: tensor2tensor/data_generators/transduction_problems_test.py class TransductionProblem (line 35) | class TransductionProblem(parameterized.TestCase): method setUp (line 37) | def setUp(self): method tearDown (line 42) | def tearDown(self): method testTransduction (line 64) | def testTransduction(self, p, transformation): FILE: tensor2tensor/data_generators/translate.py class TranslateProblem (line 38) | class TranslateProblem(text_problems.Text2TextProblem): method is_generate_per_split (line 42) | def is_generate_per_split(self): method approx_vocab_size (line 46) | def approx_vocab_size(self): method datatypes_to_clean (line 50) | def datatypes_to_clean(self): method source_data_files (line 53) | def source_data_files(self, dataset_split): method vocab_data_files (line 57) | def vocab_data_files(self): method generate_samples (line 61) | def generate_samples( method generate_text_for_vocab (line 79) | def generate_text_for_vocab(self, data_dir, tmp_dir): method decode_hooks (line 84) | def decode_hooks(self): function compute_bleu_summaries (line 88) | def compute_bleu_summaries(hook_args): function _preprocess_sgm (line 126) | def _preprocess_sgm(line, is_sgm): function _clean_sentences (line 144) | def _clean_sentences(sentence_pairs): function _tmx_to_source_target (line 151) | def _tmx_to_source_target(tmx_file, source_resfile, target_resfile, function compile_data (line 163) | def compile_data(tmp_dir, datasets, filename, datatypes_to_clean=None): class TranslateDistillProblem (line 266) | class TranslateDistillProblem(TranslateProblem): method is_generate_per_split (line 270) | def is_generate_per_split(self): method example_reading_spec (line 273) | def example_reading_spec(self): method get_or_create_vocab (line 287) | def get_or_create_vocab(self, data_dir, tmp_dir, force_get=False): method generate_encoded_samples (line 295) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): method generate_samples (line 309) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class TranslateWmt20Problem (line 317) | class TranslateWmt20Problem(TranslateProblem): method is_generate_per_split (line 321) | def is_generate_per_split(self): method generate_encoded_samples (line 324) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): method generate_text_for_vocab (line 336) | def generate_text_for_vocab(self, data_dir, tmp_dir): method generate_samples (line 345) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class TranslateSamanantarProblem (line 350) | class TranslateSamanantarProblem(TranslateWmt20Problem): method generate_samples (line 353) | def generate_samples(self, data_dir, tmp_dir, dataset_split): FILE: tensor2tensor/data_generators/translate_encs.py class TranslateEncsWmt32k (line 58) | class TranslateEncsWmt32k(translate.TranslateProblem): method approx_vocab_size (line 62) | def approx_vocab_size(self): method source_data_files (line 65) | def source_data_files(self, dataset_split): method vocab_data_files (line 69) | def vocab_data_files(self): class TranslateEncsWmtCharacters (line 85) | class TranslateEncsWmtCharacters(translate.TranslateProblem): method vocab_type (line 89) | def vocab_type(self): method generate_samples (line 92) | def generate_samples(self, data_dir, tmp_dir, dataset_split): FILE: tensor2tensor/data_generators/translate_encs_cubbitt.py class TranslateEncsCubbitt (line 46) | class TranslateEncsCubbitt(translate_encs.TranslateEncsWmt32k): method use_vocab_from_other_problem (line 50) | def use_vocab_from_other_problem(self): method already_shuffled (line 54) | def already_shuffled(self): method skip_random_fraction_when_training (line 58) | def skip_random_fraction_when_training(self): method backtranslate_data_filenames (line 62) | def backtranslate_data_filenames(self): method dataset_splits (line 68) | def dataset_splits(self): method generate_samples (line 78) | def generate_samples(self, data_dir, tmp_dir, dataset_split): FILE: tensor2tensor/data_generators/translate_ende.py class TranslateEndeWmt32k (line 70) | class TranslateEndeWmt32k(translate.TranslateProblem): method additional_training_datasets (line 74) | def additional_training_datasets(self): method source_data_files (line 78) | def source_data_files(self, dataset_split): class TranslateEnde2018Wmt32k (line 85) | class TranslateEnde2018Wmt32k(translate.TranslateProblem): method use_vocab_from_other_problem (line 89) | def use_vocab_from_other_problem(self): method additional_training_datasets (line 93) | def additional_training_datasets(self): class TranslateEndeWmtClean32k (line 99) | class TranslateEndeWmtClean32k(TranslateEndeWmt32k): method use_vocab_from_other_problem (line 103) | def use_vocab_from_other_problem(self): method datatypes_to_clean (line 107) | def datatypes_to_clean(self): class TranslateEndePc32k (line 112) | class TranslateEndePc32k(translate.TranslateProblem): method use_vocab_from_other_problem (line 116) | def use_vocab_from_other_problem(self): method additional_training_datasets (line 120) | def additional_training_datasets(self): method source_data_files (line 124) | def source_data_files(self, dataset_split): class TranslateEndePcClean32k (line 132) | class TranslateEndePcClean32k(TranslateEndePc32k): method datatypes_to_clean (line 136) | def datatypes_to_clean(self): class TranslateEndeWmtPc32k (line 141) | class TranslateEndeWmtPc32k(TranslateEndeWmt32k): method use_vocab_from_other_problem (line 145) | def use_vocab_from_other_problem(self): method additional_training_datasets (line 149) | def additional_training_datasets(self): class TranslateEndeWmtCleanPc32k (line 154) | class TranslateEndeWmtCleanPc32k(TranslateEndeWmtPc32k): method datatypes_to_clean (line 158) | def datatypes_to_clean(self): class TranslateEndeWmtPcClean32k (line 163) | class TranslateEndeWmtPcClean32k(TranslateEndeWmtPc32k): method datatypes_to_clean (line 167) | def datatypes_to_clean(self): class TranslateEndeWmtCleanPcClean32k (line 172) | class TranslateEndeWmtCleanPcClean32k(TranslateEndeWmtPcClean32k): method datatypes_to_clean (line 176) | def datatypes_to_clean(self): class TranslateEndeWmt32kPacked (line 181) | class TranslateEndeWmt32kPacked(TranslateEndeWmt32k): method packed_length (line 184) | def packed_length(self): method use_vocab_from_other_problem (line 188) | def use_vocab_from_other_problem(self): class TranslateEndeWmt8k (line 193) | class TranslateEndeWmt8k(TranslateEndeWmt32k): method approx_vocab_size (line 197) | def approx_vocab_size(self): class TranslateEndeWmt8kPacked (line 202) | class TranslateEndeWmt8kPacked(TranslateEndeWmt8k): method packed_length (line 205) | def packed_length(self): method use_vocab_from_other_problem (line 209) | def use_vocab_from_other_problem(self): class TranslateEndeWmtCharacters (line 214) | class TranslateEndeWmtCharacters(TranslateEndeWmt8k): method vocab_type (line 218) | def vocab_type(self): class TranslateEndeWmtMulti64k (line 223) | class TranslateEndeWmtMulti64k(TranslateEndeWmt8k): method use_vocab_from_other_problem (line 227) | def use_vocab_from_other_problem(self): class TranslateEndeWmtMulti64kPacked1k (line 232) | class TranslateEndeWmtMulti64kPacked1k(TranslateEndeWmtMulti64k): method packed_length (line 236) | def packed_length(self): method num_training_examples (line 240) | def num_training_examples(self): method inputs_prefix (line 244) | def inputs_prefix(self): method targets_prefix (line 248) | def targets_prefix(self): FILE: tensor2tensor/data_generators/translate_ende_test.py class TranslateEndeTest (line 28) | class TranslateEndeTest(tf.test.TestCase): method test_vocab_size (line 31) | def test_vocab_size(self): method test_additional_datasets (line 37) | def test_additional_datasets(self): method test_source_data_files (line 43) | def test_source_data_files(self): FILE: tensor2tensor/data_generators/translate_enes.py class TranslateEnesWmt32k (line 58) | class TranslateEnesWmt32k(translate.TranslateProblem): method additional_training_datasets (line 62) | def additional_training_datasets(self): method source_data_files (line 66) | def source_data_files(self, dataset_split): method vocab_data_files (line 71) | def vocab_data_files(self): class TranslateEnesWmtClean32k (line 76) | class TranslateEnesWmtClean32k(TranslateEnesWmt32k): method use_vocab_from_other_problem (line 80) | def use_vocab_from_other_problem(self): method datatypes_to_clean (line 84) | def datatypes_to_clean(self): class TranslateEnesWmt32kPacked (line 89) | class TranslateEnesWmt32kPacked(TranslateEnesWmt32k): method packed_length (line 92) | def packed_length(self): method use_vocab_from_other_problem (line 96) | def use_vocab_from_other_problem(self): class TranslateEnesWmt8k (line 101) | class TranslateEnesWmt8k(TranslateEnesWmt32k): method approx_vocab_size (line 105) | def approx_vocab_size(self): class TranslateEnesWmt8kPacked (line 110) | class TranslateEnesWmt8kPacked(TranslateEnesWmt8k): method packed_length (line 113) | def packed_length(self): method use_vocab_from_other_problem (line 117) | def use_vocab_from_other_problem(self): class TranslateEnesWmtCharacters (line 122) | class TranslateEnesWmtCharacters(TranslateEnesWmt8k): method vocab_type (line 126) | def vocab_type(self): FILE: tensor2tensor/data_generators/translate_enet.py class TranslateEnetWmt32k (line 56) | class TranslateEnetWmt32k(translate.TranslateProblem): method approx_vocab_size (line 60) | def approx_vocab_size(self): method source_data_files (line 63) | def source_data_files(self, dataset_split): class TranslateEnetWmtCharacters (line 69) | class TranslateEnetWmtCharacters(translate.TranslateProblem): method vocab_type (line 73) | def vocab_type(self): method source_data_files (line 76) | def source_data_files(self, dataset_split): FILE: tensor2tensor/data_generators/translate_enfr.py class TranslateEnfrWmtSmall8k (line 82) | class TranslateEnfrWmtSmall8k(translate.TranslateProblem): method approx_vocab_size (line 86) | def approx_vocab_size(self): method use_small_dataset (line 90) | def use_small_dataset(self): method source_data_files (line 93) | def source_data_files(self, dataset_split): method vocab_data_files (line 101) | def vocab_data_files(self): class TranslateEnfrWmtSmall32k (line 107) | class TranslateEnfrWmtSmall32k(TranslateEnfrWmtSmall8k): method approx_vocab_size (line 110) | def approx_vocab_size(self): class TranslateEnfrWmt8k (line 115) | class TranslateEnfrWmt8k(TranslateEnfrWmtSmall8k): method use_small_dataset (line 118) | def use_small_dataset(self): class TranslateEnfrWmt32k (line 123) | class TranslateEnfrWmt32k(TranslateEnfrWmtSmall32k): method use_small_dataset (line 126) | def use_small_dataset(self): class TranslateEnfrWmt32kPacked (line 131) | class TranslateEnfrWmt32kPacked(TranslateEnfrWmt32k): method packed_length (line 134) | def packed_length(self): method use_vocab_from_other_problem (line 138) | def use_vocab_from_other_problem(self): class TranslateEnfrWmt32kWithBacktranslateFr (line 143) | class TranslateEnfrWmt32kWithBacktranslateFr(TranslateEnfrWmt32k): method use_vocab_from_other_problem (line 147) | def use_vocab_from_other_problem(self): method already_shuffled (line 151) | def already_shuffled(self): method skip_random_fraction_when_training (line 155) | def skip_random_fraction_when_training(self): method backtranslate_data_filenames (line 159) | def backtranslate_data_filenames(self): method dataset_splits (line 165) | def dataset_splits(self): method generate_samples (line 175) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class TranslateEnfrWmt32kWithBacktranslateEn (line 199) | class TranslateEnfrWmt32kWithBacktranslateEn( method backtranslate_data_filenames (line 204) | def backtranslate_data_filenames(self): class TranslateEnfrWmtSmallCharacters (line 211) | class TranslateEnfrWmtSmallCharacters(translate.TranslateProblem): method vocab_type (line 215) | def vocab_type(self): method use_small_dataset (line 219) | def use_small_dataset(self): method source_data_files (line 222) | def source_data_files(self, dataset_split): class TranslateEnfrWmtCharacters (line 232) | class TranslateEnfrWmtCharacters(TranslateEnfrWmtSmallCharacters): method use_small_dataset (line 235) | def use_small_dataset(self): class TranslateEnfrWmtMulti64k (line 240) | class TranslateEnfrWmtMulti64k(TranslateEnfrWmtSmall32k): method use_small_dataset (line 244) | def use_small_dataset(self): method use_vocab_from_other_problem (line 248) | def use_vocab_from_other_problem(self): class TranslateEnfrWmtMulti64kPacked1k (line 253) | class TranslateEnfrWmtMulti64kPacked1k(TranslateEnfrWmtMulti64k): method packed_length (line 257) | def packed_length(self): method num_training_examples (line 261) | def num_training_examples(self): method inputs_prefix (line 265) | def inputs_prefix(self): method targets_prefix (line 269) | def targets_prefix(self): FILE: tensor2tensor/data_generators/translate_enid.py class TranslateEnidIwslt32k (line 76) | class TranslateEnidIwslt32k(translate.TranslateProblem): method approx_vocab_size (line 80) | def approx_vocab_size(self): method source_data_files (line 83) | def source_data_files(self, dataset_split): FILE: tensor2tensor/data_generators/translate_enmk.py class TranslateEnmkSetimes32k (line 51) | class TranslateEnmkSetimes32k(translate.TranslateProblem): method approx_vocab_size (line 55) | def approx_vocab_size(self): method source_data_files (line 58) | def source_data_files(self, dataset_split): class TranslateEnmkSetimesCharacters (line 64) | class TranslateEnmkSetimesCharacters(translate.TranslateProblem): method vocab_type (line 68) | def vocab_type(self): method source_data_files (line 71) | def source_data_files(self, dataset_split): FILE: tensor2tensor/data_generators/translate_enro.py class TranslateEnroWmt8k (line 51) | class TranslateEnroWmt8k(translate.TranslateProblem): method approx_vocab_size (line 55) | def approx_vocab_size(self): method source_data_files (line 58) | def source_data_files(self, dataset_split): class TranslateEnroWmt32k (line 64) | class TranslateEnroWmt32k(TranslateEnroWmt8k): method approx_vocab_size (line 67) | def approx_vocab_size(self): class TranslateEnroWmtCharacters (line 72) | class TranslateEnroWmtCharacters(TranslateEnroWmt8k): method vocab_type (line 76) | def vocab_type(self): class TranslateEnroWmtMulti64k (line 81) | class TranslateEnroWmtMulti64k(TranslateEnroWmt8k): method use_vocab_from_other_problem (line 85) | def use_vocab_from_other_problem(self): class TranslateEnroWmtMultiSmall64k (line 90) | class TranslateEnroWmtMultiSmall64k(TranslateEnroWmt8k): method dataset_splits (line 94) | def dataset_splits(self): method use_vocab_from_other_problem (line 105) | def use_vocab_from_other_problem(self): method how_many_examples_to_sample (line 109) | def how_many_examples_to_sample(self): method generate_samples (line 112) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class TranslateEnroWmtMultiTiny64k (line 147) | class TranslateEnroWmtMultiTiny64k(TranslateEnroWmtMultiSmall64k): method how_many_examples_to_sample (line 151) | def how_many_examples_to_sample(self): class TranslateEnroWmtMultiTiny64kPacked1k (line 156) | class TranslateEnroWmtMultiTiny64kPacked1k(TranslateEnroWmtMultiTiny64k): method packed_length (line 160) | def packed_length(self): method num_training_examples (line 164) | def num_training_examples(self): method inputs_prefix (line 168) | def inputs_prefix(self): method targets_prefix (line 172) | def targets_prefix(self): FILE: tensor2tensor/data_generators/translate_entn.py class TranslateEntnRma (line 41) | class TranslateEntnRma(translate.TranslateProblem): method approx_vocab_size (line 48) | def approx_vocab_size(self): method vocab_filename (line 52) | def vocab_filename(self): method source_data_files (line 55) | def source_data_files(self, dataset_split): FILE: tensor2tensor/data_generators/translate_envi.py class TranslateEnviIwslt32k (line 49) | class TranslateEnviIwslt32k(translate.TranslateProblem): method approx_vocab_size (line 53) | def approx_vocab_size(self): method source_data_files (line 56) | def source_data_files(self, dataset_split): FILE: tensor2tensor/data_generators/translate_enzh.py function get_filename (line 155) | def get_filename(dataset): class TranslateEnzhWmt32k (line 160) | class TranslateEnzhWmt32k(translate.TranslateProblem): method approx_vocab_size (line 180) | def approx_vocab_size(self): method source_vocab_name (line 184) | def source_vocab_name(self): method target_vocab_name (line 188) | def target_vocab_name(self): method get_training_dataset (line 191) | def get_training_dataset(self, tmp_dir): method generate_encoded_samples (line 213) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): method feature_encoders (line 243) | def feature_encoders(self, data_dir): class TranslateEnzhWmt8k (line 255) | class TranslateEnzhWmt8k(TranslateEnzhWmt32k): method approx_vocab_size (line 262) | def approx_vocab_size(self): method dataset_splits (line 266) | def dataset_splits(self): method get_training_dataset (line 278) | def get_training_dataset(self, tmp_dir): FILE: tensor2tensor/data_generators/translate_test.py class TranslateTest (line 31) | class TranslateTest(tf.test.TestCase): method setUpClass (line 39) | def setUpClass(cls): method testCompileData (line 71) | def testCompileData(self): FILE: tensor2tensor/data_generators/video_generated.py class VideoStochasticShapes10k (line 42) | class VideoStochasticShapes10k(video_utils.VideoProblem): method is_generate_per_split (line 46) | def is_generate_per_split(self): method frame_height (line 51) | def frame_height(self): method frame_width (line 55) | def frame_width(self): method total_number_of_frames (line 59) | def total_number_of_frames(self): method video_length (line 64) | def video_length(self): method random_skip (line 68) | def random_skip(self): method only_keep_videos_from_0th_frame (line 72) | def only_keep_videos_from_0th_frame(self): method use_not_breaking_batching (line 76) | def use_not_breaking_batching(self): method eval_metrics (line 79) | def eval_metrics(self): method extra_reading_spec (line 83) | def extra_reading_spec(self): method hparams (line 94) | def hparams(self, defaults, unused_model_hparams): method get_circle (line 106) | def get_circle(x, y, z, c, s): method get_rectangle (line 112) | def get_rectangle(x, y, z, c, s): method get_triangle (line 118) | def get_triangle(x, y, z, c, s): method generate_stochastic_shape_instance (line 124) | def generate_stochastic_shape_instance(self): method generate_samples (line 191) | def generate_samples(self, data_dir, tmp_dir, unused_dataset_split): FILE: tensor2tensor/data_generators/video_utils.py function resize_video_frames (line 49) | def resize_video_frames(images, size): function video_augmentation (line 54) | def video_augmentation(features, hue=False, saturate=False, contrast=Fal... function create_border (line 83) | def create_border(video, color="blue", border_percent=2): function convert_videos_to_summaries (line 108) | def convert_videos_to_summaries(input_videos, output_videos, target_videos, function display_video_hooks (line 167) | def display_video_hooks(hook_args): function summarize_video_metrics (line 211) | def summarize_video_metrics(hook_args): function debug_video_writer_factory (line 240) | def debug_video_writer_factory(output_dir): class VideoProblem (line 251) | class VideoProblem(problem.Problem): method __init__ (line 254) | def __init__(self, *args, **kwargs): method max_frames_per_video (line 264) | def max_frames_per_video(self, hparams): method num_channels (line 284) | def num_channels(self): method frame_height (line 289) | def frame_height(self): method frame_width (line 294) | def frame_width(self): method frame_shape (line 299) | def frame_shape(self): method total_number_of_frames (line 304) | def total_number_of_frames(self): method random_skip (line 315) | def random_skip(self): method extra_reading_spec (line 320) | def extra_reading_spec(self): method dataset_splits (line 325) | def dataset_splits(self): method only_keep_videos_from_0th_frame (line 336) | def only_keep_videos_from_0th_frame(self): method avoid_overlapping_frames (line 340) | def avoid_overlapping_frames(self): method use_not_breaking_batching (line 345) | def use_not_breaking_batching(self): method preprocess_example (line 348) | def preprocess_example(self, example, mode, hparams): method decode_hooks (line 357) | def decode_hooks(self): method is_generate_per_split (line 361) | def is_generate_per_split(self): method example_reading_spec (line 378) | def example_reading_spec(self): method serving_input_fn (line 399) | def serving_input_fn(self, hparams): method preprocess (line 413) | def preprocess(self, dataset, mode, hparams, interleave=True): method eval_metrics (line 537) | def eval_metrics(self): method validate_frame (line 544) | def validate_frame(self, frame): method generate_samples (line 556) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method generate_encoded_samples (line 575) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): method generate_data (line 634) | def generate_data(self, data_dir, tmp_dir, task_id=-1): class VideoProblemOld (line 665) | class VideoProblemOld(problem.Problem): method num_channels (line 669) | def num_channels(self): method example_reading_spec (line 673) | def example_reading_spec(self): method eval_metrics (line 689) | def eval_metrics(self): class VideoAugmentationProblem (line 697) | class VideoAugmentationProblem(VideoProblem): method hue (line 706) | def hue(self): method contrast (line 710) | def contrast(self): method saturate (line 714) | def saturate(self): method preprocess (line 717) | def preprocess(self, dataset, mode, hparams, interleave=True): class Video2ClassProblem (line 728) | class Video2ClassProblem(VideoProblemOld): method is_small (line 732) | def is_small(self): method num_classes (line 736) | def num_classes(self): method train_shards (line 740) | def train_shards(self): method dev_shards (line 744) | def dev_shards(self): method class_labels (line 748) | def class_labels(self): method image_size (line 752) | def image_size(self): method feature_encoders (line 755) | def feature_encoders(self, data_dir): method generator (line 762) | def generator(self, data_dir, tmp_dir, is_training): method example_reading_spec (line 765) | def example_reading_spec(self): method hparams (line 774) | def hparams(self, defaults, unused_model_hparams): method generate_data (line 783) | def generate_data(self, data_dir, tmp_dir, task_id=-1): FILE: tensor2tensor/data_generators/video_utils_test.py class VideoUtilsTest (line 31) | class VideoUtilsTest(parameterized.TestCase, tf.test.TestCase): method get_predictions (line 33) | def get_predictions(self, num_decodes=2): method testVideoAugmentation (line 49) | def testVideoAugmentation(self): method testDecodeInMemoryTrue (line 62) | def testDecodeInMemoryTrue(self): method testConvertPredictionsToVideoSummaries (line 75) | def testConvertPredictionsToVideoSummaries(self, num_decodes=5, FILE: tensor2tensor/data_generators/vqa.py function _get_vqa_v2_annotations (line 45) | def _get_vqa_v2_annotations(directory, function _get_vqa_v2_image_raw_dataset (line 55) | def _get_vqa_v2_image_raw_dataset(directory, image_root_url, image_urls): function _get_vqa_v2_image_feature_dataset (line 66) | def _get_vqa_v2_image_feature_dataset( class ImageQuestion2MultilabelProblem (line 75) | class ImageQuestion2MultilabelProblem(image_utils.ImageProblem): method target_space_id (line 79) | def target_space_id(self): method vocab_size (line 83) | def vocab_size(self): method num_classes (line 87) | def num_classes(self): method vocab_filename (line 91) | def vocab_filename(self): method label_filename (line 95) | def label_filename(self): method train_shards (line 99) | def train_shards(self): method dev_shards (line 103) | def dev_shards(self): method source_data_files (line 106) | def source_data_files(self, dataset_split): method generator (line 109) | def generator(self, data_dir, tmp_dir, dataset_split): method eval_metrics (line 112) | def eval_metrics(self): method feature_encoders (line 117) | def feature_encoders(self, data_dir): method hparams (line 129) | def hparams(self, defaults, unused_model_hparams): method generate_data (line 147) | def generate_data(self, data_dir, tmp_dir, task_id=-1): class ImageVqav2Tokens10kLabels3k (line 156) | class ImageVqav2Tokens10kLabels3k(ImageQuestion2MultilabelProblem): method source_data_files (line 178) | def source_data_files(self, dataset_split): method target_space_id (line 183) | def target_space_id(self): method vocab_size (line 187) | def vocab_size(self): method num_classes (line 191) | def num_classes(self): method vocab_filename (line 195) | def vocab_filename(self): method label_filename (line 199) | def label_filename(self): method train_shards (line 203) | def train_shards(self): method dev_shards (line 207) | def dev_shards(self): method example_reading_spec (line 210) | def example_reading_spec(self): method preprocess_example (line 227) | def preprocess_example(self, example, mode, hparams): method generator (line 236) | def generator(self, data_dir, tmp_dir, dataset_split): method vqa_v2_generator (line 240) | def vqa_v2_generator(self, data_dir, tmp_dir, datasets): class ImageVqav2RcnnFeatureTokens10kLabels3k (line 292) | class ImageVqav2RcnnFeatureTokens10kLabels3k(ImageVqav2Tokens10kLabels3k): method num_boxes (line 298) | def num_boxes(self): method feature_dimension (line 302) | def feature_dimension(self): method spatial_feature_dimension (line 306) | def spatial_feature_dimension(self): method feature_file_field_names (line 310) | def feature_file_field_names(self): method preprocess_example (line 318) | def preprocess_example(self, example, mode, hparams): method example_reading_spec (line 327) | def example_reading_spec(self): method vqa_v2_generator (line 357) | def vqa_v2_generator(self, data_dir, tmp_dir, datasets): FILE: tensor2tensor/data_generators/vqa_utils.py function _smallest_size_at_least (line 37) | def _smallest_size_at_least(height, width, smallest_side): function _aspect_preserving_resize (line 67) | def _aspect_preserving_resize(image, smallest_side): function _flip (line 93) | def _flip(image): function _distort_color (line 99) | def _distort_color(image, color_ordering=0, scope=None): function _apply_with_random_selector (line 144) | def _apply_with_random_selector(x, func, num_cases): function _mean_image_subtraction (line 164) | def _mean_image_subtraction(image, means): function vqa_v2_preprocess_image (line 197) | def vqa_v2_preprocess_image( FILE: tensor2tensor/data_generators/wiki.py class LanguagemodelWikiXmlV8kL1k (line 36) | class LanguagemodelWikiXmlV8kL1k(text_problems.ChoppedTextProblem): method maybe_prepare_text (line 43) | def maybe_prepare_text(self, tmp_dir): method train_text_filepaths (line 72) | def train_text_filepaths(self, tmp_dir): method dev_text_filepaths (line 76) | def dev_text_filepaths(self, tmp_dir): method dev_fraction (line 81) | def dev_fraction(self): method corpus_url (line 85) | def corpus_url(self): method approx_vocab_size (line 90) | def approx_vocab_size(self): method sequence_length (line 94) | def sequence_length(self): method max_chars_for_vocab (line 99) | def max_chars_for_vocab(self): class LanguagemodelWikiXmlV8kL4k (line 106) | class LanguagemodelWikiXmlV8kL4k(LanguagemodelWikiXmlV8kL1k): method sequence_length (line 114) | def sequence_length(self): class LanguagemodelWikiScramble (line 119) | class LanguagemodelWikiScramble(LanguagemodelWikiXmlV8kL1k): method example_generator (line 130) | def example_generator(self, encoder, tmp_dir, task_id): method scramble_fraction (line 137) | def scramble_fraction(self): method has_inputs (line 141) | def has_inputs(self): method input_space_id (line 145) | def input_space_id(self): method targeted_vocab_size (line 149) | def targeted_vocab_size(self): method remainder_policy (line 153) | def remainder_policy(self): method scramble (line 157) | def scramble(self, seq): class LanguagemodelWikiScrambleL128 (line 172) | class LanguagemodelWikiScrambleL128(LanguagemodelWikiScramble): method sequence_length (line 176) | def sequence_length(self): method scramble_fraction (line 180) | def scramble_fraction(self): class LanguagemodelWikiScrambleL1k (line 185) | class LanguagemodelWikiScrambleL1k(LanguagemodelWikiScramble): method sequence_length (line 189) | def sequence_length(self): method scramble_fraction (line 193) | def scramble_fraction(self): class LanguagemodelWikiNorefV8kL1k (line 198) | class LanguagemodelWikiNorefV8kL1k(LanguagemodelWikiXmlV8kL1k): method filepath_to_unicode_strings (line 219) | def filepath_to_unicode_strings(self, filepath): method max_chars_for_vocab (line 239) | def max_chars_for_vocab(self): function _dump_to_pages (line 245) | def _dump_to_pages(dump): function _page_to_title (line 270) | def _page_to_title(page): function _page_to_text (line 289) | def _page_to_text(page): function _find_and_replace (line 309) | def _find_and_replace(text, start_string, end_string, replace_fn): function _remove_references (line 342) | def _remove_references(text): function _remove_triple_quotes (line 347) | def _remove_triple_quotes(text): function _remove_double_brackets (line 352) | def _remove_double_brackets(text): class LanguagemodelWikiNorefV8kL16k (line 373) | class LanguagemodelWikiNorefV8kL16k(LanguagemodelWikiNorefV8kL1k): method sequence_length (line 380) | def sequence_length(self): class LanguagemodelWikiNorefV32kL1k (line 386) | class LanguagemodelWikiNorefV32kL1k(LanguagemodelWikiNorefV8kL1k): method approx_vocab_size (line 390) | def approx_vocab_size(self): method max_chars_for_vocab (line 394) | def max_chars_for_vocab(self): class LanguagemodelWikiNorefV32kL16k (line 399) | class LanguagemodelWikiNorefV32kL16k(LanguagemodelWikiNorefV32kL1k): method sequence_length (line 406) | def sequence_length(self): class LanguagemodelWikiNorefV128kL1k (line 412) | class LanguagemodelWikiNorefV128kL1k(LanguagemodelWikiNorefV8kL1k): method approx_vocab_size (line 416) | def approx_vocab_size(self): method max_chars_for_vocab (line 420) | def max_chars_for_vocab(self): FILE: tensor2tensor/data_generators/wiki_lm.py function concat_generator (line 33) | def concat_generator(filename, up_threshold, low_threshold=10): function mix_generators (line 51) | def mix_generators(generator_list): class LanguagemodelEnWiki32k (line 85) | class LanguagemodelEnWiki32k(text_problems.Text2SelfProblem): method approx_vocab_size (line 93) | def approx_vocab_size(self): method max_samples_for_vocab (line 97) | def max_samples_for_vocab(self): method combine_characters_threshold (line 101) | def combine_characters_threshold(self): method is_generate_per_split (line 105) | def is_generate_per_split(self): method dataset_splits (line 109) | def dataset_splits(self): method generate_samples (line 122) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class LanguagemodelEnWiki64k (line 147) | class LanguagemodelEnWiki64k(LanguagemodelEnWiki32k): method approx_vocab_size (line 151) | def approx_vocab_size(self): class LanguagemodelEnWiki64kShorter (line 156) | class LanguagemodelEnWiki64kShorter(LanguagemodelEnWiki64k): method combine_characters_threshold (line 160) | def combine_characters_threshold(self): method use_vocab_from_other_problem (line 165) | def use_vocab_from_other_problem(self): class LanguagemodelDeWiki32k (line 170) | class LanguagemodelDeWiki32k(LanguagemodelEnWiki32k): class LanguagemodelDeWiki64k (line 179) | class LanguagemodelDeWiki64k(LanguagemodelDeWiki32k): method approx_vocab_size (line 183) | def approx_vocab_size(self): class LanguagemodelFrWiki32k (line 188) | class LanguagemodelFrWiki32k(LanguagemodelEnWiki32k): class LanguagemodelFrWiki64k (line 197) | class LanguagemodelFrWiki64k(LanguagemodelFrWiki32k): method approx_vocab_size (line 201) | def approx_vocab_size(self): class LanguagemodelRoWiki32k (line 206) | class LanguagemodelRoWiki32k(LanguagemodelEnWiki32k): class LanguagemodelRoWiki64k (line 215) | class LanguagemodelRoWiki64k(LanguagemodelRoWiki32k): method approx_vocab_size (line 219) | def approx_vocab_size(self): class LanguagemodelDeEnFrRoWiki64k (line 224) | class LanguagemodelDeEnFrRoWiki64k(LanguagemodelEnWiki32k): method approx_vocab_size (line 235) | def approx_vocab_size(self): method max_samples_for_vocab (line 239) | def max_samples_for_vocab(self): class LanguagemodelDeEnFrRoWiki64kFitbPacked1k (line 244) | class LanguagemodelDeEnFrRoWiki64kFitbPacked1k( method use_vocab_from_other_problem (line 249) | def use_vocab_from_other_problem(self): method has_inputs (line 253) | def has_inputs(self): method generate_samples (line 256) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method num_training_examples (line 264) | def num_training_examples(self): method packed_length (line 268) | def packed_length(self): method inputs_prefix (line 272) | def inputs_prefix(self): method targets_prefix (line 276) | def targets_prefix(self): FILE: tensor2tensor/data_generators/wiki_multi_problems.py class LanguagemodelEnWikiLMMultiNLISubwords (line 36) | class LanguagemodelEnWikiLMMultiNLISubwords(multi_problem.MultiProblem): method __init__ (line 39) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 46) | def vocab_type(self): class LanguagemodelEnWikiLMMultiNLISubwordsV2 (line 51) | class LanguagemodelEnWikiLMMultiNLISubwordsV2( method __init__ (line 55) | def __init__(self, was_reversed=False, was_copy=False): method has_inputs (line 65) | def has_inputs(self): method use_vocab_from_other_problem (line 69) | def use_vocab_from_other_problem(self): method vocab_type (line 73) | def vocab_type(self): class LanguagemodelMultiWikiTranslatePacked1k (line 78) | class LanguagemodelMultiWikiTranslatePacked1k( method __init__ (line 82) | def __init__(self, was_reversed=False, was_copy=False): method problems_and_rates (line 95) | def problems_and_rates(self): method has_inputs (line 108) | def has_inputs(self): method use_vocab_from_other_problem (line 112) | def use_vocab_from_other_problem(self): method vocab_type (line 116) | def vocab_type(self): method packed_length (line 120) | def packed_length(self): class LanguagemodelMultiWikiTranslatePacked1kV2 (line 125) | class LanguagemodelMultiWikiTranslatePacked1kV2( method problems_and_rates (line 130) | def problems_and_rates(self): class LanguagemodelEnWikiLMMultiNLISubwords64k (line 144) | class LanguagemodelEnWikiLMMultiNLISubwords64k(multi_problem.MultiProblem): method __init__ (line 147) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 154) | def vocab_type(self): class LanguagemodelEnWikiLMShortMultiNLISubwords64k (line 159) | class LanguagemodelEnWikiLMShortMultiNLISubwords64k(multi_problem.MultiP... method __init__ (line 162) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 169) | def vocab_type(self): class LanguagemodelEnWikiLMSummarizeCnndmSubwords (line 174) | class LanguagemodelEnWikiLMSummarizeCnndmSubwords(multi_problem.MultiPro... method __init__ (line 177) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 185) | def vocab_type(self): class LanguagemodelEnWikiLMSummarizeCnndmSubwords64k (line 190) | class LanguagemodelEnWikiLMSummarizeCnndmSubwords64k( method __init__ (line 194) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 202) | def vocab_type(self): class LanguagemodelMultiWikiTranslateFr (line 207) | class LanguagemodelMultiWikiTranslateFr(multi_problem.MultiProblem): method __init__ (line 210) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 217) | def vocab_type(self): class LanguagemodelMultiWikiTranslate (line 222) | class LanguagemodelMultiWikiTranslate(multi_problem.MultiProblem): method __init__ (line 225) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 244) | def vocab_type(self): class LanguagemodelEnWikiLMSummarizeFrac1CnndmSubwords64k (line 249) | class LanguagemodelEnWikiLMSummarizeFrac1CnndmSubwords64k( method __init__ (line 253) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 261) | def vocab_type(self): class LanguagemodelEnWikiLMSummarizeFrac2CnndmSubwords64k (line 266) | class LanguagemodelEnWikiLMSummarizeFrac2CnndmSubwords64k( method __init__ (line 270) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 278) | def vocab_type(self): class LanguagemodelEnWikiLMSummarizeFrac5CnndmSubwords64k (line 283) | class LanguagemodelEnWikiLMSummarizeFrac5CnndmSubwords64k( method __init__ (line 287) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 295) | def vocab_type(self): class LanguagemodelEnWikiLMSummarizeFrac10CnndmSubwords64k (line 300) | class LanguagemodelEnWikiLMSummarizeFrac10CnndmSubwords64k( method __init__ (line 304) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 312) | def vocab_type(self): class LanguagemodelEnWikiLMSummarizeFrac20CnndmSubwords64k (line 317) | class LanguagemodelEnWikiLMSummarizeFrac20CnndmSubwords64k( method __init__ (line 321) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 329) | def vocab_type(self): class LanguagemodelEnWikiLMSummarizeFrac50CnndmSubwords64k (line 334) | class LanguagemodelEnWikiLMSummarizeFrac50CnndmSubwords64k( method __init__ (line 338) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 346) | def vocab_type(self): class LanguagemodelEnWikiLMSquadConcatSubwords (line 351) | class LanguagemodelEnWikiLMSquadConcatSubwords(multi_problem.MultiProblem): method __init__ (line 354) | def __init__(self, was_reversed=False, was_copy=False): method vocab_type (line 361) | def vocab_type(self): FILE: tensor2tensor/data_generators/wiki_revision.py class WikiRevision (line 86) | class WikiRevision(text_problems.Text2TextProblem): method approx_vocab_size (line 125) | def approx_vocab_size(self): method strip (line 129) | def strip(self): method wiki_revision_skip_factor (line 134) | def wiki_revision_skip_factor(self): method max_segment_length (line 139) | def max_segment_length(self): method max_examples_per_shard (line 144) | def max_examples_per_shard(self): method aggregate_job_stats (line 148) | def aggregate_job_stats(self): method generate_data (line 243) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method generator (line 311) | def generator(self, encoder, corpus_files, tmp_dir): method page_to_examples (line 334) | def page_to_examples(self, page, encoder): method make_examples (line 379) | def make_examples(self, method eval_metrics (line 467) | def eval_metrics(self): method invert_prob (line 476) | def invert_prob(self): class WikiRevisionPacked1k (line 482) | class WikiRevisionPacked1k(WikiRevision): method packed_length (line 486) | def packed_length(self): class WikiRevisionPacked256 (line 491) | class WikiRevisionPacked256(WikiRevision): method packed_length (line 495) | def packed_length(self): method max_segment_length (line 499) | def max_segment_length(self): FILE: tensor2tensor/data_generators/wiki_revision_utils.py function to_unicode (line 36) | def to_unicode(s): function include_revision (line 40) | def include_revision(revision_num, skip_factor=1.1): function file_page_generator (line 62) | def file_page_generator(my_file, max_page_size=2**28): function get_title (line 110) | def get_title(page): function get_id (line 126) | def get_id(page): function get_revisions (line 142) | def get_revisions(page): function parse_page (line 165) | def parse_page(raw_page): function maybe_copy_file_to_directory (line 186) | def maybe_copy_file_to_directory(source_filepath, target_directory): function corpus_page_generator (line 214) | def corpus_page_generator(corpus_files, tmp_dir, max_page_size_exp): function get_text (line 239) | def get_text(revision, strip=True): function strip_text (line 265) | def strip_text(text): function _find_and_replace (line 282) | def _find_and_replace(text, start_string, end_string, replace_fn): function _remove_references (line 315) | def _remove_references(text): function _remove_triple_quotes (line 319) | def _remove_triple_quotes(text): function _remove_curly_braces (line 323) | def _remove_curly_braces(text): function _remove_double_brackets (line 350) | def _remove_double_brackets(text): function _remove_boring_lines (line 372) | def _remove_boring_lines(text): function all_corpus_files (line 388) | def all_corpus_files(data_prefix): function corpus_files_for_shard (line 392) | def corpus_files_for_shard(shard_num, train_shards, dev_shards, data_pre... function vocab_filename (line 403) | def vocab_filename(approx_vocab_size, strip): function get_or_generate_vocabulary (line 408) | def get_or_generate_vocabulary(data_dir, function get_encoder_from_vocab (line 450) | def get_encoder_from_vocab(vocab_filepath): function throw_empty_pairs (line 471) | def throw_empty_pairs(src_tgt_pairs): function edit_distance_filter (line 483) | def edit_distance_filter(source_target_input, max_equal_to_diff_ratio=0): function introduce_errors (line 518) | def introduce_errors(s, function fast_match_sequences (line 584) | def fast_match_sequences(a, FILE: tensor2tensor/data_generators/wikisum/generate_vocab.py function main (line 38) | def main(_): FILE: tensor2tensor/data_generators/wikisum/get_references_commoncrawl.py function main (line 44) | def main(_): FILE: tensor2tensor/data_generators/wikisum/get_references_web.py function main (line 60) | def main(_): FILE: tensor2tensor/data_generators/wikisum/get_references_web_single_group.py function concat_tfrecord_files (line 74) | def concat_tfrecord_files(fnames, out_fname, rm_after=True): function shard (line 87) | def shard(items, num_shards): function mp_get_text (line 105) | def mp_get_text(url, html): function encode (line 109) | def encode(s): function make_example_from_ref (line 113) | def make_example_from_ref(url, ref): function tfrecord_fname (line 130) | def tfrecord_fname(out_dir, shard_id, idx=None): function make_tfrecord_writer (line 137) | def make_tfrecord_writer(fname): function write_ref_content (line 142) | def write_ref_content(url, ref, f): function fetch_url (line 152) | async def fetch_url(url, session, side_data): function throttled_fetch_url (line 167) | async def throttled_fetch_url(url, sem, session, side_data): function fetch_urls (line 172) | async def fetch_urls(urls, function get_urls_per_shard (line 243) | def get_urls_per_shard(urls_files): function get_urls_for_shard (line 259) | def get_urls_for_shard(urls_dir, shard_id): function get_urls_for_shard_group (line 266) | def get_urls_for_shard_group(urls_dir, shard_id, group_id): function main (line 280) | def main(_): FILE: tensor2tensor/data_generators/wikisum/html.py function get_text_from_html (line 21) | def get_text_from_html(html): function _soup_strings (line 35) | def _soup_strings(soup): FILE: tensor2tensor/data_generators/wikisum/parallel_launch.py function remote_run (line 98) | def remote_run(cmd, instance_name, detach=False, retries=1): function default_zone (line 114) | def default_zone(): function safe_socket (line 119) | def safe_socket(timeout=2): function wait_for_ssh (line 128) | def wait_for_ssh(ip): function create_instance (line 141) | def create_instance(instance_name, cpu=1, mem=4): function list_vm_names_and_ips (line 148) | def list_vm_names_and_ips(): function shell_run_with_retry (line 155) | def shell_run_with_retry(cmd, retries=1, **kwargs): function delete_instance (line 167) | def delete_instance(instance_name): function launch_instance (line 171) | def launch_instance(instance_name, function main (line 201) | def main(_): FILE: tensor2tensor/data_generators/wikisum/produce_examples.py function main (line 46) | def main(_): FILE: tensor2tensor/data_generators/wikisum/utils.py function readahead (line 52) | def readahead(path): class WETHeader (line 56) | class WETHeader(collections.namedtuple('WETHeader', ['url', 'length'])): method read (line 61) | def read(cls, f): class WETRecord (line 83) | class WETRecord(collections.namedtuple('WETRecord', ['url', 'content'])): method read (line 86) | def read(cls, f): function wet_records_from_file_obj (line 101) | def wet_records_from_file_obj(f, take_ownership=False): function wet_records (line 118) | def wet_records(wet_filepath): function download (line 130) | def download(url, download_dir): function wet_download_urls (line 142) | def wet_download_urls(wet_paths_url, tmp_dir, rm_after=True): function wet_records_from_url (line 154) | def wet_records_from_url(download_url, tmp_dir, rm_after=True): class DummyPool (line 164) | class DummyPool(object): method __init__ (line 166) | def __init__(self, processes=None): method apply_async (line 169) | def apply_async(self, fn, args=None): method map (line 173) | def map(self, fn, arg_list): class DummyResult (line 177) | class DummyResult(object): method __init__ (line 179) | def __init__(self, result): method get (line 182) | def get(self): function shard (line 186) | def shard(items, num_shards): function gzip_memfile (line 204) | def gzip_memfile(fname): function filter_paragraph (line 214) | def filter_paragraph(p): function timing (line 258) | def timing(name=''): FILE: tensor2tensor/data_generators/wikisum/utils_test.py function _get_testdata (line 32) | def _get_testdata(filename): class UtilsTest (line 37) | class UtilsTest(tf.test.TestCase): method test_filter_paragraph (line 39) | def test_filter_paragraph(self): FILE: tensor2tensor/data_generators/wikisum/validate_data.py function aggregate_stats (line 43) | def aggregate_stats(stats_files): function filename_to_task_id (line 96) | def filename_to_task_id(fname): function get_length (line 112) | def get_length(fname): function validate_data_files (line 116) | def validate_data_files(problem, data_files, min_size): function main (line 138) | def main(_): FILE: tensor2tensor/data_generators/wikisum/wikisum.py class WikisumBase (line 58) | class WikisumBase(problem.Problem): method example_reading_spec (line 61) | def example_reading_spec(self): method target_vocab_size (line 71) | def target_vocab_size(self): method vocab_filename (line 75) | def vocab_filename(self): method feature_encoders (line 78) | def feature_encoders(self, data_dir): method hparams (line 84) | def hparams(self, defaults, unused_model_hparams): method eval_metrics (line 97) | def eval_metrics(self): method generate_lines_for_vocab (line 102) | def generate_lines_for_vocab(self, wikis_dir, refs_dir, max_chars=10**7): method generate_vocab (line 132) | def generate_vocab(self, data_dir, wikis_dir, refs_dir): method generate_data (line 138) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method out_filepaths (line 141) | def out_filepaths(self, data_dir): class WikisumCommoncrawl (line 156) | class WikisumCommoncrawl(WikisumBase): class WikisumWeb (line 162) | class WikisumWeb(WikisumBase): class WikisumCommoncrawlLeadSection (line 168) | class WikisumCommoncrawlLeadSection(WikisumCommoncrawl): method preprocess_example (line 171) | def preprocess_example(self, example, mode, hparams): method dataset_filename (line 176) | def dataset_filename(self): method generate_data (line 179) | def generate_data(self, data_dir, tmp_dir, task_id=-1): class WikisumWebLeadSection (line 185) | class WikisumWebLeadSection(WikisumWeb): method preprocess_example (line 188) | def preprocess_example(self, example, mode, hparams): method dataset_filename (line 193) | def dataset_filename(self): method generate_data (line 196) | def generate_data(self, data_dir, tmp_dir, task_id=-1): function make_ref_shard_files (line 201) | def make_ref_shard_files(out_dir): function _truncate_to_lead_section (line 212) | def _truncate_to_lead_section(example): function _make_example_from_record (line 220) | def _make_example_from_record(record): function _shard_id_for_file (line 231) | def _shard_id_for_file(sharded_filename): function _references_files_by_shard (line 238) | def _references_files_by_shard(refs_dir): function _references_content (line 248) | def _references_content(ref_files): function _wiki_urls_for_shard (line 261) | def _wiki_urls_for_shard(shard_id, urls_dir=None): class WikipediaSection (line 269) | class WikipediaSection( class WikipediaArticle (line 274) | class WikipediaArticle( function _wiki_articles (line 279) | def _wiki_articles(shard_id, wikis_dir=None): function _token_counts (line 326) | def _token_counts(text, token_set=None): function _normalize_text (line 335) | def _normalize_text(text): function _tokens_to_score (line 344) | def _tokens_to_score(tokens): function rank_reference_paragraphs (line 348) | def rank_reference_paragraphs(wiki_title, references_content, normalize=... function produce_examples (line 382) | def produce_examples(shard_ids, wikis_dir, refs_dir, urls_dir, vocab_path, function _format_title (line 484) | def _format_title(title): function _encode_wiki_sections (line 488) | def _encode_wiki_sections(sections, vocab): function _process_folders (line 502) | def _process_folders(tmp_dir): function extract_references_from_wets (line 506) | def extract_references_from_wets(wet_files, metadata_dir, out_dir, FILE: tensor2tensor/data_generators/wikitext103.py function _build_vocab (line 37) | def _build_vocab(filename, vocab_dir, vocab_name): function _maybe_download_corpus (line 62) | def _maybe_download_corpus(tmp_dir, vocab_type): class LanguagemodelWikitext103 (line 108) | class LanguagemodelWikitext103(text_problems.Text2SelfProblem): method dataset_splits (line 112) | def dataset_splits(self): method is_generate_per_split (line 125) | def is_generate_per_split(self): method vocab_type (line 129) | def vocab_type(self): method generate_samples (line 132) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class LanguagemodelWikitext103Characters (line 158) | class LanguagemodelWikitext103Characters(LanguagemodelWikitext103): method vocab_type (line 162) | def vocab_type(self): class LanguagemodelWikitext103L4k (line 167) | class LanguagemodelWikitext103L4k(LanguagemodelWikitext103): method generate_samples (line 170) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method max_length (line 187) | def max_length(self, model_hparams): method sequence_length (line 191) | def sequence_length(self): class LanguagemodelWikitext103L16k (line 197) | class LanguagemodelWikitext103L16k(LanguagemodelWikitext103L4k): method sequence_length (line 201) | def sequence_length(self): FILE: tensor2tensor/data_generators/wnli.py class WinogradNLI (line 35) | class WinogradNLI(text_problems.TextConcat2ClassProblem): method is_generate_per_split (line 45) | def is_generate_per_split(self): method dataset_splits (line 49) | def dataset_splits(self): method approx_vocab_size (line 59) | def approx_vocab_size(self): method vocab_filename (line 63) | def vocab_filename(self): method num_classes (line 67) | def num_classes(self): method class_labels (line 70) | def class_labels(self, data_dir): method _maybe_download_corpora (line 75) | def _maybe_download_corpora(self, tmp_dir): method example_generator (line 87) | def example_generator(self, filename): method generate_samples (line 98) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class WinogradNLICharacters (line 111) | class WinogradNLICharacters(WinogradNLI): method vocab_type (line 115) | def vocab_type(self): method global_task_id (line 118) | def global_task_id(self): FILE: tensor2tensor/data_generators/wsj_parsing.py class WsjParsing (line 37) | class WsjParsing(text_problems.Text2textTmpdir): method generate_samples (line 48) | def generate_samples(self, data_dir, tmp_dir, dataset_split): method generate_encoded_samples (line 58) | def generate_encoded_samples(self, data_dir, tmp_dir, dataset_split): method generate_text_for_vocab (line 64) | def generate_text_for_vocab(self, data_dir, tmp_dir): method max_samples_for_vocab (line 76) | def max_samples_for_vocab(self): function words_and_tags_from_wsj_tree (line 80) | def words_and_tags_from_wsj_tree(tree_string): function token_generator (line 107) | def token_generator(tree_path, source_token_vocab, target_token_vocab, function parsing_token_generator (line 137) | def parsing_token_generator(data_dir, tmp_dir, train, source_vocab_size, FILE: tensor2tensor/data_generators/yelp_full.py class SentimentYelpFull (line 33) | class SentimentYelpFull(text_problems.Text2ClassProblem): method is_generate_per_split (line 38) | def is_generate_per_split(self): method dataset_splits (line 42) | def dataset_splits(self): method approx_vocab_size (line 52) | def approx_vocab_size(self): method num_classes (line 56) | def num_classes(self): method class_labels (line 59) | def class_labels(self, data_dir): method doc_generator (line 63) | def doc_generator(self, yelp_dir, dataset, include_label=False): method generate_samples (line 76) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class SentimentYelpFullCharacters (line 98) | class SentimentYelpFullCharacters(SentimentYelpFull): method vocab_type (line 102) | def vocab_type(self): method global_task_id (line 105) | def global_task_id(self): FILE: tensor2tensor/data_generators/yelp_polarity.py class SentimentYelpPolarity (line 33) | class SentimentYelpPolarity(text_problems.Text2ClassProblem): method is_generate_per_split (line 38) | def is_generate_per_split(self): method dataset_splits (line 42) | def dataset_splits(self): method approx_vocab_size (line 52) | def approx_vocab_size(self): method num_classes (line 56) | def num_classes(self): method class_labels (line 59) | def class_labels(self, data_dir): method doc_generator (line 63) | def doc_generator(self, yelp_dir, dataset, include_label=False): method generate_samples (line 76) | def generate_samples(self, data_dir, tmp_dir, dataset_split): class SentimentYelpPolarityCharacters (line 98) | class SentimentYelpPolarityCharacters(SentimentYelpPolarity): method vocab_type (line 102) | def vocab_type(self): method global_task_id (line 105) | def global_task_id(self): FILE: tensor2tensor/envs/env_problem.py class EnvProblem (line 47) | class EnvProblem(Env, problem.Problem): method __init__ (line 101) | def __init__(self, method batch_size (line 146) | def batch_size(self): method trajectories (line 152) | def trajectories(self): method trajectories (line 156) | def trajectories(self, trajectories_): method initialize (line 160) | def initialize(self, batch_size=1, **kwargs): method initialize_environments (line 178) | def initialize_environments(self, batch_size=1, parallelism=1, **kwargs): method assert_common_preconditions (line 189) | def assert_common_preconditions(self): method observation_space (line 193) | def observation_space(self): method observation_spec (line 197) | def observation_spec(self): method process_observations (line 201) | def process_observations(self, observations): method action_space (line 214) | def action_space(self): method action_spec (line 218) | def action_spec(self): method action_modality (line 223) | def action_modality(self): method num_actions (line 227) | def num_actions(self): method reward_range (line 232) | def reward_range(self): method is_reward_range_finite (line 238) | def is_reward_range_finite(self): method discrete_rewards (line 243) | def discrete_rewards(self): method process_rewards (line 246) | def process_rewards(self, rewards): method is_processed_rewards_discrete (line 267) | def is_processed_rewards_discrete(self): method num_rewards (line 276) | def num_rewards(self): method input_modality (line 298) | def input_modality(self): method reward_modality (line 302) | def reward_modality(self): method input_vocab_size (line 306) | def input_vocab_size(self): method target_modality (line 310) | def target_modality(self): method target_vocab_size (line 314) | def target_vocab_size(self): method unwrapped (line 318) | def unwrapped(self): method seed (line 321) | def seed(self, seed=None): method close (line 324) | def close(self): method _reset (line 327) | def _reset(self, indices): method truncate (line 338) | def truncate(self, indices=None, num_to_keep=1): method reset (line 346) | def reset(self, indices=None): method _render (line 385) | def _render(self, indices, mode="human"): method render (line 397) | def render(self, indices=None, mode="human"): method _step (line 412) | def _step(self, actions): method step (line 423) | def step(self, actions, infos=None): method example_reading_spec (line 458) | def example_reading_spec(self): method hparams (line 486) | def hparams(self, defaults, model_hparams): method agent_id (line 524) | def agent_id(self): method agent_id (line 528) | def agent_id(self, agent_id): method dataset_filename (line 536) | def dataset_filename(self): method num_shards (line 540) | def num_shards(self): method _generate_time_steps (line 546) | def _generate_time_steps(self, trajectory_list): method generate_data (line 605) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method print_state (line 647) | def print_state(self): FILE: tensor2tensor/envs/env_problem_utils.py function done_indices (line 33) | def done_indices(dones): function play_env_problem_randomly (line 38) | def play_env_problem_randomly(env_problem, num_steps): function get_completed_trajectories_from_env (line 57) | def get_completed_trajectories_from_env(env, function play_env_problem_with_policy (line 73) | def play_env_problem_with_policy(env, function make_env (line 221) | def make_env(batch_size=1, FILE: tensor2tensor/envs/env_problem_utils_test.py class EnvProblemUtilsTest (line 32) | class EnvProblemUtilsTest(tf.test.TestCase): method test_play_env_problem_randomly (line 34) | def test_play_env_problem_randomly(self): method test_play_env_problem_with_policy (line 49) | def test_play_env_problem_with_policy(self): FILE: tensor2tensor/envs/gym_env_problem.py function _stack (line 38) | def _stack(xs): class GymEnvProblem (line 45) | class GymEnvProblem(env_problem.EnvProblem): method __init__ (line 87) | def __init__(self, method base_env_name (line 135) | def base_env_name(self): method _verify_same_spaces (line 138) | def _verify_same_spaces(self): method initialize_environments (line 176) | def initialize_environments(self, method assert_common_preconditions (line 229) | def assert_common_preconditions(self): method observation_space (line 237) | def observation_space(self): method action_space (line 241) | def action_space(self): method reward_range (line 245) | def reward_range(self): method seed (line 248) | def seed(self, seed=None): method close (line 264) | def close(self): method _reset (line 277) | def _reset(self, indices): method _step (line 303) | def _step(self, actions): FILE: tensor2tensor/envs/gym_env_problem_test.py class GymEnvProblemTest (line 37) | class GymEnvProblemTest(tf.test.TestCase): method setUp (line 39) | def setUp(self): method tearDown (line 43) | def tearDown(self): method test_setup (line 46) | def test_setup(self): method test_reward_range (line 68) | def test_reward_range(self): method test_default_processed_rewards_discrete (line 82) | def test_default_processed_rewards_discrete(self): method test_interaction_with_env (line 107) | def test_interaction_with_env(self): method read_tfrecord_dataset (line 166) | def read_tfrecord_dataset(self, filenames, ep): method play_env (line 186) | def play_env(self, method test_generate_data (line 235) | def test_generate_data(self): method test_problem_dataset_works (line 276) | def test_problem_dataset_works(self): method test_resets_properly (line 357) | def test_resets_properly(self): method test_per_env_kwargs (line 385) | def test_per_env_kwargs(self): FILE: tensor2tensor/envs/gym_spaces_utils.py function box_space_spec (line 32) | def box_space_spec(box_space, tf_dtype): function discrete_space_spec (line 36) | def discrete_space_spec(discrete_space, tf_dtype): function gym_space_spec (line 41) | def gym_space_spec(gym_space): function gym_space_encode (line 72) | def gym_space_encode(gym_space, observation): function cardinality (line 83) | def cardinality(gym_space): FILE: tensor2tensor/envs/gym_spaces_utils_test.py class GymSpacesUtilsTest (line 29) | class GymSpacesUtilsTest(tf.test.TestCase): method test_discrete_space_spec (line 31) | def test_discrete_space_spec(self): method test_box_space_spec (line 38) | def test_box_space_spec(self): method test_discrete_space_encode (line 45) | def test_discrete_space_encode(self): method test_box_space_encode (line 51) | def test_box_space_encode(self): FILE: tensor2tensor/envs/mujoco_problems.py class ReacherEnvProblem (line 31) | class ReacherEnvProblem(rendered_env_problem.RenderedEnvProblem): method __init__ (line 34) | def __init__(self): method input_modality (line 50) | def input_modality(self): method target_modality (line 54) | def target_modality(self): method action_modality (line 58) | def action_modality(self): method reward_modality (line 62) | def reward_modality(self): method input_vocab_size (line 66) | def input_vocab_size(self): method target_vocab_size (line 70) | def target_vocab_size(self): FILE: tensor2tensor/envs/mujoco_problems_test.py class ReacherEnvProblemTest (line 29) | class ReacherEnvProblemTest(tf.test.TestCase): method test_registration_and_interaction_with_env_problem (line 31) | def test_registration_and_interaction_with_env_problem(self): FILE: tensor2tensor/envs/rendered_env_problem.py class RenderedEnvProblem (line 39) | class RenderedEnvProblem(gym_env_problem.GymEnvProblem, method __init__ (line 54) | def __init__(self, *args, **kwargs): method initialize_environments (line 59) | def initialize_environments(self, method example_reading_spec (line 72) | def example_reading_spec(self): method _generate_time_steps (line 94) | def _generate_time_steps(self, trajectory_list): method num_channels (line 118) | def num_channels(self): method frame_height (line 122) | def frame_height(self): method frame_width (line 126) | def frame_width(self): method total_number_of_frames (line 130) | def total_number_of_frames(self): FILE: tensor2tensor/envs/rendered_env_problem_test.py class RenderedEnvProblemTest (line 29) | class RenderedEnvProblemTest(tf.test.TestCase): method test_generate_timesteps (line 31) | def test_generate_timesteps(self): FILE: tensor2tensor/envs/tic_tac_toe_env.py function encode_pos (line 36) | def encode_pos(i, j): function decode_pos (line 41) | def decode_pos(pos): function get_open_spaces (line 46) | def get_open_spaces(board): function get_reward_and_done (line 56) | def get_reward_and_done(board): class TicTacToeEnv (line 84) | class TicTacToeEnv(gym.Env): method __init__ (line 87) | def __init__(self, strict=False): method seed (line 109) | def seed(self, seed=None): method play_random_move (line 115) | def play_random_move(self): method reset (line 128) | def reset(self): method render (line 138) | def render(self, mode="human"): method step (line 154) | def step(self, action): method hparams (line 188) | def hparams(self, defaults, unused_model_hparams): class DummyPolicyProblemTTT (line 204) | class DummyPolicyProblemTTT(problem.Problem): method __init__ (line 207) | def __init__(self): method hparams (line 211) | def hparams(self, defaults, model_hparams): method num_actions (line 233) | def num_actions(self): function register (line 237) | def register(): FILE: tensor2tensor/envs/tic_tac_toe_env_problem.py class TicTacToeEnvProblem (line 28) | class TicTacToeEnvProblem(gym_env_problem.GymEnvProblem): method __init__ (line 31) | def __init__(self): method input_modality (line 37) | def input_modality(self): method input_vocab_size (line 41) | def input_vocab_size(self): method target_modality (line 46) | def target_modality(self): method target_vocab_size (line 50) | def target_vocab_size(self): method action_modality (line 55) | def action_modality(self): FILE: tensor2tensor/envs/tic_tac_toe_env_problem_test.py class TicTacToeEnvProblemTest (line 30) | class TicTacToeEnvProblemTest(tf.test.TestCase): method test_registration_and_interaction_with_env_problem (line 32) | def test_registration_and_interaction_with_env_problem(self): FILE: tensor2tensor/envs/tic_tac_toe_env_test.py class TicTacToeEnvTest (line 26) | class TicTacToeEnvTest(tf.test.TestCase): method test_start (line 28) | def test_start(self): method test_env_actions (line 49) | def test_env_actions(self): method test_keep_playing (line 61) | def test_keep_playing(self): FILE: tensor2tensor/envs/time_step.py class TimeStep (line 48) | class TimeStep( method replace (line 55) | def replace(self, **kwargs): method create_time_step (line 66) | def create_time_step(cls, FILE: tensor2tensor/envs/time_step_test.py class TimeStepTest (line 27) | class TimeStepTest(tf.test.TestCase): method test_create_time_step (line 29) | def test_create_time_step(self): method test_replace (line 41) | def test_replace(self): FILE: tensor2tensor/envs/trajectory.py function get_pickle_module (line 39) | def get_pickle_module(): class Trajectory (line 45) | class Trajectory(object): method __init__ (line 48) | def __init__(self, time_steps=None): method __str__ (line 55) | def __str__(self): method add_time_step (line 60) | def add_time_step(self, **create_time_step_kwargs): method change_last_time_step (line 71) | def change_last_time_step(self, **replace_time_step_kwargs): method truncate (line 79) | def truncate(self, num_to_keep=1): method last_time_step (line 96) | def last_time_step(self): method num_time_steps (line 102) | def num_time_steps(self): method is_active (line 106) | def is_active(self): method time_steps (line 110) | def time_steps(self): method done (line 114) | def done(self): method reward (line 119) | def reward(self): method observations_np (line 131) | def observations_np(self): method last_n_observations_np (line 134) | def last_n_observations_np(self, n=None): method actions_np (line 140) | def actions_np(self): method info_np (line 145) | def info_np(self): method rewards_np (line 156) | def rewards_np(self): method raw_rewards_np (line 161) | def raw_rewards_np(self): method as_numpy (line 165) | def as_numpy(self): class BatchTrajectory (line 171) | class BatchTrajectory(object): method __init__ (line 174) | def __init__(self, method reset_batch_trajectories (line 189) | def reset_batch_trajectories(self): method __str__ (line 192) | def __str__(self): method trajectories (line 201) | def trajectories(self): method completed_trajectories (line 205) | def completed_trajectories(self): method clear_completed_trajectories (line 208) | def clear_completed_trajectories(self, num=None): method _complete_trajectory (line 215) | def _complete_trajectory(self, trajectory, index): method truncate_trajectories (line 229) | def truncate_trajectories(self, indices, num_to_keep=1): method reset (line 252) | def reset(self, indices, observations): method complete_all_trajectories (line 299) | def complete_all_trajectories(self): method step (line 310) | def step(self, method _trajectory_lengths (line 397) | def _trajectory_lengths(trajectories): method num_completed_time_steps (line 401) | def num_completed_time_steps(self): method num_time_steps (line 407) | def num_time_steps(self): method trajectory_lengths (line 414) | def trajectory_lengths(self): method num_completed_trajectories (line 418) | def num_completed_trajectories(self): method observations_np (line 424) | def observations_np(self, boundary=20, len_history_for_policy=20): method parse_trajectory_file_name (line 463) | def parse_trajectory_file_name(trajectory_file_name): method load_from_directory (line 492) | def load_from_directory(trajectory_dir, FILE: tensor2tensor/envs/trajectory_test.py class TrajectoryTest (line 30) | class TrajectoryTest(tf.test.TestCase): method test_empty_trajectory (line 32) | def test_empty_trajectory(self): method test_add_time_step (line 38) | def test_add_time_step(self): method test_change_last_time_step (line 54) | def test_change_last_time_step(self): method test_reward (line 81) | def test_reward(self): method test_observation_np (line 96) | def test_observation_np(self): method test_truncate_and_last_n_observations_np (line 105) | def test_truncate_and_last_n_observations_np(self): method test_as_numpy (line 134) | def test_as_numpy(self): class BatchTrajectoryTest (line 181) | class BatchTrajectoryTest(tf.test.TestCase): method get_random_observations_rewards_actions_dones (line 186) | def get_random_observations_rewards_actions_dones(self, batch_size=None): method test_creation (line 197) | def test_creation(self): method test_reset_all (line 203) | def test_reset_all(self): method test_num_time_steps (line 217) | def test_num_time_steps(self): method test_reset_some (line 223) | def test_reset_some(self): method test_truncate (line 242) | def test_truncate(self): method test_step (line 285) | def test_step(self): method test_desired_placement_of_rewards_and_actions (line 318) | def test_desired_placement_of_rewards_and_actions(self): method test_observations_np (line 371) | def test_observations_np(self): method test_parse_trajectory_file_name (line 476) | def test_parse_trajectory_file_name(self): method test_load_from_directory (line 487) | def test_load_from_directory(self): FILE: tensor2tensor/insights/graph.py class Vertex (line 19) | class Vertex(object): method __init__ (line 29) | def __init__(self, idx): method to_dict (line 39) | def to_dict(self): class Edge (line 51) | class Edge(object): method __init__ (line 62) | def __init__(self, idx): method to_dict (line 73) | def to_dict(self): method __str__ (line 85) | def __str__(self): class Graph (line 89) | class Graph(object): method __init__ (line 97) | def __init__(self): method new_vertex (line 102) | def new_vertex(self): method get_vertex (line 112) | def get_vertex(self, key): method add_edge (line 128) | def add_edge(self, source, target): method to_dict (line 146) | def to_dict(self): FILE: tensor2tensor/insights/polymer/attention_visualization/attention-visualization.js class AttentionVisualization (line 28) | class AttentionVisualization extends Polymer.Element { method constructor (line 29) | constructor() { method is (line 66) | static get is() { method properties (line 73) | static get properties() { method observers (line 94) | static get observers() { method ready (line 104) | ready() { method zoomDepthChanged_ (line 114) | zoomDepthChanged_(zoomDepth) { method dataUpdated_ (line 129) | dataUpdated_(newData) { method reset_ (line 310) | reset_() { FILE: tensor2tensor/insights/polymer/explore_view/explore-view.js class ExploreView (line 29) | class ExploreView extends Polymer.Element { method is (line 33) | static get is() { method properties (line 40) | static get properties() { method observers (line 74) | static get observers() { method ready (line 83) | ready() { method refresh (line 93) | refresh() { method modelChanged_ (line 104) | modelChanged_(queryData, model) { method translate_ (line 122) | translate_() { method createBodyValue_ (line 146) | createBodyValue_(params) { method handleTranslationResponse_ (line 178) | handleTranslationResponse_(event) { method addRule_ (line 191) | addRule_() { method deleteRule_ (line 205) | deleteRule_(e) { FILE: tensor2tensor/insights/polymer/graph_visualization/graph-visualization.js class GraphVisualization (line 32) | class GraphVisualization extends Polymer.Element { method constructor (line 33) | constructor() { method is (line 111) | static get is() { method properties (line 118) | static get properties() { method observers (line 164) | static get observers() { method ready (line 174) | ready() { method zoomDepthChanged_ (line 186) | zoomDepthChanged_(zoomDepth) { method dataUpdated_ (line 203) | dataUpdated_() { method propagateLabel_ (line 265) | propagateLabel_(node) { method addChildToTree_ (line 297) | addChildToTree_(tree, currentEdge, nodes, edges) { method createSVG_ (line 350) | createSVG_() { method plotTree_ (line 419) | plotTree_(root) { method reset_ (line 523) | reset_() { method displayNumber (line 536) | displayNumber(value) { method startStepMode_ (line 544) | startStepMode_() { method exitStepMode_ (line 553) | exitStepMode_() { method startTranslation_ (line 562) | startTranslation_() { method handleStartError_ (line 580) | handleStartError_() { method handleStartResponse_ (line 589) | handleStartResponse_() { method handleGenerateError_ (line 625) | handleGenerateError_() { method handleGenerateResponse_ (line 633) | handleGenerateResponse_() { method drawInteractiveTree_ (line 680) | drawInteractiveTree_(rootNode) { method step_ (line 799) | step_(opt_skipNext) { FILE: tensor2tensor/insights/polymer/insights_app/insights-app.js class InsightsApp (line 26) | class InsightsApp extends Polymer.Element { method is (line 30) | static get is() { method properties (line 37) | static get properties() { method observers (line 52) | static get observers() { method routePageChanged_ (line 63) | routePageChanged_(page) { FILE: tensor2tensor/insights/polymer/language_selector/language-selector-content.js class LanguageSelectorContent (line 34) | class LanguageSelectorContent extends Polymer.Element { method is (line 38) | static get is() { method properties (line 45) | static get properties() { method observers (line 74) | static get observers() { method forceSelection (line 86) | forceSelection(language) { method languagesUpdated_ (line 102) | languagesUpdated_(newLanguages) { method selectDefault_ (line 120) | selectDefault_(languages, renderedItemCount) { method enterPressed_ (line 151) | enterPressed_() { method filterUpdated_ (line 169) | filterUpdated_(newFilter) { method isShown_ (line 187) | isShown_(language) { method languageMatchesQuery_ (line 198) | languageMatchesQuery_(language, filter) { method select_ (line 210) | select_(e) { method updateSelected_ (line 221) | updateSelected_(ele) { FILE: tensor2tensor/insights/polymer/language_selector/language-selector.js class LanguageSelector (line 33) | class LanguageSelector extends Polymer.Element { method is (line 37) | static get is() { method properties (line 44) | static get properties() { method forceSelection (line 80) | forceSelection(language) { FILE: tensor2tensor/insights/polymer/processing_visualization/processing-visualization.js class ProcessingVisualization (line 29) | class ProcessingVisualization extends Polymer.Element { method is (line 33) | static get is() { method properties (line 40) | static get properties() { FILE: tensor2tensor/insights/polymer/query_card/query-card.js class QueryCard (line 35) | class QueryCard extends Polymer.Element { method constructor (line 36) | constructor() { method is (line 57) | static get is() { method properties (line 64) | static get properties() { method observers (line 117) | static get observers() { method routeActiveUpdated_ (line 137) | routeActiveUpdated_(routeActive) { method sourceLanguagesUpdated_ (line 150) | sourceLanguagesUpdated_(sourceLanguages, routeData) { method sourceLanguageUpdated_ (line 167) | sourceLanguageUpdated_(sourceLanguage) { method targetLanguagesUpdated_ (line 191) | targetLanguagesUpdated_(targetLanguages, routeData) { method targetLanguageUpdated_ (line 208) | targetLanguageUpdated_(targetLanguage) { method modelListUpdated_ (line 232) | modelListUpdated_(modelList, routeData) { method modelUpdated_ (line 261) | modelUpdated_(model) { method modelsUpdated_ (line 275) | modelsUpdated_(modelConfigurations) { function sort_ (line 331) | function sort_(a, b) { FILE: tensor2tensor/insights/polymer/translation_result/translation-result.js class TranslationResult (line 30) | class TranslationResult extends Polymer.Element { method is (line 34) | static get is() { method properties (line 41) | static get properties() { method resultUpdated_ (line 75) | resultUpdated_() { FILE: tensor2tensor/insights/query_processor.py class QueryProcessor (line 19) | class QueryProcessor(object): method process (line 29) | def process(self, query): FILE: tensor2tensor/insights/server.py class NumpySerializationFix (line 48) | class NumpySerializationFix(JSONEncoder): method default (line 51) | def default(self, obj): class DebugFrontendApplication (line 60) | class DebugFrontendApplication(BaseApplication): method __init__ (line 68) | def __init__(self, app, options=None): method load_config (line 79) | def load_config(self): method load (line 86) | def load(self): function main (line 95) | def main(_): FILE: tensor2tensor/insights/transformer_model.py function topk_watch_fn (line 47) | def topk_watch_fn(feeds, fetches): function seq_filter (line 64) | def seq_filter(datum, tensor): function scores_filter (line 78) | def scores_filter(datum, tensor): function sequence_key (line 92) | def sequence_key(sequence): class TransformerModel (line 97) | class TransformerModel(query_processor.QueryProcessor): method __init__ (line 105) | def __init__(self, processor_configuration): method process (line 146) | def process(self, query): FILE: tensor2tensor/layers/area_attention.py function lengths_to_area_mask (line 27) | def lengths_to_area_mask(feature_length, length, max_area_size): function _pool_one_shape (line 47) | def _pool_one_shape(features_2d, area_width, area_height, batch_size, function basic_pool (line 78) | def basic_pool(features, max_area_width, max_area_height=1, height=1, function _compute_sum_image (line 131) | def _compute_sum_image(features, max_area_width, max_area_height=1, heig... function compute_area_features (line 199) | def compute_area_features(features, max_area_width, max_area_height=1, h... function compute_area_key (line 234) | def compute_area_key(features, max_area_width, max_area_height=1, height=1, function dot_product_area_attention (line 305) | def dot_product_area_attention(q, FILE: tensor2tensor/layers/area_attention_test.py class AreaAttentionTest (line 28) | class AreaAttentionTest(parameterized.TestCase, tf.test.TestCase): method testComputeAreaFeatures1D (line 30) | def testComputeAreaFeatures1D(self): method testComputeAreaFeatures2D (line 86) | def testComputeAreaFeatures2D(self): method testAreaMean (line 163) | def testAreaMean(self): method test2DAreaMax (line 196) | def test2DAreaMax(self): method test1DAreaMax (line 230) | def test1DAreaMax(self): FILE: tensor2tensor/layers/common_attention.py function layers (line 47) | def layers(): function large_compatible_negative (line 51) | def large_compatible_negative(tensor_type): function mixed_precision_is_enabled (line 68) | def mixed_precision_is_enabled( function maybe_upcast (line 79) | def maybe_upcast(logits, function get_standardized_layers (line 93) | def get_standardized_layers(hparams, dp=None): function add_standard_attention_hparams (line 304) | def add_standard_attention_hparams(hparams): function encoder_decoder_attention_loss (line 349) | def encoder_decoder_attention_loss(expected_attention_logits, function get_timing_signal_1d (line 408) | def get_timing_signal_1d(length, function add_timing_signal_1d (line 460) | def add_timing_signal_1d(x, function get_layer_timing_signal_learned_1d (line 500) | def get_layer_timing_signal_learned_1d(channels, layer, num_layers): function add_layer_timing_signal_learned_1d (line 524) | def add_layer_timing_signal_learned_1d(x, layer, num_layers): function get_layer_timing_signal_sinusoid_1d (line 544) | def get_layer_timing_signal_sinusoid_1d(channels, layer, num_layers): function add_layer_timing_signal_sinusoid_1d (line 563) | def add_layer_timing_signal_sinusoid_1d(x, layer, num_layers): function add_timing_signals_given_positions (line 582) | def add_timing_signals_given_positions(x, function add_timing_signals_from_features (line 627) | def add_timing_signals_from_features(x, function add_timing_signal_1d_given_position (line 653) | def add_timing_signal_1d_given_position(x, function add_timing_signal_nd (line 685) | def add_timing_signal_nd(x, min_timescale=1.0, max_timescale=1.0e4): function add_positional_embedding (line 741) | def add_positional_embedding(x, max_length, name=None, positions=None): function add_positional_embedding_nd (line 767) | def add_positional_embedding_nd(x, max_length, name=None): function make_edge_vectors (line 803) | def make_edge_vectors(adjacency_matrix, num_edge_types, depth, name=None): class LshGating (line 837) | class LshGating(object): method __init__ (line 840) | def __init__(self, depth, nb_hyperplanes, nb_replicat=1, trainable=Fal... method _idx_to_bits (line 878) | def _idx_to_bits(self, i): method get_gates (line 884) | def get_gates(self, x): function embedding_to_padding (line 918) | def embedding_to_padding(emb): function padding_to_length (line 935) | def padding_to_length(padding): function attention_bias_local (line 948) | def attention_bias_local(length, max_backward, max_forward): function attention_bias_lower_triangle (line 976) | def attention_bias_lower_triangle(length): function attention_bias_same_segment (line 991) | def attention_bias_same_segment(query_segment_id, memory_segment_id): function attention_bias_ignore_padding (line 1012) | def attention_bias_ignore_padding(memory_padding): function attention_bias_to_padding (line 1026) | def attention_bias_to_padding(attention_bias, function attention_bias_prepend_inputs_full_attention (line 1045) | def attention_bias_prepend_inputs_full_attention(padding): function attention_bias_proximal (line 1079) | def attention_bias_proximal(length): function attention_bias_batch (line 1094) | def attention_bias_batch(batch_coordinates_q, function split_last_dimension (line 1145) | def split_last_dimension(x, n): function combine_last_two_dimensions (line 1165) | def combine_last_two_dimensions(x): function combine_first_two_dimensions (line 1180) | def combine_first_two_dimensions(x): function split_heads (line 1198) | def split_heads(x, num_heads): function split_heads_2d (line 1212) | def split_heads_2d(x, num_heads): function split_heads_nd (line 1225) | def split_heads_nd(x, num_heads): function combine_heads (line 1242) | def combine_heads(x): function combine_heads_2d (line 1255) | def combine_heads_2d(x): function combine_heads_nd (line 1268) | def combine_heads_nd(x): function attention_image_summary (line 1283) | def attention_image_summary(attn, image_shapes=None): function grouped_attention_multihead (line 1327) | def grouped_attention_multihead(query_antecedent, function harden_attention_weights (line 1582) | def harden_attention_weights(weights, k, gumbel_noise_weight): function dot_product_attention (line 1602) | def dot_product_attention(q, function _generate_relative_positions_matrix (line 1670) | def _generate_relative_positions_matrix(length_q, length_k, function _generate_relative_positions_embeddings (line 1691) | def _generate_relative_positions_embeddings(length_q, length_k, depth, function _relative_attention_inner (line 1705) | def _relative_attention_inner(x, y, z, transpose): function dot_product_attention_relative (line 1739) | def dot_product_attention_relative(q, function _relative_position_to_absolute_position_masked (line 1830) | def _relative_position_to_absolute_position_masked(x): function _absolute_position_to_relative_position_masked (line 1857) | def _absolute_position_to_relative_position_masked(x): function get_relative_embeddings_left (line 1884) | def get_relative_embeddings_left(max_relative_position, length, depth, function dot_product_self_attention_relative_v2 (line 1934) | def dot_product_self_attention_relative_v2(q, function _absolute_position_to_relative_position_unmasked (line 2035) | def _absolute_position_to_relative_position_unmasked(x): function get_relative_embeddings_left_right (line 2066) | def get_relative_embeddings_left_right(max_relative_position, length, de... function dot_product_unmasked_self_attention_relative_v2 (line 2118) | def dot_product_unmasked_self_attention_relative_v2( function _matmul_with_relative_keys_2d (line 2216) | def _matmul_with_relative_keys_2d(x, y, heads_share_relative_embedding): function dot_product_unmasked_self_attention_relative_2d (line 2225) | def dot_product_unmasked_self_attention_relative_2d( function _split_along_width (line 2367) | def _split_along_width(x_left_right_blocks): function _get_left_right_blocks (line 2407) | def _get_left_right_blocks(x): function _extract_blocks (line 2446) | def _extract_blocks(x, block_h, block_w): function get_2d_local_memory (line 2465) | def get_2d_local_memory(x, query_shape, memory_flange): function get_2d_local_memory_v2 (line 2546) | def get_2d_local_memory_v2(x, query_shape, memory_flange): function dot_product_unmasked_attention_local_2d_tpu (line 2587) | def dot_product_unmasked_attention_local_2d_tpu( function dot_product_unmasked_attention_local_2d_tpu_simple (line 2679) | def dot_product_unmasked_attention_local_2d_tpu_simple( function masked_within_block_local_attention_1d (line 2757) | def masked_within_block_local_attention_1d(q, k, v, block_length=64, nam... function _relative_position_to_absolute_position_unmasked (line 2813) | def _relative_position_to_absolute_position_unmasked(x): function masked_local_attention_1d (line 2843) | def masked_local_attention_1d(q, function _make_local_block (line 2954) | def _make_local_block(x, depth, batch, heads, num_blocks, block_length): function masked_relative_local_attention_1d (line 2964) | def masked_relative_local_attention_1d(q, function matmul_with_relative_values (line 3175) | def matmul_with_relative_values(x, y, heads_share_relative_embedding): function matmul_with_relative_keys (line 3183) | def matmul_with_relative_keys(x, y, heads_share_relative_embedding): function local_attention_1d (line 3191) | def local_attention_1d(q, k, v, block_length=128, filter_width=100, name... function reshape_by_blocks (line 3296) | def reshape_by_blocks(x, x_shape, memory_block_size): function dilated_self_attention_1d (line 3315) | def dilated_self_attention_1d(q, function gather_dilated_memory_blocks (line 3435) | def gather_dilated_memory_blocks(x, function masked_dilated_self_attention_1d (line 3481) | def masked_dilated_self_attention_1d(q, function local_attention_2d (line 3594) | def local_attention_2d(q, function pad_to_multiple_2d (line 3665) | def pad_to_multiple_2d(x, block_shape): function reshape_range (line 3693) | def reshape_range(tensor, i, j, shape): function gather_blocks_2d (line 3700) | def gather_blocks_2d(x, indices): function scatter_blocks_2d (line 3711) | def scatter_blocks_2d(x, indices, shape): function gather_indices_2d (line 3724) | def gather_indices_2d(x, block_shape, block_stride): function make_2d_block_raster_mask (line 3748) | def make_2d_block_raster_mask(query_shape, memory_flange): function get_memory_region (line 3788) | def get_memory_region(x, query_block_shape, memory_flange, q_indices): function get_shifted_center_blocks (line 3842) | def get_shifted_center_blocks(x, indices): function right_shift_blockwise (line 3866) | def right_shift_blockwise(x, query_shape, name=None): function right_shift_blockwise_nd (line 3899) | def right_shift_blockwise_nd(x, block_shape): function masked_local_attention_2d (line 3920) | def masked_local_attention_2d(q, function masked_local_attention_nd (line 4013) | def masked_local_attention_nd(q, function select_block_for_decode_step (line 4137) | def select_block_for_decode_step(blocked_x, decode_step, query_shape): function flatten_blocks_nd (line 4166) | def flatten_blocks_nd(x): function unflatten_blocks_nd (line 4181) | def unflatten_blocks_nd(x, blocks_per_dimension): function break_into_memory_blocks_nd (line 4197) | def break_into_memory_blocks_nd(x, query_shape, memory_flange, masked=Fa... function break_into_blocks_nd (line 4250) | def break_into_blocks_nd(x, block_shape): function put_back_blocks_nd (line 4275) | def put_back_blocks_nd(x, block_shape): function pad_to_multiple_nd (line 4302) | def pad_to_multiple_nd(x, block_shape): function causal_attention_bias_nd (line 4317) | def causal_attention_bias_nd(query_shape, memory_flange, decode_step=None): function compute_attention_component (line 4370) | def compute_attention_component(antecedent, function compute_qkv (line 4423) | def compute_qkv(query_antecedent, function multihead_attention (line 4481) | def multihead_attention(query_antecedent, function multihead_attention_2d (line 4827) | def multihead_attention_2d(query_antecedent, function multihead_attention_nd (line 4893) | def multihead_attention_nd(query_antecedent, function decode_step_to_index (line 5001) | def decode_step_to_index(decode_step, query_shape, tensor_shape): function get_item_at_decode_step (line 5036) | def get_item_at_decode_step(x, decode_step, query_shape): function put_item_in_decode_step (line 5056) | def put_item_in_decode_step(x, item, decode_step, query_shape): function ffn_self_attention_layer (line 5093) | def ffn_self_attention_layer(x, function parameter_attention (line 5158) | def parameter_attention(x, function coordinate_tensor (line 5231) | def coordinate_tensor(shape, axis): function self_attention_expert (line 5251) | def self_attention_expert(x, function local_expert_attention (line 5360) | def local_expert_attention(x, function expert_dot_product (line 5410) | def expert_dot_product(q, k, v, info_q, info_k): function dot_product_single_head (line 5475) | def dot_product_single_head(q, k, v, gates_q, gates_k, bi): function map_fn_switch (line 5536) | def map_fn_switch(fn, elems, use_map_fn=True, **kwargs): function sparse_dot_product_attention (line 5565) | def sparse_dot_product_attention(q, k, v, bi, use_map_fn, experts_params): function dot_product_batched_head (line 5662) | def dot_product_batched_head(q, k, v, gates_q, gates_k, mask_right=False): function sparse_dot_product_attention_truncated (line 5734) | def sparse_dot_product_attention_truncated( function deconv_elems_1d (line 5841) | def deconv_elems_1d(x, factor, out_depth=None): function conv_elems_1d (line 5869) | def conv_elems_1d(x, factor, out_depth=None): function local_reduction_attention (line 5901) | def local_reduction_attention(x, block_length, multihead_params): function multihead_self_attention_reduced (line 5984) | def multihead_self_attention_reduced( function scaled_dot_product_attention_simple (line 6078) | def scaled_dot_product_attention_simple(q, k, v, bias, name=None): function multihead_self_attention_memory_efficient (line 6107) | def multihead_self_attention_memory_efficient(x, FILE: tensor2tensor/layers/common_attention_test.py class CommonAttentionTest (line 40) | class CommonAttentionTest(parameterized.TestCase, tf.test.TestCase): method testAttentionBiasLocal (line 43) | def testAttentionBiasLocal(self): method testAddPositionalEmbedding (line 58) | def testAddPositionalEmbedding(self): method testHardenAttentionWeights (line 74) | def testHardenAttentionWeights(self, gumbel_noise_weight): method testHardenAttentionAllZeros (line 86) | def testHardenAttentionAllZeros(self, gumbel_noise_weight): method testAddPositionalEmbeddingNd (line 101) | def testAddPositionalEmbeddingNd(self, input_shape): method testAddTimingSignalsGivenPositions (line 112) | def testAddTimingSignalsGivenPositions(self): method testAddTimingSignalsGivenPositionsEquivalent (line 165) | def testAddTimingSignalsGivenPositionsEquivalent(self): method testDotProductAttention (line 175) | def testDotProductAttention(self): method testSplitHeadsND (line 190) | def testSplitHeadsND(self, shape, num_heads): method testCombineHeadsND (line 203) | def testCombineHeadsND(self, shape): method testShapeMaskedLocalAttentionND (line 215) | def testShapeMaskedLocalAttentionND(self, shape, query_shape, memory_f... method testRightShiftBlockwiseND (line 223) | def testRightShiftBlockwiseND(self): method testContentMaskedLocalAttentionND (line 241) | def testContentMaskedLocalAttentionND(self): method testSelectBlockForDecodeStep (line 295) | def testSelectBlockForDecodeStep(self): method testFlattenBlocksND (line 309) | def testFlattenBlocksND(self, shape): method testUnflattenBlocksND (line 321) | def testUnflattenBlocksND(self, blocks_per_dim): method testBreakIntoMemoryBlocksND (line 328) | def testBreakIntoMemoryBlocksND(self): method testBreakIntoBlocksND (line 365) | def testBreakIntoBlocksND(self): method testPutBackBlocksND (line 382) | def testPutBackBlocksND(self): method testPadToMultipleND (line 403) | def testPadToMultipleND(self, tensor_shape, block_shape, expected_shape): method testCausalAttentionBiasND (line 410) | def testCausalAttentionBiasND(self): method testMultiheadAttentionND (line 426) | def testMultiheadAttentionND(self, tensor_shape, query_shape, memory_f... method testDecodeStepToIndex (line 446) | def testDecodeStepToIndex(self, decode_step, query_shape, tensor_shape, method testGetItemAtDecodeStep (line 453) | def testGetItemAtDecodeStep(self): method testPutItemAtDecodeStep (line 461) | def testPutItemAtDecodeStep(self): method testMaskedWithinBlockLocalAttention1D (line 477) | def testMaskedWithinBlockLocalAttention1D(self, batch, heads, length, method testMaskedLocalAttention1D (line 500) | def testMaskedLocalAttention1D(self, batch, heads, length, depth_k, de... method testMaskedLocalAttention2D (line 524) | def testMaskedLocalAttention2D(self, batch, heads, length, depth_k, de... method testLocalUnmaskedAttention1D (line 550) | def testLocalUnmaskedAttention1D(self, batch, heads, length, method testLocalUnmaskedAttention2D (line 573) | def testLocalUnmaskedAttention2D(self, batch, heads, length, method testMultiheadSelfAttentionMemoryEfficient (line 594) | def testMultiheadSelfAttentionMemoryEfficient(self): method test2dGatherAndScatterInvertibility (line 639) | def test2dGatherAndScatterInvertibility(self): method test2dBlockRasterScanMask (line 658) | def test2dBlockRasterScanMask(self): method test2dGather (line 681) | def test2dGather(self): method testGetMemoryRegion (line 720) | def testGetMemoryRegion(self): method testGetShiftedCenterBlocks (line 797) | def testGetShiftedCenterBlocks(self): method testDotProductAttentionRelative (line 862) | def testDotProductAttentionRelative(self): method testRelativeAttentionV2 (line 876) | def testRelativeAttentionV2(self): method testRelativeAttentionV2SharedRel (line 893) | def testRelativeAttentionV2SharedRel(self): method testRelativeAttentionV2MaxRelativeLargerThanLength (line 910) | def testRelativeAttentionV2MaxRelativeLargerThanLength(self): method testDotProductUnMaskedAttentionRelativeV2 (line 927) | def testDotProductUnMaskedAttentionRelativeV2(self): method testExtractblocks (line 941) | def testExtractblocks(self): method python_get_2d_local_memory (line 967) | def python_get_2d_local_memory(self, t, batch_size, num_heads, height,... method testGet2dLocalMemory (line 995) | def testGet2dLocalMemory(self): method testSplitAlongWidth (line 1029) | def testSplitAlongWidth(self): method testGetLeftRightBlocks (line 1073) | def testGetLeftRightBlocks(self): method testDotProductUnmaskedAttentionLocal2dTpu (line 1128) | def testDotProductUnmaskedAttentionLocal2dTpu(self): method testDotProductUnmaskedAttentionLocal2dTpuSimple (line 1215) | def testDotProductUnmaskedAttentionLocal2dTpuSimple(self): method python_relative_att (line 1282) | def python_relative_att(self, q, k, v, batch, num_heads, height, width, method testDotProductUnMaskedAttentionRelative2d (line 1351) | def testDotProductUnMaskedAttentionRelative2d(self): method testDotProductUnMaskedAttentionRelative2dSharedOneRow (line 1389) | def testDotProductUnMaskedAttentionRelative2dSharedOneRow( method testRelativeAttentionV2Unmasked (line 1416) | def testRelativeAttentionV2Unmasked(self): method testRelativeAttentionV2UnmaskedSharedRel (line 1433) | def testRelativeAttentionV2UnmaskedSharedRel(self): method testRelativeAttentionV2UnmaskedRelativeLargerThanLength (line 1450) | def testRelativeAttentionV2UnmaskedRelativeLargerThanLength(self): method testMaskedRelativeLocalAttentionV2 (line 1467) | def testMaskedRelativeLocalAttentionV2(self): method testMaskedRelativeLocalAttentionV2AddRelativeValues (line 1485) | def testMaskedRelativeLocalAttentionV2AddRelativeValues(self): method testMaskedRelativeLocalAttentionV2SeqShorterThanBlockLength (line 1503) | def testMaskedRelativeLocalAttentionV2SeqShorterThanBlockLength(self): method testMaskedRelativeLocalAttentionV2SeqShorterThanTwiceBlockLength (line 1520) | def testMaskedRelativeLocalAttentionV2SeqShorterThanTwiceBlockLength(s... method testBiasBatchCoordinates (line 1536) | def testBiasBatchCoordinates(self): method testBiasFuture (line 1560) | def testBiasFuture(self): method testMultiheadAttentionWithLayerCollection (line 1584) | def testMultiheadAttentionWithLayerCollection(self): method testDilatedAttention (line 1599) | def testDilatedAttention(self, batch, heads, length, depth_v, block_le... method testMaskedDilatedAttention (line 1624) | def testMaskedDilatedAttention(self, batch, heads, length, depth_v, FILE: tensor2tensor/layers/common_audio.py function add_delta_deltas (line 28) | def add_delta_deltas(filterbanks, name=None): function compute_mel_filterbank_features (line 55) | def compute_mel_filterbank_features( FILE: tensor2tensor/layers/common_hparams.py function basic_params1 (line 29) | def basic_params1(): class RangedHParams (line 356) | class RangedHParams(object): method __init__ (line 370) | def __init__(self): method _check_reset_and_type_change (line 376) | def _check_reset_and_type_change(self, name, orig_ctr): method set_categorical (line 401) | def set_categorical(self, name, categories, length=None): method set_discrete (line 405) | def set_discrete(self, name, feasible_points, scale=None, length=None): method set_float (line 409) | def set_float(self, name, min_val, max_val, scale=None, length=None): method set_int (line 413) | def set_int(self, name, min_val, max_val, scale=None, length=None): method fix_select_params (line 417) | def fix_select_params(self, hp): method to_parameter_specs (line 428) | def to_parameter_specs(self, name_prefix=""): function basic_range1 (line 475) | def basic_range1(ranged_hparams): function basic_moe_range (line 503) | def basic_moe_range(rhp): FILE: tensor2tensor/layers/common_image_attention.py class AttentionType (line 33) | class AttentionType(object): method get_choices (line 46) | def get_choices(): class DistributionType (line 60) | class DistributionType(object): method get_choices (line 66) | def get_choices(): function maybe_reshape_4d_to_3d (line 73) | def maybe_reshape_4d_to_3d(x): function local_attention_2d (line 83) | def local_attention_2d(x, hparams, attention_type="local_attention_2d"): function local_within_block_attention (line 101) | def local_within_block_attention(x, function local_attention_1d (line 132) | def local_attention_1d(x, function get_dilated_1d_attention_mask (line 165) | def get_dilated_1d_attention_mask( function dilated_attention_1d (line 191) | def dilated_attention_1d(x, function local_global_attention (line 226) | def local_global_attention(x, function full_self_attention (line 273) | def full_self_attention(x, function encdec_attention_1d (line 303) | def encdec_attention_1d(x, function transformer_decoder_layers (line 328) | def transformer_decoder_layers(inputs, function transformer_encoder_layers (line 400) | def transformer_encoder_layers(inputs, function ffn_layer (line 435) | def ffn_layer(x, hparams, losses=None): function get_self_attention_bias (line 485) | def get_self_attention_bias(x): function postprocess_image (line 501) | def postprocess_image(x, rows, cols, hparams): function prepare_encoder (line 559) | def prepare_encoder(inputs, hparams, attention_type="local_1d"): function prepare_decoder (line 573) | def prepare_decoder(targets, hparams): function prepare_image (line 633) | def prepare_image(inputs, hparams, name=None): function create_output (line 640) | def create_output(decoder_output, rows, cols, targets, hparams): function get_channel_embeddings (line 676) | def get_channel_embeddings(io_depth, targets, hidden_size, name="channel"): function add_pos_signals (line 694) | def add_pos_signals(x, hparams, name="pos_emb"): FILE: tensor2tensor/layers/common_image_attention_test.py class CommonImageAttentionTest (line 31) | class CommonImageAttentionTest(parameterized.TestCase, tf.test.TestCase): method testPostProcessImageTrainMode (line 37) | def testPostProcessImageTrainMode(self, likelihood, num_mixtures, depth): method testPostProcessImageInferMode (line 57) | def testPostProcessImageInferMode(self, likelihood, num_mixtures, depth): method testCreateOutputTrainMode (line 85) | def testCreateOutputTrainMode(self, likelihood, num_mixtures, depth): method testTransformerDecoderLayersGlobal (line 112) | def testTransformerDecoderLayersGlobal(self): FILE: tensor2tensor/layers/common_layers.py function layers (line 41) | def layers(): function convert_gradient_to_tensor (line 61) | def convert_gradient_to_tensor(x): function is_xla_compiled (line 81) | def is_xla_compiled(): function to_float (line 97) | def to_float(x): function dropout_with_broadcast_dims (line 102) | def dropout_with_broadcast_dims(x, keep_prob, broadcast_dims=None, **kwa... function comma_separated_string_to_integer_list (line 132) | def comma_separated_string_to_integer_list(s): function saturating_sigmoid (line 136) | def saturating_sigmoid(x): function hard_sigmoid (line 143) | def hard_sigmoid(x, saturation_limit=0.9): function hard_tanh (line 149) | def hard_tanh(x, saturation_limit=0.9): function inverse_exp_decay (line 154) | def inverse_exp_decay(max_step, min_value=0.01, step=None): function inverse_lin_decay (line 165) | def inverse_lin_decay(max_step, min_value=0.01, step=None): function inverse_sigmoid_decay (line 176) | def inverse_sigmoid_decay(max_step, min_value=0.01, step=None): function shakeshake2_py (line 214) | def shakeshake2_py(x, y, equal=False, individual=False): function shakeshake2_grad (line 227) | def shakeshake2_grad(x1, x2, dy): function shakeshake2_indiv_grad (line 235) | def shakeshake2_indiv_grad(x1, x2, dy): function shakeshake2_equal_grad (line 243) | def shakeshake2_equal_grad(x1, x2, dy): function shakeshake2 (line 251) | def shakeshake2(x1, x2): function shakeshake2_indiv (line 257) | def shakeshake2_indiv(x1, x2): function shakeshake2_eqgrad (line 262) | def shakeshake2_eqgrad(x1, x2): function shakeshake (line 267) | def shakeshake(xs, equal_grad=False): function convert_rgb_to_real (line 279) | def convert_rgb_to_real(x): function convert_rgb_to_symmetric_real (line 287) | def convert_rgb_to_symmetric_real(x): function convert_real_to_rgb (line 297) | def convert_real_to_rgb(x): function expand_squeeze_to_nd (line 304) | def expand_squeeze_to_nd(x, n, squeeze_dim=2, expand_dim=-1): function standardize_images (line 315) | def standardize_images(x): function flatten4d3d (line 328) | def flatten4d3d(x): function gather (line 336) | def gather(params, indices, dtype=tf.float32): function cumsum (line 348) | def cumsum(x, axis=0, exclusive=False): function dropout_no_scaling (line 380) | def dropout_no_scaling(x, keep_prob): function embedding (line 396) | def embedding(x, function shift_right (line 427) | def shift_right(x, pad_value=None): function shift_right_3d (line 436) | def shift_right_3d(x, pad_value=None): function shift_right_2d (line 445) | def shift_right_2d(x, pad_value=None): function conv_stride2_multistep (line 454) | def conv_stride2_multistep(x, nbr_steps, output_filters, name=None, reus... function deconv_stride2_multistep (line 490) | def deconv_stride2_multistep(x, function conv_internal (line 553) | def conv_internal(conv_fn, inputs, filters, kernel_size, **kwargs): function conv (line 591) | def conv(inputs, filters, kernel_size, dilation_rate=(1, 1), **kwargs): function conv1d (line 603) | def conv1d(inputs, filters, kernel_size, dilation_rate=1, **kwargs): function separable_conv (line 610) | def separable_conv(inputs, filters, kernel_size, **kwargs): function subseparable_conv (line 616) | def subseparable_conv(inputs, filters, kernel_size, **kwargs): function tpu_conv1d (line 654) | def tpu_conv1d(inputs, filters, kernel_size, padding="SAME", name="tpu_c... function layer_norm_vars (line 688) | def layer_norm_vars(filters): function layer_norm_compute (line 697) | def layer_norm_compute(x, epsilon, scale, bias, layer_collection=None): function layer_norm (line 715) | def layer_norm(x, function group_norm (line 731) | def group_norm(x, filters=None, num_groups=8, epsilon=1e-5): function noam_norm (line 752) | def noam_norm(x, epsilon=1.0, name=None): function l2_norm (line 761) | def l2_norm(x, filters=None, epsilon=1e-6, name=None, reuse=None): function apply_spectral_norm (line 778) | def apply_spectral_norm(x): function apply_norm (line 818) | def apply_norm(x, norm_type, depth, epsilon, layer_collection=None): function zero_add (line 839) | def zero_add(previous_value, x, name=None, reuse=None): function layer_prepostprocess (line 861) | def layer_prepostprocess(previous_value, function layer_preprocess (line 921) | def layer_preprocess(layer_input, hparams, layer_collection=None): function layer_postprocess (line 962) | def layer_postprocess(layer_input, layer_output, hparams): function conv_block_internal (line 997) | def conv_block_internal(conv_fn, function conv_block (line 1068) | def conv_block(inputs, filters, dilation_rates_and_kernel_sizes, **kwargs): function conv1d_block (line 1074) | def conv1d_block(inputs, filters, dilation_rates_and_kernel_sizes, **kwa... function separable_conv_block (line 1080) | def separable_conv_block(inputs, filters, dilation_rates_and_kernel_sizes, function subseparable_conv_block (line 1087) | def subseparable_conv_block(inputs, filters, dilation_rates_and_kernel_s... function pool (line 1094) | def pool(inputs, window_size, pooling_type, padding, strides=(1, 1)): function conv_block_downsample (line 1120) | def conv_block_downsample(x, function get_timing_signal (line 1170) | def get_timing_signal(length, function add_timing_signal (line 1194) | def add_timing_signal(x, min_timescale=1, max_timescale=1e4, num_timesca... function mask_from_embedding (line 1228) | def mask_from_embedding(emb): function length_from_embedding (line 1242) | def length_from_embedding(emb): function mask_pos_gt (line 1253) | def mask_pos_gt(source_length, target_length): function mask_leq (line 1268) | def mask_leq(target_length, source_length): function mask_pos_lt (line 1285) | def mask_pos_lt(source_length, target_length): function relu_density_logit (line 1300) | def relu_density_logit(x, reduce_dims): function maybe_zero_out_padding (line 1317) | def maybe_zero_out_padding(inputs, kernel_size, nonpadding_mask): function dense_relu_dense (line 1337) | def dense_relu_dense(inputs, function dense_dropconnect (line 1370) | def dense_dropconnect(inputs, function conv_relu_conv (line 1385) | def conv_relu_conv(inputs, function sepconv_relu_sepconv (line 1452) | def sepconv_relu_sepconv(inputs, function conv_hidden_relu (line 1487) | def conv_hidden_relu(inputs, function conv_gru (line 1519) | def conv_gru(x, function gru_feedfwd (line 1548) | def gru_feedfwd(a_t, h_prev, filters, name=None): function conv_lstm (line 1580) | def conv_lstm(x, function diagonal_conv_gru (line 1601) | def diagonal_conv_gru(x, function pad_to_same_length (line 1643) | def pad_to_same_length(x, y, final_length_divisible_by=1, axis=1): function pad_with_zeros (line 1683) | def pad_with_zeros(logits, labels): function weights_nonzero (line 1692) | def weights_nonzero(labels): function weights_prepend_inputs_to_targets (line 1697) | def weights_prepend_inputs_to_targets(labels): function check_nonnegative (line 1714) | def check_nonnegative(value): function weights_multi_problem (line 1724) | def weights_multi_problem(labels, taskid=-1): function weights_multi_problem_all (line 1747) | def weights_multi_problem_all(labels, taskid=-1): function weights_multi_problem_input (line 1763) | def weights_multi_problem_input(labels, taskid=-1): function weights_all (line 1771) | def weights_all(labels): function weights_concatenated (line 1776) | def weights_concatenated(labels): function padded_cross_entropy (line 1805) | def padded_cross_entropy(logits, function _weights_one_third (line 1870) | def _weights_one_third(labels): function dml_loss (line 1875) | def dml_loss(pred, labels, weights_fn=_weights_one_third, reduce_sum=True): function split_to_discretized_mix_logistic_params (line 1907) | def split_to_discretized_mix_logistic_params(inputs): function discretized_mix_logistic_loss (line 1940) | def discretized_mix_logistic_loss(pred, labels): function sample_from_discretized_mix_logistic (line 2024) | def sample_from_discretized_mix_logistic(pred, seed=None): function smoothing_cross_entropy (line 2073) | def smoothing_cross_entropy(logits, function global_pool_1d (line 2122) | def global_pool_1d(inputs, pooling_type="MAX", mask=None): function running_global_pool_1d (line 2159) | def running_global_pool_1d(inputs, pooling_type="MAX"): function gated_linear_unit_layer (line 2187) | def gated_linear_unit_layer(x, name=None): function sru (line 2208) | def sru(x, function linear_set_layer (line 2271) | def linear_set_layer(layer_size, function ravanbakhsh_set_layer (line 2325) | def ravanbakhsh_set_layer(layer_size, function fn_device_dependency_dict (line 2368) | def fn_device_dependency_dict(): function fn_device_dependency (line 2377) | def fn_device_dependency(name, device=""): function underlying_variable_ref (line 2400) | def underlying_variable_ref(t): function underlying_variable (line 2422) | def underlying_variable(t): function approximate_split (line 2442) | def approximate_split(x, num_splits, axis=0): class FactoredTensor (line 2458) | class FactoredTensor(object): method __init__ (line 2471) | def __init__(self, a, b): method a (line 2476) | def a(self): method b (line 2480) | def b(self): method to_tensor (line 2483) | def to_tensor(self): function _convert_factored_tensor_to_tensor (line 2498) | def _convert_factored_tensor_to_tensor(value, *args, **kwargs): function smoothing_cross_entropy_factored_grad (line 2507) | def smoothing_cross_entropy_factored_grad(op, dy): function smoothing_cross_entropy_factored (line 2543) | def smoothing_cross_entropy_factored(a, b, labels, confidence): function padded_cross_entropy_factored (line 2570) | def padded_cross_entropy_factored(factored_logits, function fn_with_custom_grad (line 2606) | def fn_with_custom_grad(grad_fn, use_global_vars=False): function _fn_with_custom_grad (line 2636) | def _fn_with_custom_grad(fn, inputs, grad_fn, use_global_vars=False): function conv_hidden_relu_memory_efficient (line 2705) | def conv_hidden_relu_memory_efficient(x, function shape_list (line 2815) | def shape_list(x): function list_product (line 2834) | def list_product(els): function sample_with_temperature (line 2841) | def sample_with_temperature(logits, temperature, sampling_keep_top_k=-1): function _select_top_k (line 2882) | def _select_top_k(logits, top_k): function sample_temperature_per_example (line 2906) | def sample_temperature_per_example(logits, temperature, sampling_keep_to... function ones_matrix_band_part (line 2925) | def ones_matrix_band_part(rows, cols, num_lower, num_upper, out_shape=No... function reshape_like_all_dims (line 2962) | def reshape_like_all_dims(a, b): function recompute_grad (line 2970) | def recompute_grad(fn): function _recompute_grad (line 2990) | def _recompute_grad(fn, args): function dense (line 3028) | def dense(x, units, **kwargs): function batch_dense (line 3069) | def batch_dense(inputs, function mix (line 3123) | def mix(x1, function brelu (line 3179) | def brelu(x): function belu (line 3188) | def belu(x): function gelu (line 3197) | def gelu(x): function nac (line 3214) | def nac(x, depth, name=None, reuse=None): function nalu (line 3226) | def nalu(x, depth, epsilon=1e-30, name=None, reuse=None): function argmax_with_score (line 3240) | def argmax_with_score(logits, axis=None): function log_prob_from_logits (line 3266) | def log_prob_from_logits(logits, reduce_axis=-1): function top_kth_iterative (line 3270) | def top_kth_iterative(x, k): function top_1_tpu (line 3303) | def top_1_tpu(inputs): function index_last_dim_with_indices (line 3321) | def index_last_dim_with_indices(x, indices): function should_generate_summaries (line 3357) | def should_generate_summaries(): function reshape_like (line 3373) | def reshape_like(a, b): function summarize_video (line 3381) | def summarize_video(video, prefix, max_outputs=1): function cast_like (line 3403) | def cast_like(x, y): function make_even_size (line 3423) | def make_even_size(x): function sliced_gan_loss (line 3449) | def sliced_gan_loss(input1, function lrelu (line 3522) | def lrelu(input_, leak=0.2, name="lrelu"): function deep_discriminator (line 3526) | def deep_discriminator(x, function instance_norm (line 3565) | def instance_norm(x): function general_conv (line 3580) | def general_conv(x, function patch_discriminator (line 3614) | def patch_discriminator(x, filters=64, filter_size=5, n=4, function mean_with_attention (line 3637) | def mean_with_attention(x, name, num_heads=4): function single_discriminator (line 3652) | def single_discriminator(x, filters=128, kernel_size=8, function double_discriminator (line 3665) | def double_discriminator(x, filters1=128, filters2=None, function upscale (line 3690) | def upscale(inputs, f, method=tf.image.ResizeMethod.NEAREST_NEIGHBOR): function tpu_safe_image_summary (line 3696) | def tpu_safe_image_summary(image): function cyclegan_upsample (line 3714) | def cyclegan_upsample(net, num_outputs, stride, method="conv2d_transpose"): function weight_targeting (line 3770) | def weight_targeting(w, k): function unit_targeting (line 3784) | def unit_targeting(w, k): function td_conv (line 3799) | def td_conv(inputs, function targeted_dropout (line 3867) | def targeted_dropout(inputs, function kl_divergence (line 3911) | def kl_divergence(mu, log_var, mu_p=0.0, log_var_p=0.0): function sparse_equals_constant (line 3933) | def sparse_equals_constant(constant, tensor): function sparse_expand_dims (line 3940) | def sparse_expand_dims(tensor, current_num_dims, axis=0): function sparse_add_constant (line 3954) | def sparse_add_constant(constant, tensor): function sparse_eye (line 3961) | def sparse_eye(size): class WeightNorm (line 3972) | class WeightNorm(tf.keras.layers.Wrapper): method __init__ (line 4006) | def __init__(self, layer, data_init=False, **kwargs): method _compute_weights (line 4015) | def _compute_weights(self): method _init_norm (line 4021) | def _init_norm(self, weights): method _data_dep_init (line 4027) | def _data_dep_init(self, inputs): method build (line 4044) | def build(self, input_shape=None): method call (line 4077) | def call(self, inputs): method compute_output_shape (line 4087) | def compute_output_shape(self, input_shape): FILE: tensor2tensor/layers/common_layers_test.py class CommonLayersTest (line 34) | class CommonLayersTest(parameterized.TestCase, tf.test.TestCase): method testIndexLastDimWithIndices (line 37) | def testIndexLastDimWithIndices(self): method testSaturatingSigmoid (line 47) | def testSaturatingSigmoid(self): method testFlatten4D3D (line 54) | def testFlatten4D3D(self): method testEmbedding (line 62) | def testEmbedding(self): method testShakeShake (line 70) | def testShakeShake(self): method testConv (line 79) | def testConv(self): method testConv1d (line 87) | def testConv1d(self): method testSeparableConv (line 95) | def testSeparableConv(self): method testSubSeparableConv (line 104) | def testSubSeparableConv(self): method testConvBlock (line 115) | def testConvBlock(self): method testSeparableConvBlock (line 127) | def testSeparableConvBlock(self): method testSubSeparableConvBlock (line 138) | def testSubSeparableConvBlock(self): method testPool (line 152) | def testPool(self): method testConvBlockDownsample (line 161) | def testConvBlockDownsample(self): method testGetTimingSignal (line 170) | def testGetTimingSignal(self): method testAddTimingSignal (line 178) | def testAddTimingSignal(self): method testConvGRU (line 189) | def testConvGRU(self): method testSRU (line 201) | def testSRU(self): method testLayerNorm (line 210) | def testLayerNorm(self): method testGroupNorm (line 219) | def testGroupNorm(self): method testConvLSTM (line 227) | def testConvLSTM(self): method testPadToSameLength (line 235) | def testPadToSameLength(self): method testShiftLeft (line 252) | def testShiftLeft(self): method testConvStride2MultiStep (line 262) | def testConvStride2MultiStep(self): method testDeconvStride2MultiStep (line 271) | def testDeconvStride2MultiStep(self): method testApplyNormLayer (line 280) | def testApplyNormLayer(self): method testApplyNormNoam (line 289) | def testApplyNormNoam(self): method testApplyNormBatch (line 298) | def testApplyNormBatch(self): method testApplyNormNone (line 307) | def testApplyNormNone(self): method testDenseWithLayerCollection (line 318) | def testDenseWithLayerCollection(self): method testGlobalPool1d (line 332) | def testGlobalPool1d(self): method testLinearSetLayer (line 359) | def testLinearSetLayer(self): method testRavanbakhshSetLayer (line 373) | def testRavanbakhshSetLayer(self): method testTopKthIterativeShape (line 382) | def testTopKthIterativeShape(self): method testTopKthIterativeValue (line 389) | def testTopKthIterativeValue(self): method testBReLU (line 396) | def testBReLU(self): method testBELU (line 403) | def testBELU(self): method testNAC (line 410) | def testNAC(self): method testNALU (line 418) | def testNALU(self): method testNALUzeros (line 426) | def testNALUzeros(self): method testPaddingCrossEntropyFactored (line 435) | def testPaddingCrossEntropyFactored(self): method testPaddingCrossEntropyFactoredGrad (line 469) | def testPaddingCrossEntropyFactoredGrad(self): method testDmlLoss (line 512) | def testDmlLoss(self, batch, height, width, num_mixtures, reduce_sum): method testWeightsMultiProblemAll (line 532) | def testWeightsMultiProblemAll(self): method testWeightsMultiProblem (line 549) | def testWeightsMultiProblem(self): method testDiscretizedMixLogisticLoss (line 566) | def testDiscretizedMixLogisticLoss(self): method testSampleFromDiscretizedMixLogistic (line 603) | def testSampleFromDiscretizedMixLogistic(self): method testFactoredTensorImplicitConversion (line 631) | def testFactoredTensorImplicitConversion(self): method testConvHiddenReluMemoryEfficient (line 643) | def testConvHiddenReluMemoryEfficient(self): method testTopk (line 681) | def testTopk(self): method testSampleTemperaturePerExample (line 699) | def testSampleTemperaturePerExample(self): method testSampleTemperaturePerExampleWithTopK (line 713) | def testSampleTemperaturePerExampleWithTopK(self): method testSampleTemperaturePerExampleWithTopK2 (line 729) | def testSampleTemperaturePerExampleWithTopK2(self): method testSampleTemperaturePerExampleDynamicBatchSize (line 743) | def testSampleTemperaturePerExampleDynamicBatchSize(self): method testCycleGANUpsampleNnUpsampleConv (line 757) | def testCycleGANUpsampleNnUpsampleConv(self): method testCycleGANUpsampleBilinearUpsampleConv (line 777) | def testCycleGANUpsampleBilinearUpsampleConv(self): method testCycleGANUpsampleConv2dTranspose (line 797) | def testCycleGANUpsampleConv2dTranspose(self): method testSpectralNorm (line 821) | def testSpectralNorm(self): class FnWithCustomGradTest (line 841) | class FnWithCustomGradTest(tf.test.TestCase): method testCorrectness (line 844) | def testCorrectness(self): method testCustomGrad (line 890) | def testCustomGrad(self): class RecomputeTest (line 920) | class RecomputeTest(tf.test.TestCase): method testRecompute (line 923) | def testRecompute(self): class WeightNormTest (line 968) | class WeightNormTest(tf.test.TestCase): method testInputSpec (line 970) | def testInputSpec(self): FILE: tensor2tensor/layers/common_video.py function swap_time_and_batch_axes (line 40) | def swap_time_and_batch_axes(inputs): function encode_to_shape (line 46) | def encode_to_shape(inputs, shape, scope): function decode_to_shape (line 57) | def decode_to_shape(inputs, shape, scope): function basic_lstm (line 67) | def basic_lstm(inputs, state, num_units, name=None): function lstm_cell (line 79) | def lstm_cell(inputs, function conv_lstm_2d (line 108) | def conv_lstm_2d(inputs, state, output_channels, function scheduled_sample_count (line 126) | def scheduled_sample_count(ground_truth_x, function inject_additional_input (line 157) | def inject_additional_input(layer, inputs, name, mode="concat"): function scheduled_sample_prob (line 200) | def scheduled_sample_prob(ground_truth_x, function dna_transformation (line 220) | def dna_transformation(prev_image, dna_input, dna_kernel_size, relu_shift): function cdna_transformation (line 252) | def cdna_transformation(prev_image, cdna_input, num_masks, color_channels, function vgg_layer (line 305) | def vgg_layer(inputs, function tile_and_concat (line 336) | def tile_and_concat(image, latent, concat_latent=True): function _encode_gif (line 362) | def _encode_gif(images, fps): function ffmpeg_works (line 381) | def ffmpeg_works(): function py_gif_summary (line 391) | def py_gif_summary(tag, images, max_outputs, fps, return_summary_value=F... function gif_summary (line 456) | def gif_summary(name, tensor, max_outputs=3, fps=10, collections=None, function tinyify (line 500) | def tinyify(array, tiny_mode, small_mode): function get_gaussian_tensor (line 508) | def get_gaussian_tensor(mean, log_var): function conv_latent_tower (line 514) | def conv_latent_tower(images, time_axis, latent_channels=1, min_logvar=-5, function beta_schedule (line 583) | def beta_schedule(schedule, global_step, final_beta, decay_start, decay_... function extract_random_video_patch (line 619) | def extract_random_video_patch(videos, num_frames=-1): class VideoWriter (line 659) | class VideoWriter(object): method write (line 662) | def write(self, frame, encoded_frame=None): method write_multi (line 666) | def write_multi(self, frames, encoded_frames=None): method finish (line 674) | def finish(self): method save_to_disk (line 681) | def save_to_disk(self, output): method finish_to_disk (line 689) | def finish_to_disk(self): method __del__ (line 695) | def __del__(self): class WholeVideoWriter (line 700) | class WholeVideoWriter(VideoWriter): method __init__ (line 703) | def __init__(self, fps, output_path=None, file_format="gif"): method __init_ffmpeg (line 713) | def __init_ffmpeg(self, image_shape): method _start_reader_thread (line 744) | def _start_reader_thread(self, stream, chunks): method write (line 769) | def write(self, frame, encoded_frame=None): method finish (line 774) | def finish(self): method save_to_disk (line 800) | def save_to_disk(self, output): class BatchWholeVideoWriter (line 810) | class BatchWholeVideoWriter(VideoWriter): method __init__ (line 813) | def __init__(self, fps, path_template, file_format="gif"): method write (line 819) | def write(self, batch_frame, batch_encoded_frame=None): method finish (line 831) | def finish(self): method save_to_disk (line 835) | def save_to_disk(self, outputs): class IndividualFrameWriter (line 840) | class IndividualFrameWriter(VideoWriter): method __init__ (line 843) | def __init__(self, output_dir): method write (line 847) | def write(self, frame=None, encoded_frame=None): FILE: tensor2tensor/layers/common_video_test.py class CommonVideoTest (line 32) | class CommonVideoTest(parameterized.TestCase, tf.test.TestCase): method _run_scheduled_sample_func (line 34) | def _run_scheduled_sample_func(self, func, var, batch_size): method testScheduledSampleProbStart (line 44) | def testScheduledSampleProbStart(self): method testScheduledSampleProbMid (line 50) | def testScheduledSampleProbMid(self): method testScheduledSampleProbEnd (line 57) | def testScheduledSampleProbEnd(self): method testScheduledSampleCountStart (line 63) | def testScheduledSampleCountStart(self): method testScheduledSampleCountMid (line 69) | def testScheduledSampleCountMid(self): method testScheduledSampleCountEnd (line 76) | def testScheduledSampleCountEnd(self): method testDynamicTileAndConcat (line 82) | def testDynamicTileAndConcat(self): method testGifSummary (line 110) | def testGifSummary(self): method check_if_patch_exists (line 129) | def check_if_patch_exists(self, videos, video_patches, num_frames): method testBasicLstm (line 139) | def testBasicLstm(self): method testExtractRandomVideoPatch (line 153) | def testExtractRandomVideoPatch(self, num_frames=2): FILE: tensor2tensor/layers/discretization.py function project_hidden (line 34) | def project_hidden(x, projection_tensors, hidden_size, num_blocks): function slice_hidden (line 58) | def slice_hidden(x, hidden_size, num_blocks): function nearest_neighbor (line 76) | def nearest_neighbor(x, function embedding_lookup (line 145) | def embedding_lookup(x, function bit_to_int (line 226) | def bit_to_int(x_bit, num_bits, base=2): function int_to_bit (line 245) | def int_to_bit(x_int, num_bits, base=2): function int_to_bit_embed (line 264) | def int_to_bit_embed(x_int, num_bits, embedding_size, base=2): function embed (line 273) | def embed(x, function vae (line 363) | def vae(x, z_size, name=None): function top_k_softmax (line 387) | def top_k_softmax(x, k): function gumbel_sample (line 405) | def gumbel_sample(shape): function gumbel_softmax (line 418) | def gumbel_softmax(x, function discrete_bottleneck (line 481) | def discrete_bottleneck(inputs, function predict_bits_with_lstm (line 795) | def predict_bits_with_lstm(prediction_source, state_size, total_num_bits, function get_vq_codebook (line 889) | def get_vq_codebook(codebook_size, hidden_size): function vq_nearest_neighbor (line 915) | def vq_nearest_neighbor(x, means, function vq_discrete_bottleneck (line 944) | def vq_discrete_bottleneck(x, function vq_body (line 964) | def vq_body(x, function vq_loss (line 1014) | def vq_loss(x, function vq_discrete_unbottleneck (line 1081) | def vq_discrete_unbottleneck(x, hidden_size): function gumbel_softmax_nearest_neighbor_dvq (line 1091) | def gumbel_softmax_nearest_neighbor_dvq(x, function gumbel_softmax_discrete_bottleneck (line 1261) | def gumbel_softmax_discrete_bottleneck(x, function tanh_discrete_bottleneck (line 1381) | def tanh_discrete_bottleneck(x, bottleneck_bits, bottleneck_noise, function tanh_discrete_unbottleneck (line 1400) | def tanh_discrete_unbottleneck(x, hidden_size): function isemhash_bottleneck (line 1406) | def isemhash_bottleneck(x, function isemhash_unbottleneck (line 1436) | def isemhash_unbottleneck(x, hidden_size, isemhash_filter_size_multiplie... function parametrized_bottleneck (line 1447) | def parametrized_bottleneck(x, hparams): function parametrized_unbottleneck (line 1486) | def parametrized_unbottleneck(x, hidden_size, hparams): function iaf_hparams (line 1499) | def iaf_hparams(hidden_size=512, filter_size=4096): FILE: tensor2tensor/layers/discretization_test.py class DiscretizationTest (line 30) | class DiscretizationTest(tf.test.TestCase): method setUp (line 33) | def setUp(self): method testBitToIntZeros (line 38) | def testBitToIntZeros(self): method testBitToIntOnes (line 46) | def testBitToIntOnes(self): method testIntToBitZeros (line 54) | def testIntToBitZeros(self): method testIntToBitOnes (line 62) | def testIntToBitOnes(self): method testProjectHidden (line 70) | def testProjectHidden(self): method testSliceHiddenZeros (line 84) | def testSliceHiddenZeros(self): method testSliceHiddenOnes (line 95) | def testSliceHiddenOnes(self): method testNearestNeighbors (line 106) | def testNearestNeighbors(self): method testGetVQBottleneck (line 121) | def testGetVQBottleneck(self): method testVQNearestNeighbors (line 137) | def testVQNearestNeighbors(self): method testVQDiscreteBottleneck (line 147) | def testVQDiscreteBottleneck(self): method testVQDiscreteUnbottlenck (line 154) | def testVQDiscreteUnbottlenck(self): method testGumbelSoftmaxDiscreteBottleneck (line 161) | def testGumbelSoftmaxDiscreteBottleneck(self): method testDiscreteBottleneckVQ (line 171) | def testDiscreteBottleneckVQ(self): method testDiscreteBottleneckVQCond (line 207) | def testDiscreteBottleneckVQCond(self): FILE: tensor2tensor/layers/latent_layers.py function compress_self_attention_layer (line 36) | def compress_self_attention_layer(x, hparams, name=None): function compute_nats_and_bits_per_dim (line 52) | def compute_nats_and_bits_per_dim(data_dim, function multinomial_sample (line 81) | def multinomial_sample(x, vocab_size=None, sampling_method="random", function ae_latent_softmax (line 103) | def ae_latent_softmax(latents_pred, latents_discrete_hot, vocab_size, hp... function ae_latent_sample_beam (line 134) | def ae_latent_sample_beam(latents_dense_in, inputs, ed, embed, hparams): function residual_block_layer (line 186) | def residual_block_layer(inputs, hparams): function compress_encoder (line 223) | def compress_encoder(inputs, function compress_encoder_2d (line 274) | def compress_encoder_2d(x, hparams, name=None): function compress_encoder_1d (line 295) | def compress_encoder_1d(x, hparams, name=None): function decompress_decoder (line 316) | def decompress_decoder(inputs, function decompress_decoder_2d (line 356) | def decompress_decoder_2d(x, hparams, name=None): function decompress_decoder_1d (line 373) | def decompress_decoder_1d(x, hparams, name=None): function transformer_text_encoder (line 392) | def transformer_text_encoder(inputs, function transformer_image_decoder (line 423) | def transformer_image_decoder(targets, function transformer_latent_decoder (line 466) | def transformer_latent_decoder(x, function bottleneck_layer (line 510) | def bottleneck_layer(inputs, function latent_prediction_model (line 530) | def latent_prediction_model(inputs, function transformer_autoencoder (line 577) | def transformer_autoencoder(inputs, function iaf_flow (line 704) | def iaf_flow(one_hot_assignments, FILE: tensor2tensor/layers/latent_layers_test.py function imagetransformer_latent_tiny (line 35) | def imagetransformer_latent_tiny(): class LatentLayersTest (line 93) | class LatentLayersTest(tf.test.TestCase): method testComputeBitsAndNats (line 96) | def testComputeBitsAndNats(self): method testTransformerAutoencoder (line 112) | def testTransformerAutoencoder(self): FILE: tensor2tensor/layers/message_passing_attention.py function multihead_graph_attention (line 28) | def multihead_graph_attention(query_antecedent, function make_edge_vectors (line 150) | def make_edge_vectors(adjacency_matrix, function graph_attention (line 185) | def graph_attention(q, function _compute_edge_transforms (line 251) | def _compute_edge_transforms(node_states, function compute_mpnn_qkv (line 304) | def compute_mpnn_qkv(node_states, function sparse_message_pass_batched (line 367) | def sparse_message_pass_batched(node_states, function sparse_message_pass (line 431) | def sparse_message_pass(node_states, function multihead_mpnn_attention (line 514) | def multihead_mpnn_attention(node_states, function dot_product_mpnn_attention (line 652) | def dot_product_mpnn_attention(q, function ggnn_fast_dense (line 786) | def ggnn_fast_dense(node_states, function compute_values (line 840) | def compute_values(edge_compatibility, v): function precompute_edge_matrices (line 863) | def precompute_edge_matrices(adjacency, hparams): function dense_message_pass (line 910) | def dense_message_pass(node_states, edge_matrices): FILE: tensor2tensor/layers/modalities.py class ModalityType (line 40) | class ModalityType(object): method get_choices (line 88) | def get_choices(): function audio_bottom (line 129) | def audio_bottom(x, model_hparams, vocab_size): function audio_spectral_bottom (line 177) | def audio_spectral_bottom(x, model_hparams, vocab_size): function class_label_bottom (line 226) | def class_label_bottom(x, model_hparams, vocab_size): function class_label_targets_bottom (line 238) | def class_label_targets_bottom(x, model_hparams, vocab_size): function identity_bottom (line 247) | def identity_bottom(x, model_hparams, vocab_size): function image_bottom (line 252) | def image_bottom(x, model_hparams, vocab_size): function image_targets_bottom (line 261) | def image_targets_bottom(x, model_hparams, vocab_size): function _image_channel_compress_bottom (line 292) | def _image_channel_compress_bottom(inputs, model_hparams, name="bottom"): function image_channel_compress_bottom (line 337) | def image_channel_compress_bottom(x, model_hparams, vocab_size): function image_channel_compress_targets_bottom (line 342) | def image_channel_compress_targets_bottom(x, model_hparams, vocab_size): function image_channel_embeddings_bottom (line 347) | def image_channel_embeddings_bottom(x, model_hparams, vocab_size): function make_targets_bottom (line 360) | def make_targets_bottom(bottom): function real_bottom (line 367) | def real_bottom(x, model_hparams, vocab_size): function speech_recognition_bottom (line 374) | def speech_recognition_bottom(x, model_hparams, vocab_size): function get_weights (line 456) | def get_weights(model_hparams, vocab_size, hidden_dim=None): function _symbol_bottom_simple (line 489) | def _symbol_bottom_simple(x, model_hparams, vocab_size, name, reuse): function symbol_bottom (line 509) | def symbol_bottom(x, model_hparams, vocab_size): function symbol_targets_bottom (line 518) | def symbol_targets_bottom(x, model_hparams, vocab_size): function symbol_one_hot_bottom (line 534) | def symbol_one_hot_bottom(x, model_hparams, vocab_size): function video_bottom (line 539) | def video_bottom(x, model_hparams, vocab_size): function video_targets_bottom (line 546) | def video_targets_bottom(x, model_hparams, vocab_size): function video_bitwise_bottom (line 553) | def video_bitwise_bottom(x, model_hparams, vocab_size): function video_bitwise_targets_bottom (line 570) | def video_bitwise_targets_bottom(x, model_hparams, vocab_size): function video_identity_bottom (line 588) | def video_identity_bottom(x, model_hparams, vocab_size): function video_identity_targets_bottom (line 594) | def video_identity_targets_bottom(x, model_hparams, vocab_size): function video_pixel_noise_bottom (line 600) | def video_pixel_noise_bottom(x, model_hparams, vocab_size): function convert_rgb_to_real (line 616) | def convert_rgb_to_real(prediction, targets): function video_raw_bottom (line 624) | def video_raw_bottom(x, model_hparams, vocab_size): function video_raw_targets_bottom (line 630) | def video_raw_targets_bottom(x, model_hparams, vocab_size): function ctc_symbol_loss (line 639) | def ctc_symbol_loss(top_out, targets, model_hparams, vocab_size, weight_... function generic_loss (line 666) | def generic_loss(top_out, targets, model_hparams, vocab_size, weights_fn): function generic_l2_loss (line 680) | def generic_l2_loss(body_output, function multi_label_loss (line 690) | def multi_label_loss(top_out, targets, model_hparams, vocab_size, weight... function one_hot_class_label_loss (line 715) | def one_hot_class_label_loss(top_out, function real_l2_loss (line 740) | def real_l2_loss(top_out, targets, model_hparams, vocab_size, weights_fn): function real_log_poisson_loss (line 752) | def real_log_poisson_loss(top_out, function sigmoid_class_label_loss (line 769) | def sigmoid_class_label_loss(top_out, function sigmoid_max_pooling_class_label_loss (line 785) | def sigmoid_max_pooling_class_label_loss(top_out, function symbol_one_hot_loss (line 801) | def symbol_one_hot_loss(top_out, function video_loss (line 813) | def video_loss(top_out, targets, model_hparams, vocab_size, weights_fn): function video_identity_loss (line 828) | def video_identity_loss(top_out, function video_l1_internal_loss (line 848) | def video_l1_internal_loss(logits, targets, model_hparams): function video_l1_loss (line 853) | def video_l1_loss(top_out, targets, model_hparams, vocab_size, weights_fn): function video_l2_internal_loss (line 869) | def video_l2_internal_loss(logits, targets, model_hparams): function video_l2_loss (line 875) | def video_l2_loss(top_out, targets, model_hparams, vocab_size, weights_fn): function video_l2_raw_loss (line 891) | def video_l2_raw_loss(top_out, targets, model_hparams, vocab_size, weigh... function video_l1_raw_loss (line 898) | def video_l1_raw_loss(top_out, targets, model_hparams, vocab_size, weigh... function is_pointwise (line 908) | def is_pointwise(func): function class_label_top (line 928) | def class_label_top(body_output, targets, model_hparams, vocab_size): function identity_top (line 951) | def identity_top(body_output, targets, model_hparams, vocab_size): function image_top (line 956) | def image_top(body_output, targets, model_hparams, vocab_size): function image_channel_compress_top (line 976) | def image_channel_compress_top(body_output, targets, model_hparams, voca... function image_channel_embeddings_top (line 1014) | def image_channel_embeddings_top(body_output, function real_top (line 1031) | def real_top(body_output, targets, model_hparams, vocab_size): function sigmoid_max_pooling_class_label_top (line 1037) | def sigmoid_max_pooling_class_label_top(body_output, function softmax_average_pooling_class_label_top (line 1063) | def softmax_average_pooling_class_label_top(body_output, function softmax_last_timestep_class_label_top (line 1077) | def softmax_last_timestep_class_label_top(body_output, function softmax_max_pooling_class_label_top (line 1091) | def softmax_max_pooling_class_label_top(body_output, function symbol_top (line 1106) | def symbol_top(body_output, targets, model_hparams, vocab_size): function symbol_one_hot_top (line 1142) | def symbol_one_hot_top(body_output, targets, model_hparams, vocab_size): function video_top (line 1147) | def video_top(body_output, targets, model_hparams, vocab_size): function video_l1_top (line 1161) | def video_l1_top(body_output, targets, model_hparams, vocab_size): function video_raw_top (line 1180) | def video_raw_top(body_output, targets, model_hparams, vocab_size): function get_bottom (line 1193) | def get_bottom(modality_type, value=None): function get_loss (line 1246) | def get_loss(modality_type, value=None): function get_name (line 1300) | def get_name(modality_type, value=None): function get_targets_bottom (line 1388) | def get_targets_bottom(modality_type, value=None): function get_top (line 1443) | def get_top(modality_type, value=None): function get_weights_fn (line 1496) | def get_weights_fn(modality_type, value=None): FILE: tensor2tensor/layers/modalities_test.py class ModalityTest (line 33) | class ModalityTest(tf.test.TestCase): method testGetForAllModalities (line 36) | def testGetForAllModalities(self): method testSymbolModalityInputs (line 56) | def testSymbolModalityInputs(self): method testSymbolModalityTargets (line 81) | def testSymbolModalityTargets(self): method testSymbolModalityTargetsFactored (line 121) | def testSymbolModalityTargetsFactored(self): FILE: tensor2tensor/layers/ngram.py class NGram (line 26) | class NGram(tf.keras.layers.Layer): method __init__ (line 39) | def __init__(self, input_dim, minval, maxval, **kwargs): method call (line 56) | def call(self, inputs): method compute_output_shape (line 82) | def compute_output_shape(self, input_shape): method get_config (line 88) | def get_config(self): FILE: tensor2tensor/layers/ngram_test.py class NGramTest (line 30) | class NGramTest(tf.test.TestCase): method testNGramLayerShape (line 33) | def testNGramLayerShape(self): method testNGramLayerOutput (line 48) | def testNGramLayerOutput(self): FILE: tensor2tensor/layers/transformer_glow_layers.py function actnorm (line 43) | def actnorm(name, x, x_mask, inverse, init, logscale_factor=3.0): function multihead_invertible_1x1_conv_np (line 69) | def multihead_invertible_1x1_conv_np( function coupling (line 151) | def coupling(*args, **kwargs): function additive_coupling (line 161) | def additive_coupling( function affine_coupling (line 194) | def affine_coupling( function flow_step_glow (line 251) | def flow_step_glow(name, x, x_mask, split_dims, inverse, init, dtype, **... function flow_level (line 278) | def flow_level( function split (line 302) | def split(name, x, x_mask, inverse, temp=1.0, dtype=tf.float32, z=None): function squeeze (line 336) | def squeeze(name, x, factor, inverse): function glow (line 354) | def glow( FILE: tensor2tensor/layers/transformer_glow_layers_ops.py function dense (line 31) | def dense(name, x, n_out, dtype=tf.float32, init_w=0.05): function dense_weightnorm (line 44) | def dense_weightnorm( function transformer_decoder_block (line 69) | def transformer_decoder_block(name, function reduce_sum_over_lc (line 118) | def reduce_sum_over_lc(x, x_mask): function reduce_sum_over_l (line 139) | def reduce_sum_over_l(x, x_mask): function reduce_mean_over_l (line 160) | def reduce_mean_over_l(x, x_mask): function reduce_mean_over_bl (line 165) | def reduce_mean_over_bl(x, x_mask): function reduce_mean_over_l_sum_over_c (line 187) | def reduce_mean_over_l_sum_over_c(x, x_mask): function reduce_mean_over_bl_sum_over_c (line 193) | def reduce_mean_over_bl_sum_over_c(x, x_mask): function moments_over_bl (line 199) | def moments_over_bl(x, x_mask): function standard_normal_density (line 206) | def standard_normal_density(x, x_mask, reduce_sum=False): function standard_normal (line 216) | def standard_normal(x, name="normal"): function diagonal_normal (line 226) | def diagonal_normal(outputs, name="normal"): function split_coupling (line 238) | def split_coupling( function join_coupling (line 263) | def join_coupling(z_id, z_tr, split_dim, identity_first): function assign (line 276) | def assign(w, initial_value): function get_variable_ddi (line 282) | def get_variable_ddi( FILE: tensor2tensor/layers/transformer_glow_layers_ops_test.py class TransformerFlowOpsTest (line 37) | class TransformerFlowOpsTest(parameterized.TestCase, tf.test.TestCase): method get_data (line 39) | def get_data(self): method get_hparams (line 46) | def get_hparams(self): method get_kwargs (line 71) | def get_kwargs(self, hparams=None): method test_dense_weightnorm (line 86) | def test_dense_weightnorm(self): FILE: tensor2tensor/layers/transformer_glow_layers_test.py function float32_bottleneck (line 55) | def float32_bottleneck(x): function get_diff (line 59) | def get_diff(l1, l2): class TransformerGlowLayersTest (line 67) | class TransformerGlowLayersTest(parameterized.TestCase, tf.test.TestCase): method get_hparams (line 69) | def get_hparams(self): method get_data (line 96) | def get_data(self): method get_kwargs (line 106) | def get_kwargs(self, x_mask, hparams=None): method test_actnorm (line 121) | def test_actnorm(self): method test_actnorm_invertibility (line 138) | def test_actnorm_invertibility(self): method test_multi_1x1_invertibility (line 162) | def test_multi_1x1_invertibility( method test_coupling_invertibility (line 190) | def test_coupling_invertibility(self, func, split_dim): method test_split (line 212) | def test_split(self): method test_flow_invertibility (line 231) | def test_flow_invertibility(self): method test_aaa_glow_training (line 256) | def test_aaa_glow_training(self, depths, split_plans, prior_type): FILE: tensor2tensor/layers/transformer_layers.py function layers (line 32) | def layers(): function transformer_prepare_encoder (line 36) | def transformer_prepare_encoder(inputs, target_space, hparams, features=... function transformer_encoder (line 138) | def transformer_encoder(encoder_input, function transformer_ffn_layer (line 262) | def transformer_ffn_layer(x, FILE: tensor2tensor/layers/transformer_memory.py class RecurrentMemory (line 25) | class RecurrentMemory(object): method pre_attention (line 31) | def pre_attention(self, segment, query_antecedent, memory_antecedent, ... method post_attention (line 47) | def post_attention(self, token, x): class RecentTokensMemory (line 61) | class RecentTokensMemory(RecurrentMemory): method __init__ (line 69) | def __init__(self, name, hparams): method pre_attention (line 110) | def pre_attention(self, segment, query_antecedent, memory_antecedent, ... method post_attention (line 170) | def post_attention(self, token, x): class TransformerMemory (line 188) | class TransformerMemory(object): method __init__ (line 194) | def __init__(self, batch_size, key_depth, val_depth, memory_size, method _norm (line 226) | def _norm(self, x): method _address_content (line 230) | def _address_content(self, x): method read (line 251) | def read(self, x): method write (line 272) | def write(self, x, access_logits): method set (line 305) | def set(self, mem_vals, mean_logits): method get (line 311) | def get(self): method update_segment_number (line 314) | def update_segment_number(self, segment_number): method reset (line 317) | def reset(self, entries_to_reset): method pre_attention (line 339) | def pre_attention(self, segment_number, query_antecedent, method post_attention (line 373) | def post_attention(self, token, x): FILE: tensor2tensor/layers/transformer_memory_test.py class TransformerMemoryTest (line 27) | class TransformerMemoryTest(parameterized.TestCase, tf.test.TestCase): method testRead (line 29) | def testRead(self): method testWrite (line 51) | def testWrite(self): method testReset (line 76) | def testReset(self): method testLoss (line 101) | def testLoss(self): FILE: tensor2tensor/layers/vq_discrete.py class DiscreteBottleneck (line 26) | class DiscreteBottleneck(object): method __init__ (line 29) | def __init__(self, hparams): method slice_hidden (line 61) | def slice_hidden(self, x): method nearest_neighbor (line 74) | def nearest_neighbor(self, x, means): method embedding_lookup (line 122) | def embedding_lookup(self, x, means): method bit_to_int (line 147) | def bit_to_int(self, x_bit, num_bits, base=2): method int_to_bit (line 167) | def int_to_bit(self, x_int, num_bits, base=2): method embed (line 189) | def embed(self, x): method discrete_bottleneck (line 225) | def discrete_bottleneck(self, x): FILE: tensor2tensor/layers/vqa_layers.py function summarize_tensors (line 34) | def summarize_tensors(tensor_dict, tag=None): function image_embedding (line 49) | def image_embedding(images, function multihead_attention (line 103) | def multihead_attention(query_antecedent, FILE: tensor2tensor/metrics/video_conditional_fvd.py class VideoEvaluationDataset (line 31) | class VideoEvaluationDataset( class Model (line 48) | class Model( function evaluate_model (line 67) | def evaluate_model(video_eval_dataset, model, num_batches, batch_size): FILE: tensor2tensor/metrics/video_conditional_fvd_test.py class VideoConditionalFvdTest (line 26) | class VideoConditionalFvdTest(tf.test.TestCase): method test_sample (line 28) | def test_sample(self): FILE: tensor2tensor/models/__init__.py function model (line 98) | def model(name): FILE: tensor2tensor/models/basic.py class BasicFcRelu (line 31) | class BasicFcRelu(t2t_model.T2TModel): method body (line 34) | def body(self, features): function basic_fc_small (line 47) | def basic_fc_small(): FILE: tensor2tensor/models/basic_test.py class BasicTest (line 31) | class BasicTest(tf.test.TestCase): method testBasicFcRelu (line 33) | def testBasicFcRelu(self): FILE: tensor2tensor/models/bytenet.py function residual_dilated_conv (line 31) | def residual_dilated_conv(x, repeat, padding, name, hparams): function bytenet_internal (line 50) | def bytenet_internal(inputs, targets, hparams): class ByteNet (line 78) | class ByteNet(t2t_model.T2TModel): method body (line 80) | def body(self, features): function bytenet_base (line 86) | def bytenet_base(): FILE: tensor2tensor/models/bytenet_test.py class ByteNetTest (line 30) | class ByteNetTest(tf.test.TestCase): method testByteNet (line 32) | def testByteNet(self): FILE: tensor2tensor/models/distillation.py class Distillation (line 30) | class Distillation(t2t_model.T2TModel): method __init__ (line 46) | def __init__(self, method body (line 72) | def body(self, features): method top (line 132) | def top(self, body_output, features): function distill_base (line 136) | def distill_base(): function distill_resnet_32_to_15_cifar20x5 (line 178) | def distill_resnet_32_to_15_cifar20x5(): FILE: tensor2tensor/models/evolved_transformer.py function _capped_double_heads (line 50) | def _capped_double_heads(num_heads, cap=16): class EvolvedTransformer (line 67) | class EvolvedTransformer(transformer.Transformer): method __init__ (line 70) | def __init__(self, *args, **kwargs): function evolved_transformer_encoder (line 102) | def evolved_transformer_encoder(encoder_input, function evolved_transformer_decoder (line 276) | def evolved_transformer_decoder(decoder_input, function _add_attend_to_encoder_cache (line 631) | def _add_attend_to_encoder_cache(cache, attention_name, hparams, num_lay... function init_evolved_transformer_cache (line 659) | def init_evolved_transformer_cache(cache, hparams, batch_size, function add_evolved_transformer_hparams (line 743) | def add_evolved_transformer_hparams(hparams): function evolved_transformer_tiny (line 770) | def evolved_transformer_tiny(): function evolved_transformer_base (line 779) | def evolved_transformer_base(): function evolved_transformer_big (line 785) | def evolved_transformer_big(): function evolved_transformer_deep (line 791) | def evolved_transformer_deep(): function evolved_transformer_base_tpu (line 801) | def evolved_transformer_base_tpu(): function evolved_transformer_big_tpu (line 811) | def evolved_transformer_big_tpu(): function evolved_transformer_tpu_basic (line 821) | def evolved_transformer_tpu_basic(): FILE: tensor2tensor/models/evolved_transformer_test.py function print_vars (line 36) | def print_vars(all_vars=None): function get_var (line 46) | def get_var(name): function get_vars (line 55) | def get_vars(names): function assert_with_message (line 60) | def assert_with_message(assert_method, a, b, message): function get_model (line 68) | def get_model(hparams, has_input=True, num_decoder_layers=1): class EvolvedTransformerTest (line 96) | class EvolvedTransformerTest(tf.test.TestCase): method testEvolvedTransformer (line 98) | def testEvolvedTransformer(self): method testSlowVsFast (line 106) | def testSlowVsFast(self): method testSlowVsFastNoInput (line 141) | def testSlowVsFastNoInput(self): method testBeamVsFast (line 174) | def testBeamVsFast(self): method _create_greedy_infer_model (line 209) | def _create_greedy_infer_model(self): method testGreedySlowTPUVsNonTPU (line 235) | def testGreedySlowTPUVsNonTPU(self): method testGreedyFastTPUVsNonTPU (line 257) | def testGreedyFastTPUVsNonTPU(self): method testGreedyTPUSlowVsFast (line 278) | def testGreedyTPUSlowVsFast(self): method testFrozenWeightsUnchangedByTraining (line 299) | def testFrozenWeightsUnchangedByTraining(self): method testAllWeightsTrainableByDefault (line 527) | def testAllWeightsTrainableByDefault(self): FILE: tensor2tensor/models/image_transformer.py class Imagetransformer (line 40) | class Imagetransformer(t2t_model.T2TModel): method body (line 48) | def body(self, features): method loss (line 84) | def loss(self, logits, features): method sample (line 90) | def sample(self, features): method _slow_greedy_infer (line 109) | def _slow_greedy_infer(self, features, decode_length): class ImagetransformerMoe (line 130) | class ImagetransformerMoe(t2t_model.T2TModel): method use_body_sharded (line 134) | def use_body_sharded(): method body_sharded (line 137) | def body_sharded(self, sharded_features): function image_transformer_base (line 173) | def image_transformer_base(): function imagetransformer_base (line 250) | def imagetransformer_base(): function imagetransformer_cifar10_base (line 256) | def imagetransformer_cifar10_base(): function imagetransformer_cifar10_base_dmol (line 275) | def imagetransformer_cifar10_base_dmol(): function imagetransformer_base_tpu (line 303) | def imagetransformer_base_tpu(): function imagetransformer_base_imagenet_tpu (line 322) | def imagetransformer_base_imagenet_tpu(): function imagetransformer_imagenet32_base (line 336) | def imagetransformer_imagenet32_base(): function imagetransformer_base_rel (line 345) | def imagetransformer_base_rel(): function imagetransformer_sep_channels (line 353) | def imagetransformer_sep_channels(): function imagetransformer_sep_channels_8l (line 365) | def imagetransformer_sep_channels_8l(): function imagetransformer_sep_channels_8l_multipos3 (line 378) | def imagetransformer_sep_channels_8l_multipos3(): function imagetransformer_base_8l_8h_big_cond_dr03_dan (line 387) | def imagetransformer_base_8l_8h_big_cond_dr03_dan(): function imagetransformer_base_10l_8h_big_uncond_dr03_dan_64 (line 405) | def imagetransformer_base_10l_8h_big_uncond_dr03_dan_64(): function imagetransformerpp_sep_channels_8l_8h (line 417) | def imagetransformerpp_sep_channels_8l_8h(): function imagetransformerpp_base_8l_8h_big_cond_dr03_dan (line 439) | def imagetransformerpp_base_8l_8h_big_cond_dr03_dan(): function imagetransformerpp_base_8l_8h_big_cond_dr03_dan_a (line 456) | def imagetransformerpp_base_8l_8h_big_cond_dr03_dan_a(): function imagetransformerpp_base_10l_8h_big_uncond_dr03_dan (line 463) | def imagetransformerpp_base_10l_8h_big_uncond_dr03_dan(): function imagetransformerpp_base_10l_8h_big_uncond_dr03_dan_a (line 471) | def imagetransformerpp_base_10l_8h_big_uncond_dr03_dan_a(): function imagetransformerpp_base_10l_8h_big_uncond_dr03_dan_b (line 478) | def imagetransformerpp_base_10l_8h_big_uncond_dr03_dan_b(): function imagetransformerpp_base_10l_8h_big_uncond_dr03_dan_g (line 489) | def imagetransformerpp_base_10l_8h_big_uncond_dr03_dan_g(): function imagetransformerpp_base_12l_8h_big_uncond_dr03_dan_k (line 501) | def imagetransformerpp_base_12l_8h_big_uncond_dr03_dan_k(): function imagetransformerpp_base_12l_8h_big_uncond_dr03_dan_l (line 508) | def imagetransformerpp_base_12l_8h_big_uncond_dr03_dan_l(): function imagetransformerpp_base_12l_8h_big_uncond_dr03_dan_m (line 516) | def imagetransformerpp_base_12l_8h_big_uncond_dr03_dan_m(): function imagetransformerpp_base_12l_8h_big_uncond_dr03_dan_m_rel (line 523) | def imagetransformerpp_base_12l_8h_big_uncond_dr03_dan_m_rel(): function imagetransformerpp_base_12l_8h_big_uncond_dr03_dan_m_relsh (line 531) | def imagetransformerpp_base_12l_8h_big_uncond_dr03_dan_m_relsh(): function imagetransformerpp_base_14l_8h_big_uncond_dr03_dan_p (line 538) | def imagetransformerpp_base_14l_8h_big_uncond_dr03_dan_p(): function imagetransformerpp_base_12l_8h_big_uncond_dr03_dan_m_bs1 (line 548) | def imagetransformerpp_base_12l_8h_big_uncond_dr03_dan_m_bs1(): function imagetransformerpp_base_14l_8h_big_uncond_dr03_dan_p_bs1 (line 558) | def imagetransformerpp_base_14l_8h_big_uncond_dr03_dan_p_bs1(): function imagetransformerpp_base_5l_8h_big_uncond_dr00_dan_g_bs1 (line 566) | def imagetransformerpp_base_5l_8h_big_uncond_dr00_dan_g_bs1(): function imagetransformerpp_base_5l_8h_dr00_dan_g_bs1_adafactor (line 584) | def imagetransformerpp_base_5l_8h_dr00_dan_g_bs1_adafactor(): function imagetransformerpp_base_6l_8h_dr00_dan_g_bs1_adafactor (line 594) | def imagetransformerpp_base_6l_8h_dr00_dan_g_bs1_adafactor(): function imagetransformerpp_base_14l_8h_big_uncond_dr03_dan_eval (line 602) | def imagetransformerpp_base_14l_8h_big_uncond_dr03_dan_eval(): function imagetransformer_base_8l_8h_big_cond_dr03_dan_128 (line 612) | def imagetransformer_base_8l_8h_big_cond_dr03_dan_128(): function imagetransformer_base_10l_8h_big_cond_dr03_dan (line 620) | def imagetransformer_base_10l_8h_big_cond_dr03_dan(): function imagetransformer_base_10l_8h_big_uncond_dr03_dan (line 628) | def imagetransformer_base_10l_8h_big_uncond_dr03_dan(): function imagetransformer_base_8l_8h_big_cond_dr03_dan_dilated (line 636) | def imagetransformer_base_8l_8h_big_cond_dr03_dan_dilated(): function imagetransformer_base_8l_8h_big_cond_dr03_dan_dilated_b (line 648) | def imagetransformer_base_8l_8h_big_cond_dr03_dan_dilated_b(): function imagetransformer_base_8l_8h_big_cond_dr03_dan_dilated_c (line 657) | def imagetransformer_base_8l_8h_big_cond_dr03_dan_dilated_c(): function imagetransformer_base_8l_8h_big_cond_dr03_dan_dilated_d (line 666) | def imagetransformer_base_8l_8h_big_cond_dr03_dan_dilated_d(): function imagetransformer_base_12l_8h_big (line 674) | def imagetransformer_base_12l_8h_big(): function imagetransformer1d_base_8l_64by64 (line 689) | def imagetransformer1d_base_8l_64by64(): function imagetransformer1d_base_12l_64by64 (line 706) | def imagetransformer1d_base_12l_64by64(): function imagetransformer_base_14l_8h_big (line 723) | def imagetransformer_base_14l_8h_big(): function imagetransformer_base_14l_8h_big_dr01 (line 731) | def imagetransformer_base_14l_8h_big_dr01(): function imagetransformer_base_12l_8h_big_uncond (line 739) | def imagetransformer_base_12l_8h_big_uncond(): function imagetransformer_base_14l_8h_big_uncond (line 747) | def imagetransformer_base_14l_8h_big_uncond(): function imagetransformer_sep_channels_12l_16h_imagenet_large (line 755) | def imagetransformer_sep_channels_12l_16h_imagenet_large(): function imagetransformer_sep_channels_16l_16h_imgnet_lrg_loc (line 769) | def imagetransformer_sep_channels_16l_16h_imgnet_lrg_loc(): function imagetransformer_sep_channels_16l_16h_imgnet_lrg_loc_128 (line 780) | def imagetransformer_sep_channels_16l_16h_imgnet_lrg_loc_128(): function imagetransformer_sep_output_channels_8l_local_and_global_att (line 791) | def imagetransformer_sep_output_channels_8l_local_and_global_att(): function imagetransformer_base_10l_16h_big_uncond_dr01_imgnet (line 800) | def imagetransformer_base_10l_16h_big_uncond_dr01_imgnet(): function imagetransformer_base_10l_16h_big_dr01_imgnet (line 814) | def imagetransformer_base_10l_16h_big_dr01_imgnet(): function imagetransformer_sep_channels_8l_8h (line 829) | def imagetransformer_sep_channels_8l_8h(): function imagetransformer_sep_channels_8l_8h_local_and_global_att (line 843) | def imagetransformer_sep_channels_8l_8h_local_and_global_att(): function imagetransformer_bas8l_8h_big_uncond_dr03_imgnet (line 858) | def imagetransformer_bas8l_8h_big_uncond_dr03_imgnet(): function imagetransformer_tiny (line 871) | def imagetransformer_tiny(): function imagetransformerpp_tiny (line 882) | def imagetransformerpp_tiny(): function imagetransformer_tiny_tpu (line 892) | def imagetransformer_tiny_tpu(): function imagetransformer_base_10l_16h_big_dr01_moe_imgnet (line 903) | def imagetransformer_base_10l_16h_big_dr01_moe_imgnet(): function imagetransformer_moe_tiny (line 919) | def imagetransformer_moe_tiny(): function update_hparams_for_tpu (line 934) | def update_hparams_for_tpu(hparams): function imagetransformer_sep_channels_8l_tpu (line 942) | def imagetransformer_sep_channels_8l_tpu(): function imagetransformer_b10l_4h_big_uncond_dr03_tpu (line 953) | def imagetransformer_b10l_4h_big_uncond_dr03_tpu(): function imagetransformer_b10l_dr03_moe_tpu (line 970) | def imagetransformer_b10l_dr03_moe_tpu(): function imagetransformer_b10l_4h_big_uncond_dr03_lr025_tpu (line 984) | def imagetransformer_b10l_4h_big_uncond_dr03_lr025_tpu(): function imagetransformer_b12l_4h_big_uncond_dr03_tpu (line 1000) | def imagetransformer_b12l_4h_big_uncond_dr03_tpu(): function imagetransformer_b12l_4h_big_uncond_dr03_lr025_tpu (line 1017) | def imagetransformer_b12l_4h_big_uncond_dr03_lr025_tpu(): function imagetransformer_b12l_4h_b256_uncond_dr03_tpu (line 1026) | def imagetransformer_b12l_4h_b256_uncond_dr03_tpu(): function imagetransformer_b12l_4h_b256_uncond_dr03_rel_tpu (line 1046) | def imagetransformer_b12l_4h_b256_uncond_dr03_rel_tpu(): function imagetransformer_cifar_tpu_range (line 1055) | def imagetransformer_cifar_tpu_range(rhp): function imagetransformer_b12l_4h_b128_h512_uncond_dr03_tpu (line 1067) | def imagetransformer_b12l_4h_b128_h512_uncond_dr03_tpu(): function imagetransformer_b12l_4h_b128_h512_uncond_dr01_im (line 1086) | def imagetransformer_b12l_4h_b128_h512_uncond_dr01_im(): function imagetransformer_b12l_4h_uncond_dr03_tpu (line 1099) | def imagetransformer_b12l_4h_uncond_dr03_tpu(): function imagetransformer_b12l_4h_b128_uncond_dr03_tpu (line 1111) | def imagetransformer_b12l_4h_b128_uncond_dr03_tpu(): function imagetransformer_b12l_8h_b256_uncond_dr03_tpu (line 1131) | def imagetransformer_b12l_8h_b256_uncond_dr03_tpu(): function imagetransformer_b10l_4h_big_uncond_dr01_tpu (line 1148) | def imagetransformer_b10l_4h_big_uncond_dr01_tpu(): FILE: tensor2tensor/models/image_transformer_2d.py class Imagetransformer2d (line 41) | class Imagetransformer2d(t2t_model.T2TModel): method body (line 44) | def body(self, features): class Img2imgTransformer (line 72) | class Img2imgTransformer(t2t_model.T2TModel): method body (line 75) | def body(self, features): class Img2imgTransformerBlockParallel (line 105) | class Img2imgTransformerBlockParallel(t2t_model.T2TModel): method body (line 108) | def body(self, features): method top (line 174) | def top(self, body_output, features): method loss (line 204) | def loss(self, logits, features): method _greedy_infer (line 249) | def _greedy_infer(self, features, decode_length, use_tpu=False): method _beam_decode (line 253) | def _beam_decode(self, features, decode_length, beam_size, top_beams, ... method _slow_greedy_infer_guess_and_check (line 256) | def _slow_greedy_infer_guess_and_check(self, features, decode_length): function image_transformer2d_base (line 368) | def image_transformer2d_base(): function imagetransformer2d_base (line 437) | def imagetransformer2d_base(): function imagetransformer2d_base_8l_8_16 (line 445) | def imagetransformer2d_base_8l_8_16(): function imagetransformer2d_base_8l_8_16_ls (line 454) | def imagetransformer2d_base_8l_8_16_ls(): function imagetransformer2d_base_8l_8_16_big (line 464) | def imagetransformer2d_base_8l_8_16_big(): function imagetransformer2d_base_12l_8_16_big (line 474) | def imagetransformer2d_base_12l_8_16_big(): function imagetransformer2d_base_8l_8_32_big (line 486) | def imagetransformer2d_base_8l_8_32_big(): function imagetransformer_base_10l_8h_big_uncond_dr03_dan_64_2d (line 502) | def imagetransformer_base_10l_8h_big_uncond_dr03_dan_64_2d(): function imagetransformer2d_base_8l_8_64_64by64 (line 524) | def imagetransformer2d_base_8l_8_64_64by64(): function imagetransformer2d_base_12l_8_64_64by64 (line 541) | def imagetransformer2d_base_12l_8_64_64by64(): function imagetransformer2d_base_14l_8_16_big (line 558) | def imagetransformer2d_base_14l_8_16_big(): function imagetransformer2d_base_14l_8_16_big_uncond (line 568) | def imagetransformer2d_base_14l_8_16_big_uncond(): function imagetransformer2d_base_8l_8_16_big_16k (line 575) | def imagetransformer2d_base_8l_8_16_big_16k(): function img2img_transformer2d_base (line 586) | def img2img_transformer2d_base(): function img2img_transformer2d_q1 (line 606) | def img2img_transformer2d_q1(): function img2img_transformer2d_q2 (line 617) | def img2img_transformer2d_q2(): function img2img_transformer2d_q3 (line 628) | def img2img_transformer2d_q3(): function img2img_transformer_base (line 638) | def img2img_transformer_base(): function img2img_transformer_b1 (line 659) | def img2img_transformer_b1(): function img2img_transformer_b2 (line 669) | def img2img_transformer_b2(): function img2img_transformer_b3 (line 679) | def img2img_transformer_b3(): function img2img_transformer_b3_bs1 (line 691) | def img2img_transformer_b3_bs1(): function img2img_transformer_b3_bs2 (line 698) | def img2img_transformer_b3_bs2(): function img2img_transformer_b3_bs3 (line 705) | def img2img_transformer_b3_bs3(): function img2img_transformer_b3_bs4 (line 712) | def img2img_transformer_b3_bs4(): function img2img_transformer_b3_bs5 (line 719) | def img2img_transformer_b3_bs5(): function img2img_transformer_b3_bs6 (line 726) | def img2img_transformer_b3_bs6(): function img2img_transformer_b3_bs7 (line 733) | def img2img_transformer_b3_bs7(): function img2img_transformer_b3_bs8 (line 740) | def img2img_transformer_b3_bs8(): function img2img_transformer_b3_bs9 (line 747) | def img2img_transformer_b3_bs9(): function img2img_transformer_b3_bs10 (line 754) | def img2img_transformer_b3_bs10(): function img2img_transformer_dilated (line 761) | def img2img_transformer_dilated(): function imagetransformer2d_tiny (line 780) | def imagetransformer2d_tiny(): function update_hparams_for_tpu (line 788) | def update_hparams_for_tpu(hparams): function img2img_transformer_base_tpu (line 795) | def img2img_transformer_base_tpu(): function img2img_transformer_tiny_tpu (line 808) | def img2img_transformer_tiny_tpu(): function img2img_transformer2d_n3 (line 818) | def img2img_transformer2d_n3(): function img2img_transformer2d_n31 (line 830) | def img2img_transformer2d_n31(): function img2img_transformer2d_n24 (line 843) | def img2img_transformer2d_n24(): function img2img_transformer2d_n44 (line 857) | def img2img_transformer2d_n44(): function img2img_transformer2d_n103 (line 868) | def img2img_transformer2d_n103(): function img2img_transformer2d_tiny (line 881) | def img2img_transformer2d_tiny(): function img2img_transformer_tiny (line 897) | def img2img_transformer_tiny(): FILE: tensor2tensor/models/image_transformer_2d_test.py class Img2imgTransformerTest (line 32) | class Img2imgTransformerTest(tf.test.TestCase): method _test_img2img_transformer (line 34) | def _test_img2img_transformer(self, net): method testImg2imgTransformer (line 53) | def testImg2imgTransformer(self): class Imagetransformer2dTest (line 57) | class Imagetransformer2dTest(tf.test.TestCase): method _test_imagetransformer_2d (line 59) | def _test_imagetransformer_2d(self, net): method testImagetransformer2d (line 83) | def testImagetransformer2d(self): FILE: tensor2tensor/models/image_transformer_test.py class ImagetransformerTest (line 33) | class ImagetransformerTest(parameterized.TestCase, tf.test.TestCase): method testImagetransformer (line 43) | def testImagetransformer(self, net, hparams): FILE: tensor2tensor/models/lstm.py function _dropout_lstm_cell (line 34) | def _dropout_lstm_cell(hparams, train): function lstm (line 40) | def lstm(inputs, sequence_length, hparams, train, name, initial_state=No... function lstm_attention_decoder (line 72) | def lstm_attention_decoder(inputs, hparams, train, name, initial_state, function lstm_seq2seq_internal (line 179) | def lstm_seq2seq_internal(inputs, targets, hparams, train): function lstm_seq2seq_internal_attention (line 208) | def lstm_seq2seq_internal_attention(inputs, targets, hparams, train, function lstm_bid_encoder (line 230) | def lstm_bid_encoder(inputs, sequence_length, hparams, train, name): function lstm_seq2seq_internal_bid_encoder (line 278) | def lstm_seq2seq_internal_bid_encoder(inputs, targets, hparams, train): function lstm_seq2seq_internal_attention_bid_encoder (line 307) | def lstm_seq2seq_internal_attention_bid_encoder(inputs, targets, hparams, class LSTMEncoder (line 331) | class LSTMEncoder(t2t_model.T2TModel): method body (line 334) | def body(self, features): class LSTMSeq2seq (line 350) | class LSTMSeq2seq(t2t_model.T2TModel): method body (line 352) | def body(self, features): class LSTMSeq2seqAttention (line 362) | class LSTMSeq2seqAttention(t2t_model.T2TModel): method body (line 365) | def body(self, features): class LSTMSeq2seqBidirectionalEncoder (line 388) | class LSTMSeq2seqBidirectionalEncoder(t2t_model.T2TModel): method body (line 390) | def body(self, features): class LSTMSeq2seqAttentionBidirectionalEncoder (line 400) | class LSTMSeq2seqAttentionBidirectionalEncoder(t2t_model.T2TModel): method body (line 402) | def body(self, features): function lstm_seq2seq (line 412) | def lstm_seq2seq(): function lstm_attention_base (line 425) | def lstm_attention_base(): function lstm_bahdanau_attention (line 435) | def lstm_bahdanau_attention(): function lstm_luong_attention (line 443) | def lstm_luong_attention(): function lstm_attention (line 451) | def lstm_attention(): function lstm_bahdanau_attention_multi (line 457) | def lstm_bahdanau_attention_multi(): function lstm_luong_attention_multi (line 465) | def lstm_luong_attention_multi(): function lstm_asr_v1 (line 473) | def lstm_asr_v1(): function lstm_area_attention_base (line 488) | def lstm_area_attention_base(): function lstm_area_attention_enfr (line 504) | def lstm_area_attention_enfr(): function lstm_area_attention_char (line 512) | def lstm_area_attention_char(): function lstm_area_attention_char_enfr (line 520) | def lstm_area_attention_char_enfr(): FILE: tensor2tensor/models/lstm_test.py class LSTMTest (line 30) | class LSTMTest(tf.test.TestCase): method testLSTMSeq2Seq (line 32) | def testLSTMSeq2Seq(self): method testLSTMSeq2SeqAttention (line 52) | def testLSTMSeq2SeqAttention(self): method testLSTMSeq2seqBidirectionalEncoder (line 76) | def testLSTMSeq2seqBidirectionalEncoder(self): method testLSTMSeq2seqAttentionBidirectionalEncoder (line 96) | def testLSTMSeq2seqAttentionBidirectionalEncoder(self): FILE: tensor2tensor/models/mtf_image_transformer.py class MtfImageTransformer (line 40) | class MtfImageTransformer(mtf_model.MtfModel): method inputs_vocab_dim (line 44) | def inputs_vocab_dim(self): method targets_vocab_dim (line 49) | def targets_vocab_dim(self): method outputs_vocab_dim (line 56) | def outputs_vocab_dim(self): method pos_dim (line 60) | def pos_dim(self): method rows_dim (line 64) | def rows_dim(self): method cols_dim (line 68) | def cols_dim(self): method orig_cols_dim (line 73) | def orig_cols_dim(self): method channels_dim (line 77) | def channels_dim(self): method model_dim (line 81) | def model_dim(self): method max_length_dim (line 85) | def max_length_dim(self): method length_dim (line 91) | def length_dim(self): method heads_dim (line 97) | def heads_dim(self): method kv_dim (line 101) | def kv_dim(self): method feedforward_dim (line 105) | def feedforward_dim(self): method activation_type (line 109) | def activation_type(self): method create_positional_emb_2d (line 122) | def create_positional_emb_2d(self, targets): method mtf_model_fn (line 150) | def mtf_model_fn(self, features, mesh): function layer_prepostprocess_dropout (line 244) | def layer_prepostprocess_dropout(x, hparams): function local_attention1d_spatial_decoder (line 255) | def local_attention1d_spatial_decoder(x, kv_dim, heads_dim, function local_attention2d_spatial_decoder (line 293) | def local_attention2d_spatial_decoder(x, kv_dim, heads_dim, function local_attention1d_masked_decoder (line 344) | def local_attention1d_masked_decoder(x, kv_dim, heads_dim, function mtf_image_transformer_base (line 379) | def mtf_image_transformer_base(): function mtf_image_transformer_tiny (line 429) | def mtf_image_transformer_tiny(): function mtf_image_transformer_single (line 448) | def mtf_image_transformer_single(): function mtf_image_transformer_base_single (line 466) | def mtf_image_transformer_base_single(): function mtf_image_transformer_tiny_spatial1d (line 478) | def mtf_image_transformer_tiny_spatial1d(): function mtf_image_transformer_tiny_spatial2d (line 492) | def mtf_image_transformer_tiny_spatial2d(): function mtf_image_transformer_base_cifar (line 506) | def mtf_image_transformer_base_cifar(): function mtf_image_transformer_cifar_4x (line 527) | def mtf_image_transformer_cifar_4x(): function mtf_image_transformer_cifar_mp_4x (line 537) | def mtf_image_transformer_cifar_mp_4x(): function mtf_image_transformer_base_imagenet (line 549) | def mtf_image_transformer_base_imagenet(): function mtf_image_transformer_base_imagenet_mp (line 568) | def mtf_image_transformer_base_imagenet_mp(): function mtf_image_transformer_base_imagenet_mp128 (line 582) | def mtf_image_transformer_base_imagenet_mp128(): function mtf_image_transformer_base_imagenet_mp_sp (line 600) | def mtf_image_transformer_base_imagenet_mp_sp(): function mtf_image_transformer_base_imagenet_mp64 (line 613) | def mtf_image_transformer_base_imagenet_mp64(): function mtf_image_transformer_tiny_8gpu (line 625) | def mtf_image_transformer_tiny_8gpu(): function mtf_image_transformer_length_sharded (line 633) | def mtf_image_transformer_length_sharded(): FILE: tensor2tensor/models/mtf_image_transformer_test.py function get_model (line 37) | def get_model(hparams=None, function get_placement_mesh (line 62) | def get_placement_mesh(hparams): class MtfImageTransformerTest (line 73) | class MtfImageTransformerTest(tf.test.TestCase): method testMtfImageTransformer (line 75) | def testMtfImageTransformer(self): method testMtfImageTransformerDataParallel (line 97) | def testMtfImageTransformerDataParallel(self): method testMtfImageTransformerModelParallel (line 119) | def testMtfImageTransformerModelParallel(self): FILE: tensor2tensor/models/mtf_resnet.py function batch_norm_relu (line 39) | def batch_norm_relu(inputs, is_training, relu=True): function bottleneck_block (line 52) | def bottleneck_block(inputs, function block_layer (line 132) | def block_layer(inputs, class MtfResNet (line 197) | class MtfResNet(mtf_model.MtfModel): method set_activation_type (line 200) | def set_activation_type(self): method mtf_model_fn (line 213) | def mtf_model_fn(self, features, mesh): function mtf_resnet_base (line 319) | def mtf_resnet_base(): function mtf_resnet_tiny (line 366) | def mtf_resnet_tiny(): function mtf_resnet_single (line 383) | def mtf_resnet_single(): function mtf_resnet_base_single (line 398) | def mtf_resnet_base_single(): function mtf_resnet_base_cifar (line 410) | def mtf_resnet_base_cifar(): FILE: tensor2tensor/models/mtf_transformer.py class MtfTransformer (line 36) | class MtfTransformer(mtf_model.MtfModel): method __init__ (line 39) | def __init__(self, method batch_dims (line 61) | def batch_dims(self): method inputs_vocab_dim (line 75) | def inputs_vocab_dim(self): method targets_vocab_dim (line 80) | def targets_vocab_dim(self): method model_dim (line 84) | def model_dim(self): method max_length_dim (line 88) | def max_length_dim(self): method length_dim (line 92) | def length_dim(self): method memory_length_dim (line 96) | def memory_length_dim(self): method heads_dim (line 100) | def heads_dim(self): method kv_dim (line 104) | def kv_dim(self): method feedforward_dim (line 108) | def feedforward_dim(self): method master_dtype (line 112) | def master_dtype(self): method slice_dtype (line 116) | def slice_dtype(self): method activation_dtype (line 120) | def activation_dtype(self): method _import_to_batch_by_length (line 123) | def _import_to_batch_by_length(self, x, name, mesh, hparams): method _embedding_and_softmax_vars (line 129) | def _embedding_and_softmax_vars(self, mesh): method _noisy_targets_from_spec (line 175) | def _noisy_targets_from_spec(self, targets, noising_spec, losses=None): method _noisy_targets (line 216) | def _noisy_targets(self, targets, losses=None): method _mtf_model_fn (line 240) | def _mtf_model_fn(self, features, mesh): method mtf_model_fn (line 396) | def mtf_model_fn(self, features, mesh): method _targets_vocab_size (line 408) | def _targets_vocab_size(self): method _inputs_vocab_size (line 414) | def _inputs_vocab_size(self): method _feedforward_layer (line 419) | def _feedforward_layer(self, x, layer_type, losses=None): method _layer_stack (line 467) | def _layer_stack(self, method sample (line 640) | def sample(self, features, mesh): method _sample (line 644) | def _sample(self, features, mesh): function mtf_transformer_base (line 800) | def mtf_transformer_base(): function mtf_transformer_base_lm (line 896) | def mtf_transformer_base_lm(): function mtf_transformer_tiny (line 906) | def mtf_transformer_tiny(): function mtf_transformer_tiny_lm (line 922) | def mtf_transformer_tiny_lm(): function mtf_transformer_tiny_denoising (line 932) | def mtf_transformer_tiny_denoising(): function mtf_transformer_single (line 942) | def mtf_transformer_single(): function mtf_transformer_enc_single (line 949) | def mtf_transformer_enc_single(): function mtf_transformer_tiny_8gpu (line 956) | def mtf_transformer_tiny_8gpu(): function mtf_transformer_paper_lm (line 962) | def mtf_transformer_paper_lm(size): function mtf_transformer_paper_lm_m1 (line 1002) | def mtf_transformer_paper_lm_m1(): function mtf_transformer_paper_lm_0 (line 1009) | def mtf_transformer_paper_lm_0(): function mtf_transformer_paper_lm_1 (line 1016) | def mtf_transformer_paper_lm_1(): function mtf_transformer_paper_lm_2 (line 1023) | def mtf_transformer_paper_lm_2(): function mtf_transformer_paper_lm_3 (line 1030) | def mtf_transformer_paper_lm_3(): function mtf_transformer_paper_lm_4 (line 1037) | def mtf_transformer_paper_lm_4(): function mtf_transformer_paper_lm_5 (line 1044) | def mtf_transformer_paper_lm_5(): function mtf_transformer_paper_tr (line 1050) | def mtf_transformer_paper_tr(size): function mtf_transformer_paper_tr_m1 (line 1078) | def mtf_transformer_paper_tr_m1(): function mtf_transformer_paper_tr_0 (line 1085) | def mtf_transformer_paper_tr_0(): function mtf_transformer_paper_tr_0_a32 (line 1092) | def mtf_transformer_paper_tr_0_a32(): function mtf_transformer_paper_tr_0_nf (line 1099) | def mtf_transformer_paper_tr_0_nf(): function mtf_transformer_paper_tr_1 (line 1106) | def mtf_transformer_paper_tr_1(): function mtf_transformer_paper_tr_2 (line 1113) | def mtf_transformer_paper_tr_2(): function mtf_transformer_paper_tr_3 (line 1120) | def mtf_transformer_paper_tr_3(): function mtf_transformer_paper_tr_4 (line 1127) | def mtf_transformer_paper_tr_4(): function mtf_transformer_paper_tr_0_mesh_8 (line 1134) | def mtf_transformer_paper_tr_0_mesh_8(): function mtf_transformer_paper_tr_4_mesh_16_8 (line 1141) | def mtf_transformer_paper_tr_4_mesh_16_8(): function mtf_transformer_paper_tr_6_mesh_64_8 (line 1148) | def mtf_transformer_paper_tr_6_mesh_64_8(): function mtf_transformer_paper_tr_0_mesh_8_v2 (line 1156) | def mtf_transformer_paper_tr_0_mesh_8_v2(): function mtf_transformer_paper_tr_0_mesh_128 (line 1164) | def mtf_transformer_paper_tr_0_mesh_128(): function mtf_transformer_paper_tr_0_mesh_512 (line 1172) | def mtf_transformer_paper_tr_0_mesh_512(): function mtf_transformer_lm_baseline (line 1180) | def mtf_transformer_lm_baseline(): FILE: tensor2tensor/models/mtf_transformer2.py class MtfUnitransformer (line 36) | class MtfUnitransformer(mtf_model.MtfModel): method batch_dims (line 44) | def batch_dims(self): method combine_batch_dims (line 57) | def combine_batch_dims(self, x): method autoregressive (line 64) | def autoregressive(self): method variable_dtype (line 68) | def variable_dtype(self): method length_dim (line 75) | def length_dim(self): method _import_to_batch_by_length (line 79) | def _import_to_batch_by_length(self, x, name, mesh): method _import_feature (line 84) | def _import_feature(self, features, mesh, key): method model (line 108) | def model(self): method _mtf_model_fn (line 132) | def _mtf_model_fn(self, features, mesh): method mtf_model_fn (line 163) | def mtf_model_fn(self, features, mesh): method _targets_vocab_size (line 170) | def _targets_vocab_size(self): method _inputs_vocab_size (line 176) | def _inputs_vocab_size(self): method sample (line 181) | def sample(self, features, mesh): class MtfBitransformer (line 214) | class MtfBitransformer(MtfUnitransformer): method model (line 217) | def model(self): method _mtf_model_fn (line 250) | def _mtf_model_fn(self, features, mesh): method sample (line 284) | def sample(self, features, mesh): function attention_kwargs_from_hparams (line 303) | def attention_kwargs_from_hparams(hparams): function self_attention_layer (line 311) | def self_attention_layer(hparams, prefix): function local_self_attention_layer (line 322) | def local_self_attention_layer(hparams, prefix): function enc_dec_attention_layer (line 334) | def enc_dec_attention_layer(hparams, prefix): function dense_relu_dense_layer (line 344) | def dense_relu_dense_layer(hparams, prefix): function moe_1d_layer (line 352) | def moe_1d_layer(hparams, prefix): function moe_2d_layer (line 359) | def moe_2d_layer(hparams, prefix): function layer_stack_from_hparams (line 366) | def layer_stack_from_hparams(hparams, prefix): function mtf_transformer2_base (line 375) | def mtf_transformer2_base(): function mtf_unitransformer_base (line 454) | def mtf_unitransformer_base(): function mtf_bitransformer_base (line 473) | def mtf_bitransformer_base(): function mtf_unitransformer_tiny (line 509) | def mtf_unitransformer_tiny(): function mtf_bitransformer_tiny (line 521) | def mtf_bitransformer_tiny(): function mtf_unitransformer_all_layers_tiny (line 535) | def mtf_unitransformer_all_layers_tiny(): function mtf_bitransformer_all_layers_tiny (line 547) | def mtf_bitransformer_all_layers_tiny(): function mtr_lm_dense (line 562) | def mtr_lm_dense(sz): function mtr_lm_dense_0 (line 594) | def mtr_lm_dense_0(): function mtr_lm_dense_0_h1_16 (line 599) | def mtr_lm_dense_0_h1_16(): function mtr_lm_dense_1 (line 607) | def mtr_lm_dense_1(): function mtr_lm_dense_2 (line 612) | def mtr_lm_dense_2(): function mtr_lm_dense_3 (line 619) | def mtr_lm_dense_3(): function mtr_lm_v1 (line 626) | def mtr_lm_v1(): function mtr_lm_v1_h1_8 (line 653) | def mtr_lm_v1_h1_8(): function mtr_tr_dense (line 660) | def mtr_tr_dense(sz): function mtr_tr_dense_0 (line 695) | def mtr_tr_dense_0(): function mtr_tr_dense_1 (line 700) | def mtr_tr_dense_1(): function mtr_tr_dense_2 (line 705) | def mtr_tr_dense_2(): function mtr_tr_dense_3 (line 712) | def mtr_tr_dense_3(): function mtr_tr_dense_3_88 (line 719) | def mtr_tr_dense_3_88(): function mtr_tr_dense_3_fast (line 726) | def mtr_tr_dense_3_fast(): function mtr_tr_dense_local (line 734) | def mtr_tr_dense_local(sz): function mtr_tr_dense_local_0 (line 743) | def mtr_tr_dense_local_0(): function mtr_tr_dense_local_0_w8 (line 748) | def mtr_tr_dense_local_0_w8(): function mtr_tr_dense_local_0_h1_16 (line 755) | def mtr_tr_dense_local_0_h1_16(): function mtr_tr_dense_local_0_h1_16_shared (line 763) | def mtr_tr_dense_local_0_h1_16_shared(): function mtr_tr_dense_local_0_h1_8_kv256 (line 770) | def mtr_tr_dense_local_0_h1_8_kv256(): function mtr_tr_dense_local_0_h1_16_shared_kv (line 779) | def mtr_tr_dense_local_0_h1_16_shared_kv(): function mtr_tr_dense_0_h4 (line 786) | def mtr_tr_dense_0_h4(): function mtr_tr_dense_0_h16 (line 793) | def mtr_tr_dense_0_h16(): function mtr_tr_dense_0_extra_logit (line 800) | def mtr_tr_dense_0_extra_logit(): function mtr_tr_dense_0_h1_8 (line 807) | def mtr_tr_dense_0_h1_8(): function mtr_tr_dense_0_h1_1 (line 814) | def mtr_tr_dense_0_h1_1(): function mtr_tr_dense_0_h1_16 (line 821) | def mtr_tr_dense_0_h1_16(): function mtr_tr_dense_0_h2_16 (line 829) | def mtr_tr_dense_0_h2_16(): function mtr_tr_dense_0_shared_kv (line 837) | def mtr_tr_dense_0_shared_kv(): function mtr_tr_enfr_v0 (line 844) | def mtr_tr_enfr_v0(): function mtr_tr_ende_v0 (line 851) | def mtr_tr_ende_v0(): function mtr_tr_ende_deep (line 861) | def mtr_tr_ende_deep(): FILE: tensor2tensor/models/mtf_transformer_test.py function get_model (line 38) | def get_model(hparams=None, mode=tf_estimator.ModeKeys.TRAIN, function get_placement_mesh (line 66) | def get_placement_mesh(hparams): class MtfTransformerTest (line 77) | class MtfTransformerTest(tf.test.TestCase): method testMtfTransformer (line 79) | def testMtfTransformer(self): method testMtfTransformerDataParallel (line 98) | def testMtfTransformerDataParallel(self): method testMtfTransformerModelParallel (line 117) | def testMtfTransformerModelParallel(self): method testMtfTransformerDataModelParallel (line 136) | def testMtfTransformerDataModelParallel(self): method testMtfTransformerEncoderDataModelParallel (line 155) | def testMtfTransformerEncoderDataModelParallel(self): FILE: tensor2tensor/models/neural_architecture_search/nas_layers.py class TranslationLayer (line 72) | class TranslationLayer(object): method _apply_logic (line 78) | def _apply_logic(self, input_tensor, output_depth, hparams, var_scope_... method apply_layer (line 103) | def apply_layer(self, method num_params (line 175) | def num_params(self, input_depth, output_depth, **kwargs): class LayerRegisteredError (line 188) | class LayerRegisteredError(Exception): class LayerRegistry (line 192) | class LayerRegistry(object): method __init__ (line 199) | def __init__(self): method register_layer (line 202) | def register_layer(self, name, translation_layer): method get (line 211) | def get(self, name): method get_layer_names (line 214) | def get_layer_names(self): class ConvLayerBase (line 222) | class ConvLayerBase(TranslationLayer): method __init__ (line 225) | def __init__(self, conv_type, conv_width, dilation_rate): method _conv_function (line 230) | def _conv_function(self, input_tensor, output_depth, padding): method _apply_logic (line 234) | def _apply_logic(self, input_tensor, output_depth, hparams, var_scope_... class SeparableConvLayer (line 256) | class SeparableConvLayer(ConvLayerBase): method __init__ (line 259) | def __init__(self, conv_width): method _conv_function (line 262) | def _conv_function(self, input_tensor, output_depth, padding): method num_params (line 272) | def num_params(self, input_depth, output_depth, **unused_kwargs): class StandardConvLayer (line 277) | class StandardConvLayer(ConvLayerBase): method __init__ (line 280) | def __init__(self, conv_width): method _conv_function (line 283) | def _conv_function(self, input_tensor, output_depth, padding): method num_params (line 290) | def num_params(self, input_depth, output_depth, **unused_kwargs): function calculate_depthwise_channel_multiplier (line 294) | def calculate_depthwise_channel_multiplier(input_depth, output_depth): class DepthwiseConvLayer (line 305) | class DepthwiseConvLayer(ConvLayerBase): method __init__ (line 308) | def __init__(self, conv_width): method _conv_function (line 311) | def _conv_function(self, input_tensor, output_depth, padding): method num_params (line 329) | def num_params(self, input_depth, output_depth, **unused_kwargs): class LightweightConvLayer (line 335) | class LightweightConvLayer(ConvLayerBase): method __init__ (line 338) | def __init__(self, conv_width, num_repeat): method _conv_function (line 342) | def _conv_function(self, input_tensor, output_depth, padding): method num_params (line 374) | def num_params(self, input_depth, output_depth, **unused_kwargs): class DilatedConvLayer (line 381) | class DilatedConvLayer(ConvLayerBase): method __init__ (line 384) | def __init__(self, conv_width): method _conv_function (line 387) | def _conv_function(self, input_tensor, output_depth, padding): method num_params (line 398) | def num_params(self, input_depth, output_depth, **unused_kwargs): class AttentionLayer (line 402) | class AttentionLayer(TranslationLayer): method __init__ (line 405) | def __init__(self, method _apply_logic (line 417) | def _apply_logic(self, method num_params (line 454) | def num_params(self, input_depth, output_depth, **unused_kwargs): class AttendToEncoderLayerBase (line 464) | class AttendToEncoderLayerBase(TranslationLayer): method _determine_encoder_cell_index (line 467) | def _determine_encoder_cell_index(self, cell_number, num_encoder_cells): method _apply_logic (line 471) | def _apply_logic(self, method num_params (line 510) | def num_params(self, input_depth, output_depth, **kwargs): class AttendToEncoderTopDownLayer (line 526) | class AttendToEncoderTopDownLayer(AttendToEncoderLayerBase): method __init__ (line 533) | def __init__(self, delay, increment_step): method _determine_encoder_cell_index (line 537) | def _determine_encoder_cell_index(self, cell_number, num_encoder_cells): class GatedLinearUnitLayer (line 544) | class GatedLinearUnitLayer(TranslationLayer): method __init__ (line 547) | def __init__(self): method _apply_logic (line 550) | def _apply_logic(self, input_tensor, output_depth, hparams, var_scope_... method num_params (line 557) | def num_params(self, input_depth, output_depth, **unused_kwargs): class IdentityLayer (line 561) | class IdentityLayer(TranslationLayer): method _apply_logic (line 564) | def _apply_logic(self, input_tensor, output_depth, hparams, var_scope_... method num_params (line 573) | def num_params(self, input_depth, output_depth, **unused_kwargs): function register_encoder_decoder_layer (line 577) | def register_encoder_decoder_layer(name, translation_layer): FILE: tensor2tensor/models/neural_architecture_search/nas_layers_test.py function _apply_encoder_layer (line 45) | def _apply_encoder_layer(translation_layer, output_depth, nonpadding_list): function _apply_decoder_layer (line 68) | def _apply_decoder_layer(translation_layer, input_tensor, output_depth, function _zero_after_index_copy (line 103) | def _zero_after_index_copy(feed_input, zero_after_index): function _get_empirical_parameters (line 112) | def _get_empirical_parameters(): function _create_nonpadding_list (line 123) | def _create_nonpadding_list(): class LayersTest (line 132) | class LayersTest(parameterized.TestCase, tf.test.TestCase): method test_encoder_registry (line 136) | def test_encoder_registry(self): method test_decoder_registry (line 176) | def test_decoder_registry(self): method test_encoder_layer (line 223) | def test_encoder_layer(self, translation_layer_name, output_depth): method test_decoder_layer (line 259) | def test_decoder_layer(self, translation_layer_name, output_depth): FILE: tensor2tensor/models/neural_architecture_search/nas_model.py function should_alter_output_dim (line 90) | def should_alter_output_dim(layer_name, enforce_fixed_output_sizes, inpu... function get_activation_names (line 108) | def get_activation_names(): function _pad_shallow_tensors (line 112) | def _pad_shallow_tensors(tensors, pad_value): class CombinerFunction (line 135) | class CombinerFunction(object): method combine_tensors (line 141) | def combine_tensors(self, tensors): method combined_output_dim (line 152) | def combined_output_dim(self, output_dims): class AddCombiner (line 163) | class AddCombiner(CombinerFunction): method combine_tensors (line 166) | def combine_tensors(self, tensors): method combined_output_dim (line 180) | def combined_output_dim(self, output_dims): class MultiplyCombiner (line 184) | class MultiplyCombiner(CombinerFunction): method combine_tensors (line 187) | def combine_tensors(self, tensors): method combined_output_dim (line 201) | def combined_output_dim(self, output_dims): class ConcatCombiner (line 205) | class ConcatCombiner(CombinerFunction): method combine_tensors (line 208) | def combine_tensors(self, tensors): method combined_output_dim (line 216) | def combined_output_dim(self, output_dims): class NasSeq2Seq (line 235) | class NasSeq2Seq(transformer.Transformer): method encode (line 273) | def encode(self, inputs, target_space, hparams, features=None, losses=... method decode (line 316) | def decode(self, method _encoder (line 369) | def _encoder(self, method _decoder (line 380) | def _decoder(self, method estimator_spec_eval (line 394) | def estimator_spec_eval(self, features, logits, labels, loss, losses_d... method _gpu_estimator_spec_eval (line 406) | def _gpu_estimator_spec_eval(self, features, logits, labels, loss, method _tpu_estimator_spec_eval (line 431) | def _tpu_estimator_spec_eval(self, features, logits, labels, loss, method _beam_decode (line 459) | def _beam_decode(self, features, decode_length, beam_size, top_beams, ... function _apply_layer_norm (line 485) | def _apply_layer_norm(input_tensor, nonpadding, hparams): function _apply_nas_branch (line 500) | def _apply_nas_branch(norm, layer_norm_dict, hidden_states, nonpadding, ... function apply_nas_layers (line 546) | def apply_nas_layers(input_tensor, function nas_encoder (line 757) | def nas_encoder(encoder_input, function nas_decoder (line 821) | def nas_decoder(decoder_input, function calculate_branching_model_parameters (line 942) | def calculate_branching_model_parameters(encoding_depth, function nas_seq2seq_base (line 1079) | def nas_seq2seq_base(): FILE: tensor2tensor/models/neural_architecture_search/nas_model_test.py function _list_product (line 39) | def _list_product(num_list): function _get_transformer_branching_encoder_config (line 47) | def _get_transformer_branching_encoder_config(): function _get_transformer_branching_decoder_config (line 81) | def _get_transformer_branching_decoder_config(): function _add_transformer_branching_hparams (line 118) | def _add_transformer_branching_hparams(hparams): class NasSeq2SeqTest (line 164) | class NasSeq2SeqTest(parameterized.TestCase, tf.test.TestCase): method _test_model (line 166) | def _test_model(self, model_cls, hparams): method _get_encoder_hparams (line 197) | def _get_encoder_hparams(self): method test_nas_seq2seq (line 209) | def test_nas_seq2seq(self): method _get_wrong_output_dim_decoder_hparams (line 214) | def _get_wrong_output_dim_decoder_hparams(self): method test_nas_decoder_resizing_output (line 228) | def test_nas_decoder_resizing_output(self): method test_calculate_branching_model_parameters_transformer (line 265) | def test_calculate_branching_model_parameters_transformer( method test_calculate_branching_model_parameters_decoder_resize (line 343) | def test_calculate_branching_model_parameters_decoder_resize( method test_calculate_branching_model_parameters_output_size_only_final (line 387) | def test_calculate_branching_model_parameters_output_size_only_final(s... method test_calculate_branching_model_parameters_output_size_last_two (line 427) | def test_calculate_branching_model_parameters_output_size_last_two(self): FILE: tensor2tensor/models/neural_assistant.py class NeuralAssistant (line 31) | class NeuralAssistant(transformer.Transformer): method __init__ (line 34) | def __init__(self, *args, **kwargs): method model_fn (line 42) | def model_fn(self, features): method encode_knowledge_bottom (line 89) | def encode_knowledge_bottom(self, features): method compute_knowledge_selection_and_loss (line 115) | def compute_knowledge_selection_and_loss(self, features, encoder_output, method body (line 268) | def body(self, features): method _normalize_body_output (line 355) | def _normalize_body_output(self, body_out): method _beam_decode (line 366) | def _beam_decode(self, method _greedy_infer (line 397) | def _greedy_infer(self, features, decode_length, use_tpu=False): function compute_last_embedding (line 421) | def compute_last_embedding(input_embeddings, input_lengths, hparams): function compute_max_pool_embedding (line 448) | def compute_max_pool_embedding(input_embeddings, input_lengths): function compute_average_embedding (line 469) | def compute_average_embedding(input_embeddings, input_lengths): function compute_summary_embedding (line 490) | def compute_summary_embedding(input_embeddings, input_lengths, hparams): function neural_assistant_base (line 510) | def neural_assistant_base(): function neural_assistant_tiny (line 535) | def neural_assistant_tiny(): function neural_assistant_tiny_ds (line 560) | def neural_assistant_tiny_ds(): FILE: tensor2tensor/models/neural_gpu.py function neural_gpu_body (line 31) | def neural_gpu_body(inputs, hparams, name=None): class NeuralGPU (line 56) | class NeuralGPU(t2t_model.T2TModel): method body (line 58) | def body(self, features): function diagonal_neural_gpu (line 62) | def diagonal_neural_gpu(inputs, hparams, name=None): class DiagonalNeuralGPU (line 91) | class DiagonalNeuralGPU(t2t_model.T2TModel): method body (line 93) | def body(self, features): function neural_gpu (line 98) | def neural_gpu(): FILE: tensor2tensor/models/neural_gpu_test.py class NeuralGPUTest (line 31) | class NeuralGPUTest(tf.test.TestCase): method testNeuralGPU (line 33) | def testNeuralGPU(self): FILE: tensor2tensor/models/research/adafactor_experiments.py function mimic_adam_with_adafactor (line 27) | def mimic_adam_with_adafactor(hparams): function afx_adam (line 46) | def afx_adam(): function afx_mimic_adam (line 61) | def afx_mimic_adam(): function afx_base (line 69) | def afx_base(): function afx_factored (line 77) | def afx_factored(): function afx_fast (line 84) | def afx_fast(): function afx_clip (line 91) | def afx_clip(): function afx_clip2 (line 98) | def afx_clip2(): function afx_clip_factored (line 105) | def afx_clip_factored(): function afx_pow05 (line 112) | def afx_pow05(): function afx_pow08 (line 120) | def afx_pow08(): function afx_pow10 (line 127) | def afx_pow10(): function afx_pow08_clip (line 134) | def afx_pow08_clip(): function afx_relative (line 141) | def afx_relative(): function afx_unscale (line 150) | def afx_unscale(): function afx_unscale_relative (line 158) | def afx_unscale_relative(): function afx_adafactor (line 167) | def afx_adafactor(): function afx_small (line 177) | def afx_small(): function afx_small_p16 (line 188) | def afx_small_p16(): function afx_small_p12 (line 196) | def afx_small_p12(): function afx_small_p11 (line 203) | def afx_small_p11(): function afx_small_p10 (line 210) | def afx_small_p10(): function afx_small_p8 (line 217) | def afx_small_p8(): function afx_small_bfloat16 (line 224) | def afx_small_bfloat16(): FILE: tensor2tensor/models/research/aligned.py function _should_preprocess (line 42) | def _should_preprocess(layer_type): function _should_postprocess (line 46) | def _should_postprocess(layer_type): class Aligned (line 51) | class Aligned(t2t_model.T2TModel): method use_body_sharded (line 55) | def use_body_sharded(): method body_sharded (line 58) | def body_sharded(self, sharded_features): method infer (line 228) | def infer(self, function get_batch_coordinate (line 246) | def get_batch_coordinate(x): function aligned_base (line 257) | def aligned_base(): function aligned_memory_efficient (line 328) | def aligned_memory_efficient(): function aligned_local_expert (line 344) | def aligned_local_expert(): function aligned_grouped (line 360) | def aligned_grouped(): function aligned_local (line 376) | def aligned_local(): function aligned_local_1k (line 392) | def aligned_local_1k(): function aligned_pseudolocal (line 408) | def aligned_pseudolocal(): function aligned_pseudolocal_256 (line 424) | def aligned_pseudolocal_256(): function aligned_no_timing (line 440) | def aligned_no_timing(): function aligned_no_att (line 456) | def aligned_no_att(): function aligned_pos_emb (line 472) | def aligned_pos_emb(): function aligned_moe (line 488) | def aligned_moe(): function aligned_lsh (line 504) | def aligned_lsh(): function aligned_8k (line 516) | def aligned_8k(): function aligned_8k_grouped (line 531) | def aligned_8k_grouped(): FILE: tensor2tensor/models/research/attention_lm.py class AttentionLM (line 47) | class AttentionLM(t2t_model.T2TModel): method body (line 50) | def body(self, features): function attention_lm_prepare_decoder (line 68) | def attention_lm_prepare_decoder(targets, hparams): function attention_lm_decoder (line 94) | def attention_lm_decoder(decoder_input, function attention_lm_base (line 133) | def attention_lm_base(): function attention_lm_small (line 169) | def attention_lm_small(): function attention_lm_translation (line 188) | def attention_lm_translation(): function attention_lm_translation_l12 (line 202) | def attention_lm_translation_l12(): function attention_lm_translation_full_attention (line 211) | def attention_lm_translation_full_attention(): FILE: tensor2tensor/models/research/attention_lm_moe.py class AttentionType (line 45) | class AttentionType(object): method get_choices (line 57) | def get_choices(): class AttentionLmMoe (line 81) | class AttentionLmMoe(t2t_model.T2TModel): method use_body_sharded (line 85) | def use_body_sharded(): method body_sharded (line 88) | def body_sharded(self, sharded_features): function attention_lm_moe_prepare_decoder (line 335) | def attention_lm_moe_prepare_decoder(targets, hparams): function get_batch_coordinate (line 369) | def get_batch_coordinate(x, axis=0): function expand_batch_coordinates (line 378) | def expand_batch_coordinates(bc, length_factor): function remove_pad (line 399) | def remove_pad(x, pad_remover, mode): function restore_pad (line 427) | def restore_pad(x, ref_x, pad_remover, mode): function attention_lm_moe_base (line 436) | def attention_lm_moe_base(): function attention_lm_moe_base_long_seq (line 520) | def attention_lm_moe_base_long_seq(): function attention_lm_moe_base_ae (line 533) | def attention_lm_moe_base_ae(): function attention_lm_moe_base_local (line 547) | def attention_lm_moe_base_local(): function attention_lm_moe_base_hybrid (line 555) | def attention_lm_moe_base_hybrid(): function attention_lm_hybrid_v2 (line 567) | def attention_lm_hybrid_v2(): function attention_lm_16k (line 579) | def attention_lm_16k(): function attention_lm_12k (line 586) | def attention_lm_12k(): function attention_lm_11k (line 593) | def attention_lm_11k(): function attention_lm_ae_extended (line 600) | def attention_lm_ae_extended(): function attention_lm_moe_base_memeff (line 616) | def attention_lm_moe_base_memeff(): function attention_lm_moe_small (line 633) | def attention_lm_moe_small(): function attention_lm_moe_tiny (line 655) | def attention_lm_moe_tiny(): function attention_lm_attention_moe_tiny (line 667) | def attention_lm_attention_moe_tiny(): function attention_lm_no_moe_small (line 682) | def attention_lm_no_moe_small(): function attention_lm_moe_large (line 700) | def attention_lm_moe_large(): function attention_lm_moe_large_diet (line 727) | def attention_lm_moe_large_diet(): function attention_lm_moe_memory_efficient (line 734) | def attention_lm_moe_memory_efficient(): function attention_lm_moe_32b_diet (line 749) | def attention_lm_moe_32b_diet(): function attention_lm_moe_24b_diet (line 758) | def attention_lm_moe_24b_diet(): function attention_lm_moe_translation (line 768) | def attention_lm_moe_translation(): function attention_lm_moe_unscramble_base (line 785) | def attention_lm_moe_unscramble_base(): FILE: tensor2tensor/models/research/autoencoders.py function reverse_gradient (line 35) | def reverse_gradient(x, lr=1.0): function time_to_channels (line 39) | def time_to_channels(embedded_video): class AutoencoderBasic (line 54) | class AutoencoderBasic(t2t_model.T2TModel): method __init__ (line 57) | def __init__(self, *args, **kwargs): method num_channels (line 64) | def num_channels(self): method image_summary (line 72) | def image_summary(self, name, image_logits, max_outputs=1): method embed (line 82) | def embed(self, x, name="embedding"): method bottleneck (line 97) | def bottleneck(self, x): method unbottleneck (line 106) | def unbottleneck(self, x, res_size, reuse=None): method make_even_size (line 111) | def make_even_size(self, x): method encoder (line 121) | def encoder(self, x): method decoder (line 141) | def decoder(self, x, encoder_layers): method gumbel_sample (line 160) | def gumbel_sample(self, reconstr_gan): method body (line 183) | def body(self, features): method sample (line 379) | def sample(self, features=None, shape=None): method encode (line 392) | def encode(self, x): method infer (line 400) | def infer(self, features, *args, **kwargs): # pylint: disable=argumen... method decode (line 426) | def decode(self, bottleneck): method _get_kernel_and_strides (line 445) | def _get_kernel_and_strides(self): class AutoencoderAutoregressive (line 454) | class AutoencoderAutoregressive(AutoencoderBasic): method body (line 457) | def body(self, features): method infer (line 541) | def infer(self, features, *args, **kwargs): class AutoencoderResidual (line 590) | class AutoencoderResidual(AutoencoderAutoregressive): method dropout (line 593) | def dropout(self, x): method encoder (line 603) | def encoder(self, x): method decoder (line 650) | def decoder(self, x, encoder_layers=None): class AutoencoderResidualVAE (line 714) | class AutoencoderResidualVAE(AutoencoderResidual): method bottleneck (line 717) | def bottleneck(self, x): method sample (line 734) | def sample(self, features=None, shape=None): class AutoencoderBasicDiscrete (line 748) | class AutoencoderBasicDiscrete(AutoencoderAutoregressive): method bottleneck (line 751) | def bottleneck(self, x): method sample (line 763) | def sample(self, features=None, shape=None): class AutoencoderResidualDiscrete (line 778) | class AutoencoderResidualDiscrete(AutoencoderResidual): method variance_loss (line 781) | def variance_loss(self, b): method bottleneck (line 788) | def bottleneck(self, x, bottleneck_bits=None): # pylint: disable=argu... method unbottleneck (line 797) | def unbottleneck(self, x, res_size, reuse=None): method sample (line 801) | def sample(self, features=None, shape=None): class AutoencoderOrderedDiscrete (line 821) | class AutoencoderOrderedDiscrete(AutoencoderResidualDiscrete): method bottleneck (line 824) | def bottleneck(self, x): # pylint: disable=arguments-differ class AutoencoderDualDiscrete (line 848) | class AutoencoderDualDiscrete(AutoencoderResidualDiscrete): method body (line 851) | def body(self, features): method embed (line 858) | def embed(self, x, name="embedding"): method bottleneck (line 866) | def bottleneck(self, x): method unbottleneck (line 895) | def unbottleneck(self, b, res_size, reuse=None): method infer (line 905) | def infer(self, features, *args, **kwargs): # pylint: disable=argumen... class AutoencoderStacked (line 937) | class AutoencoderStacked(AutoencoderResidualDiscrete): method stack (line 940) | def stack(self, b, size, bottleneck_bits, name): method unstack (line 947) | def unstack(self, b, size, bottleneck_bits, name): method stack_loss (line 962) | def stack_loss(self, b, b_pred, name): method full_stack (line 969) | def full_stack(self, b, x_size, bottleneck_bits, losses, is_training, i): method body (line 984) | def body(self, features): function autoencoder_basic (line 1028) | def autoencoder_basic(): function autoencoder_autoregressive (line 1074) | def autoencoder_autoregressive(): function autoencoder_residual (line 1086) | def autoencoder_residual(): function autoencoder_residual_text (line 1108) | def autoencoder_residual_text(): function autoencoder_basic_discrete (line 1129) | def autoencoder_basic_discrete(): function autoencoder_residual_discrete (line 1141) | def autoencoder_residual_discrete(): function autoencoder_residual_discrete_big (line 1158) | def autoencoder_residual_discrete_big(): function autoencoder_ordered_discrete (line 1169) | def autoencoder_ordered_discrete(): function autoencoder_ordered_discrete_image64 (line 1179) | def autoencoder_ordered_discrete_image64(): function autoencoder_ordered_discrete_patched (line 1191) | def autoencoder_ordered_discrete_patched(): function autoencoder_ordered_discrete_single (line 1199) | def autoencoder_ordered_discrete_single(): function autoencoder_ordered_discrete_hs256 (line 1207) | def autoencoder_ordered_discrete_hs256(): function autoencoder_ordered_text (line 1215) | def autoencoder_ordered_text(): function autoencoder_ordered_text_small (line 1239) | def autoencoder_ordered_text_small(): function autoencoder_ordered_discrete_vq (line 1253) | def autoencoder_ordered_discrete_vq(): function autoencoder_discrete_pong (line 1262) | def autoencoder_discrete_pong(): function autoencoder_discrete_tiny (line 1275) | def autoencoder_discrete_tiny(): function autoencoder_discrete_cifar (line 1291) | def autoencoder_discrete_cifar(): function autoencoder_range (line 1305) | def autoencoder_range(rhp): function autoencoder_discrete_pong_range (line 1316) | def autoencoder_discrete_pong_range(rhp): function autoencoder_stacked (line 1323) | def autoencoder_stacked(): FILE: tensor2tensor/models/research/autoencoders_test.py class AutoencoderTest (line 32) | class AutoencoderTest(tf.test.TestCase): method get_mnist_random_output (line 34) | def get_mnist_random_output(self, model_name, hparams_set=None, method mnist_output_shape (line 54) | def mnist_output_shape(self): method testAutoencoderBasic (line 57) | def testAutoencoderBasic(self): method testAutoencoderAutoregressive (line 61) | def testAutoencoderAutoregressive(self): method testAutoencoderResidual (line 65) | def testAutoencoderResidual(self): method testAutoencoderBasicDiscrete (line 69) | def testAutoencoderBasicDiscrete(self): method testAutoencoderResidualDiscrete (line 73) | def testAutoencoderResidualDiscrete(self): method testAutoencoderOrderedDiscrete (line 77) | def testAutoencoderOrderedDiscrete(self): method testAutoencoderOrderedDiscreteVQ (line 81) | def testAutoencoderOrderedDiscreteVQ(self): FILE: tensor2tensor/models/research/cycle_gan.py function discriminator (line 30) | def discriminator(x, compress, hparams, name, reuse=None): function generator (line 41) | def generator(x, hparams, name, reuse=False): function lossfn (line 46) | def lossfn(real_input, fake_input, compress, hparams, lsgan, name): function split_on_batch (line 66) | def split_on_batch(x): function cycle_gan_internal (line 72) | def cycle_gan_internal(inputs, targets, _, hparams): class CycleGAN (line 117) | class CycleGAN(t2t_model.T2TModel): method body (line 119) | def body(self, features): function cycle_gan_small (line 126) | def cycle_gan_small(): FILE: tensor2tensor/models/research/gene_expression.py class GeneExpressionConv (line 32) | class GeneExpressionConv(t2t_model.T2TModel): method body (line 49) | def body(self, features): function conv_layer (line 93) | def conv_layer(x, function fc_layer (line 118) | def fc_layer(x, num_out, dropout_rate, name="fc"): function gene_expression_conv_base (line 129) | def gene_expression_conv_base(): FILE: tensor2tensor/models/research/gene_expression_test.py function gene_expression_conv_test (line 30) | def gene_expression_conv_test(): class GeneExpressionModelsTest (line 37) | class GeneExpressionModelsTest(tf.test.TestCase): method _test_model (line 39) | def _test_model(self, hparams, model_cls): method testGeneExpressionModels (line 65) | def testGeneExpressionModels(self): FILE: tensor2tensor/models/research/glow.py function glow_hparams (line 41) | def glow_hparams(): class Glow (line 71) | class Glow(t2t_model.T2TModel): method init_preprocess (line 76) | def init_preprocess(self, features): method preprocess (line 80) | def preprocess(self, x): method temperature (line 98) | def temperature(self): method is_training (line 104) | def is_training(self): method infer (line 107) | def infer(self, features, *args, **kwargs): # pylint: disable=argumen... method create_init_batch (line 124) | def create_init_batch(self, features): method train_hooks (line 139) | def train_hooks(hook_context): method top_prior (line 143) | def top_prior(self): method body (line 153) | def body(self, features): method objective_tower (line 168) | def objective_tower(self, features, init=True): FILE: tensor2tensor/models/research/glow_init_hook.py class GlowInitHook (line 25) | class GlowInitHook(tf.train.SessionRunHook): method after_create_session (line 33) | def after_create_session(self, session, coord): FILE: tensor2tensor/models/research/glow_ops.py function linear_interpolate (line 36) | def linear_interpolate(tensor1, tensor2, coeffs): function linear_interpolate_rank (line 55) | def linear_interpolate_rank(tensor1, tensor2, coeffs, rank=1): function postprocess (line 87) | def postprocess(x, n_bits_x=8): class TemperedNormal (line 104) | class TemperedNormal(tfp.distributions.Normal): method __init__ (line 107) | def __init__(self, loc, scale, temperature=1.0): method sample (line 112) | def sample(self, sample_shape=(), seed=None, name="sample"): function default_initializer (line 122) | def default_initializer(std=0.05): function get_eps (line 126) | def get_eps(dist, x): function set_eps (line 131) | def set_eps(dist, eps): function assign (line 137) | def assign(w, initial_value): function get_cond_latents_at_level (line 143) | def get_cond_latents_at_level(cond_latents, level, hparams): function check_cond_latents (line 152) | def check_cond_latents(cond_latents, hparams): function get_variable_ddi (line 171) | def get_variable_ddi(name, shape, initial_value, dtype=tf.float32, init=... function get_dropout (line 186) | def get_dropout(x, rate=0.0, init=True): function actnorm_3d (line 204) | def actnorm_3d(name, x, logscale_factor=3.): function actnorm (line 228) | def actnorm(name, x, logscale_factor=3., reverse=False, init=False, function actnorm_center (line 267) | def actnorm_center(name, x, reverse=False, init=False): function actnorm_scale (line 302) | def actnorm_scale(name, x, logscale_factor=3., reverse=False, init=False): function invertible_1x1_conv (line 337) | def invertible_1x1_conv(name, x, reverse=False): function add_edge_bias (line 401) | def add_edge_bias(x, filter_size): function time_pad (line 426) | def time_pad(x, filter_size, dilations): function conv (line 462) | def conv(name, x, output_channels, filter_size=None, stride=None, function conv_block (line 545) | def conv_block(name, x, mid_channels, dilations=None, activation="relu", function dilated_conv_stack (line 603) | def dilated_conv_stack(name, x, mid_channels, output_channels, function conv_stack (line 635) | def conv_stack(name, x, mid_channels, output_channels, dilations=None, function additive_coupling (line 666) | def additive_coupling(name, x, mid_channels=512, reverse=False, function affine_coupling (line 697) | def affine_coupling(name, x, mid_channels=512, activation="relu", function squeeze (line 739) | def squeeze(name, x, factor=2, reverse=True): function get_dilation_rates (line 776) | def get_dilation_rates(hparams, width): function temporal_latent_to_dist (line 801) | def temporal_latent_to_dist(name, x, hparams, output_channels=None): function single_conv_dist (line 844) | def single_conv_dist(name, x, output_channels=None): function latent_to_dist (line 864) | def latent_to_dist(name, x, hparams, output_channels=None): function noise_op (line 926) | def noise_op(latents, hparams): function merge_level_and_latent_dist (line 942) | def merge_level_and_latent_dist(level_dist, latent_dist, function level_cond_prior (line 973) | def level_cond_prior(prior_dist, z, latent, hparams, state): function compute_prior (line 1045) | def compute_prior(name, z, latent, hparams, condition=False, state=None, function split (line 1089) | def split(name, x, reverse=False, eps=None, eps_std=None, cond_latents=N... function revnet_step (line 1153) | def revnet_step(name, x, hparams, reverse=True): function revnet (line 1193) | def revnet(name, x, hparams, reverse=True): function scale_gaussian_prior (line 1219) | def scale_gaussian_prior(name, z, logscale_factor=3.0, trainable=True): function top_prior (line 1246) | def top_prior(name, z_shape, learn_prior="normal", temperature=1.0): function uniform_binning_correction (line 1276) | def uniform_binning_correction(x, n_bits=8): function encoder_decoder (line 1298) | def encoder_decoder(name, x, hparams, eps=None, reverse=False, FILE: tensor2tensor/models/research/glow_ops_test.py class GlowOpsTest (line 39) | class GlowOpsTest(parameterized.TestCase, tf.test.TestCase): method get_glow_hparams (line 41) | def get_glow_hparams(self): method test_get_variable_ddi (line 60) | def test_get_variable_ddi(self): method test_actnorm (line 69) | def test_actnorm(self): method test_invertibility (line 88) | def test_invertibility(self, op, name, dropout=0.0): method test_add_edge_bias (line 105) | def test_add_edge_bias(self): method test_conv2d (line 115) | def test_conv2d(self): method test_conv_stack (line 142) | def test_conv_stack(self, activation="relu"): method check_latent_to_dist (line 157) | def check_latent_to_dist(self, architecture): method test_latent_to_dist (line 172) | def test_latent_to_dist(self): method test_split (line 176) | def test_split(self): method test_revnet_reversibility (line 193) | def test_revnet_reversibility(self, op, name, coupling): method test_encoder_decoder (line 206) | def test_encoder_decoder(self): method test_encoder_decoder_practical_usage (line 237) | def test_encoder_decoder_practical_usage(self): method test_scale_gaussian_prior (line 285) | def test_scale_gaussian_prior(self): method check_split_latent_conditioning (line 301) | def check_split_latent_conditioning(self, merge_std): method test_split_latent_conditioning (line 330) | def test_split_latent_conditioning(self): method test_latent_dist_encoder (line 344) | def test_latent_dist_encoder(self, encoder="conv_lstm", skip=True, method test_conv3d (line 389) | def test_conv3d(self): method test_actnorm_3d (line 417) | def test_actnorm_3d(self): method test_temporal_latent_to_dist (line 441) | def test_temporal_latent_to_dist(self, apply_dilation, activation, method test_temperature_normal (line 466) | def test_temperature_normal(self, temperature): method linear_interpolate_rank (line 487) | def linear_interpolate_rank(self): FILE: tensor2tensor/models/research/glow_test.py class GlowModelTest (line 36) | class GlowModelTest(tf.test.TestCase): method batch (line 38) | def batch(self, one_shot_iterator, batch_size=16): method test_glow (line 46) | def test_glow(self): method test_glow_inference (line 78) | def test_glow_inference(self): FILE: tensor2tensor/models/research/lm_experiments.py function lmx_base (line 45) | def lmx_base(): function lmx_h1k_f4k (line 64) | def lmx_h1k_f4k(): function lmx_h2k_f8k (line 73) | def lmx_h2k_f8k(): function lmx_h3k_f12k (line 82) | def lmx_h3k_f12k(): function lmx_h4k_f16k (line 93) | def lmx_h4k_f16k(): function lmx_relative (line 104) | def lmx_relative(): function lmx_relative_nopos (line 114) | def lmx_relative_nopos(): function lmx_moe (line 122) | def lmx_moe(): function lmx_moe_h1k_f4k_x32 (line 130) | def lmx_moe_h1k_f4k_x32(): function lmx_moe_h1k_f8k_x16 (line 141) | def lmx_moe_h1k_f8k_x16(): function lmx_h1k_f64k (line 153) | def lmx_h1k_f64k(): FILE: tensor2tensor/models/research/moe.py function transformer_moe_layer_v1 (line 30) | def transformer_moe_layer_v1(inputs, output_dim, hparams, train, function transformer_moe_layer_v2 (line 159) | def transformer_moe_layer_v2(inputs, output_dim, hparams, train, function _top_2_gating (line 414) | def _top_2_gating( function set_default_moe_hparams (line 613) | def set_default_moe_hparams(hparams): function _split_into_groups (line 646) | def _split_into_groups(n, max_group_size, mesh_dim_size): FILE: tensor2tensor/models/research/moe_experiments.py function xmoe_tr_dense_2k (line 30) | def xmoe_tr_dense_2k(): function xmoe_tr_dense_32k (line 50) | def xmoe_tr_dense_32k(): function xmoe_tr_1d (line 64) | def xmoe_tr_1d(): function xmoe_tr_2d (line 83) | def xmoe_tr_2d(): function xmoe_dense_4k (line 104) | def xmoe_dense_4k(): function xmoe_dense_8k (line 151) | def xmoe_dense_8k(): function xmoe_dense_64k (line 158) | def xmoe_dense_64k(): function xmoe_top_2 (line 167) | def xmoe_top_2(): function xmoe_top_2_c15 (line 177) | def xmoe_top_2_c15(): function xmoe_2d (line 185) | def xmoe_2d(): function xmoe_2d_debug (line 197) | def xmoe_2d_debug(): function xmoe_2d_c15 (line 214) | def xmoe_2d_c15(): function xmoe_2d_x64 (line 222) | def xmoe_2d_x64(): function xmoe2_dense (line 232) | def xmoe2_dense(sz): function xmoe2_dense_0 (line 271) | def xmoe2_dense_0(): function xmoe2_dense_1 (line 276) | def xmoe2_dense_1(): function xmoe2_dense_2 (line 281) | def xmoe2_dense_2(): function xmoe2_dense_3 (line 286) | def xmoe2_dense_3(): function xmoe2_v1 (line 291) | def xmoe2_v1(): function xmoe2_v1_x128 (line 318) | def xmoe2_v1_x128(): function xmoe2_tiny (line 330) | def xmoe2_tiny(): function xmoe2_v1_l4k (line 345) | def xmoe2_v1_l4k(): function xmoe2_v1_l4k_local_only (line 356) | def xmoe2_v1_l4k_local_only(): function xmoe2_v1_l4k_global_only (line 365) | def xmoe2_v1_l4k_global_only(): function xmoe2_v1_l4k_compressed_c4 (line 374) | def xmoe2_v1_l4k_compressed_c4(): function xmoe2_v1_l4k_compressed_c8 (line 384) | def xmoe2_v1_l4k_compressed_c8(): function wiki_2x2_base (line 392) | def wiki_2x2_base(): function wiki_2x2_v1 (line 431) | def wiki_2x2_v1(): function wiki_2x2_local (line 440) | def wiki_2x2_local(): function denoise_m15 (line 447) | def denoise_m15(): function denoise_m30 (line 456) | def denoise_m30(): function denoise_dense_2_m30 (line 465) | def denoise_dense_2_m30(): function denoise_z15 (line 474) | def denoise_z15(): function denoise_t15 (line 484) | def denoise_t15(): function denoise_v1_m15 (line 503) | def denoise_v1_m15(): function denoise_v1_m30 (line 516) | def denoise_v1_m30(): function denoise_v1_m50 (line 524) | def denoise_v1_m50(): function denoise_v1_z15 (line 532) | def denoise_v1_z15(): function denoise_v1_t15 (line 540) | def denoise_v1_t15(): FILE: tensor2tensor/models/research/multiquery_paper.py function mqp_ende_base (line 28) | def mqp_ende_base(): function mqp_ende_local (line 38) | def mqp_ende_local(): function mqp_ende_mq8 (line 45) | def mqp_ende_mq8(): function mqp_ende_mq8_ff5440 (line 56) | def mqp_ende_mq8_ff5440(): function mqp_ende_mq8_ff5440_local (line 64) | def mqp_ende_mq8_ff5440_local(): function mqp_ende_h4_kv256 (line 71) | def mqp_ende_h4_kv256(): function mqp_ende_h2_kv512 (line 80) | def mqp_ende_h2_kv512(): function mqp_ende_h1_kv1024 (line 89) | def mqp_ende_h1_kv1024(): function mqp_ende_h4_ff5632 (line 98) | def mqp_ende_h4_ff5632(): function mqp_ende_h2_ff6400 (line 107) | def mqp_ende_h2_ff6400(): function mqp_ende_h1_ff6784 (line 116) | def mqp_ende_h1_ff6784(): function mqp_ende_h2_kv64_ff6784 (line 125) | def mqp_ende_h2_kv64_ff6784(): function mqp_ende_h4_kv32_ff6784 (line 135) | def mqp_ende_h4_kv32_ff6784(): function mqp_ende_h8_kv16_ff6784 (line 145) | def mqp_ende_h8_kv16_ff6784(): function mqp_lm1b_base (line 154) | def mqp_lm1b_base(): function mqp_lm1b_mq8 (line 172) | def mqp_lm1b_mq8(): function mqp_lm1b_mq8_ff9088 (line 180) | def mqp_lm1b_mq8_ff9088(): function mqp_lm1b_h1_ff9984 (line 187) | def mqp_lm1b_h1_ff9984(): function mqp_lm1b_h2_kv64_ff9984 (line 195) | def mqp_lm1b_h2_kv64_ff9984(): function mqp_lm1b_h4_kv32_ff9984 (line 204) | def mqp_lm1b_h4_kv32_ff9984(): function mqp_lm1b_h8_kv16_ff9984 (line 213) | def mqp_lm1b_h8_kv16_ff9984(): FILE: tensor2tensor/models/research/neural_stack.py class NeuralStackCell (line 52) | class NeuralStackCell(tf.nn.rnn_cell.RNNCell): method __init__ (line 56) | def __init__(self, num_units, memory_size, embedding_size, method state_size (line 76) | def state_size(self): method output_size (line 93) | def output_size(self): method initialize_write_strengths (line 96) | def initialize_write_strengths(self, batch_size): method zero_state (line 113) | def zero_state(self, batch_size, dtype): method get_read_mask (line 132) | def get_read_mask(self, read_head_index): method get_write_head_offset (line 151) | def get_write_head_offset(self, write_head_index): method add_scalar_projection (line 170) | def add_scalar_projection(self, name, size): method add_vector_projection (line 191) | def add_vector_projection(self, name, size): method build_controller (line 213) | def build_controller(self): method build (line 236) | def build(self, _): method get_controller_shape (line 242) | def get_controller_shape(self, batch_size): method call_controller (line 265) | def call_controller(self, input_value, read_values, prev_state, batch_... method call (line 318) | def call(self, inputs, prev_state): class NeuralQueueCell (line 401) | class NeuralQueueCell(NeuralStackCell): method get_read_mask (line 407) | def get_read_mask(self, read_head_index): class NeuralDequeCell (line 424) | class NeuralDequeCell(NeuralStackCell): method __init__ (line 430) | def __init__(self, num_units, memory_size, embedding_size, reuse=None): method get_read_mask (line 439) | def get_read_mask(self, read_head_index): method get_write_head_offset (line 453) | def get_write_head_offset(self, write_head_index): method initialize_write_strengths (line 463) | def initialize_write_strengths(self, batch_size): class NeuralStackModel (line 491) | class NeuralStackModel(t2t_model.T2TModel): method cell (line 495) | def cell(self, hidden_size): method _rnn (line 511) | def _rnn(self, inputs, name, initial_state=None, sequence_length=None): method body (line 535) | def body(self, features): class NeuralQueueModel (line 567) | class NeuralQueueModel(NeuralStackModel): method cell (line 571) | def cell(self, hidden_size): class NeuralDequeModel (line 586) | class NeuralDequeModel(NeuralStackModel): method cell (line 590) | def cell(self, hidden_size): function lstm_transduction (line 605) | def lstm_transduction(): function neural_stack (line 625) | def neural_stack(): function neural_deque (line 645) | def neural_deque(): FILE: tensor2tensor/models/research/neural_stack_test.py function build_fake_controller (line 31) | def build_fake_controller(cell): function call_fake_controller (line 44) | def call_fake_controller(push_values, pop_values, write_values, output_v... function assert_controller_shapes (line 81) | def assert_controller_shapes(test, controller_outputs, controller_shapes): function assert_cell_shapes (line 87) | def assert_cell_shapes(test, output_state, zero_state): class NeuralStackCellTest (line 93) | class NeuralStackCellTest(tf.test.TestCase): method test_cell_shapes (line 95) | def test_cell_shapes(self): method test_push_pop (line 130) | def test_push_pop(self): class NeuralQueueCellTest (line 184) | class NeuralQueueCellTest(tf.test.TestCase): method test_enqueue_dequeue (line 198) | def test_enqueue_dequeue(self): class NeuralDequeCellTest (line 251) | class NeuralDequeCellTest(tf.test.TestCase): method test_cell_shapes (line 253) | def test_cell_shapes(self): method test_enqueue_dequeue (line 312) | def test_enqueue_dequeue(self): class NeuralStackModelTest (line 392) | class NeuralStackModelTest(tf.test.TestCase): method test_model_shapes (line 394) | def test_model_shapes(self): FILE: tensor2tensor/models/research/residual_shuffle_exchange.py class LayerNormalization (line 40) | class LayerNormalization(tf.keras.layers.Layer): method __init__ (line 43) | def __init__(self, axis=1, epsilon=1e-10, **kwargs): method build (line 56) | def build(self, input_shape): method call (line 67) | def call(self, inputs, **kwargs): function inv_sigmoid (line 84) | def inv_sigmoid(y): class RSU (line 96) | class RSU(tf.keras.layers.Layer): method __init__ (line 99) | def __init__(self, prefix, dropout, mode, **kwargs): method build (line 121) | def build(self, input_shape): method call (line 148) | def call(self, inputs, **kwargs): function residual_shuffle_network (line 188) | def residual_shuffle_network(inputs, hparams): function reverse_part (line 213) | def reverse_part(inputs, hparams, n_bits): function forward_part (line 244) | def forward_part(block_out, hparams, n_bits): class ResidualShuffleExchange (line 276) | class ResidualShuffleExchange(ShuffleNetwork): method body (line 279) | def body(self, features): FILE: tensor2tensor/models/research/rl.py function ppo_base_v1 (line 48) | def ppo_base_v1(): function basic_policy_parameters (line 83) | def basic_policy_parameters(): function ppo_discrete_action_base (line 89) | def ppo_discrete_action_base(): function discrete_random_action_base (line 96) | def discrete_random_action_base(): function ppo_atari_base (line 103) | def ppo_atari_base(): function ppo_original_params (line 122) | def ppo_original_params(): function ppo_dist_params (line 141) | def ppo_dist_params(): function ppo_original_tiny (line 149) | def ppo_original_tiny(): function ppo_ttt_params (line 158) | def ppo_ttt_params(): function ppo_original_params_gamma95 (line 167) | def ppo_original_params_gamma95(): function ppo_original_params_gamma90 (line 175) | def ppo_original_params_gamma90(): function ppo_original_world_model (line 183) | def ppo_original_world_model(): function ppo_tiny_world_model (line 200) | def ppo_tiny_world_model(): function ppo_original_world_model_stochastic_discrete (line 216) | def ppo_original_world_model_stochastic_discrete(): function make_real_env_fn (line 233) | def make_real_env_fn(env): function make_simulated_env_fn (line 245) | def make_simulated_env_fn(**env_kwargs): function make_simulated_env_kwargs (line 261) | def make_simulated_env_kwargs(real_env, hparams, **extra_kwargs): function make_simulated_env_fn_from_hparams (line 284) | def make_simulated_env_fn_from_hparams(real_env, hparams, **extra_kwargs): function get_policy (line 291) | def get_policy(observations, hparams, action_space, function ppo_pong_ae_base (line 359) | def ppo_pong_ae_base(): function dqn_atari_base (line 368) | def dqn_atari_base(): function dqn_original_params (line 406) | def dqn_original_params(): function dqn_guess1_params (line 414) | def dqn_guess1_params(): function dqn_guess1_params_eval (line 426) | def dqn_guess1_params_eval(): function dqn_guess1_rainbow_params (line 434) | def dqn_guess1_rainbow_params(): function dqn_rainbow_params (line 442) | def dqn_rainbow_params(): function dqn_2m_replay_buffer_params (line 451) | def dqn_2m_replay_buffer_params(): function dqn_10m_replay_buffer_params (line 459) | def dqn_10m_replay_buffer_params(): function rlmf_tiny_overrides (line 466) | def rlmf_tiny_overrides(): function rlmf_original (line 478) | def rlmf_original(): function rlmf_tictactoe (line 508) | def rlmf_tictactoe(): function rlmf_base (line 528) | def rlmf_base(): function rlmf_5runs (line 537) | def rlmf_5runs(rhp): function rlmf_5runs_atari (line 542) | def rlmf_5runs_atari(rhp): function rlmf_dist (line 548) | def rlmf_dist(): function rlmf_dist_threshold (line 557) | def rlmf_dist_threshold(): function rlmf_tiny (line 565) | def rlmf_tiny(): function rlmf_dqn_tiny (line 577) | def rlmf_dqn_tiny(): function rlmf_eval (line 592) | def rlmf_eval(): function rlmf_eval_dist (line 610) | def rlmf_eval_dist(): function rlmf_eval_dist_threshold (line 620) | def rlmf_eval_dist_threshold(): class PolicyBase (line 627) | class PolicyBase(t2t_model.T2TModel): method __init__ (line 629) | def __init__(self, *args, **kwargs): method loss (line 634) | def loss(self, *args, **kwargs): class DummyPolicyProblem (line 639) | class DummyPolicyProblem(video_utils.VideoProblem): method __init__ (line 642) | def __init__(self, action_space, frame_height, frame_width): method frame_height (line 649) | def frame_height(self): method frame_width (line 654) | def frame_width(self): method num_actions (line 659) | def num_actions(self): method hparams (line 662) | def hparams(self, defaults, unused_model_hparams): function feed_forward_gaussian_fun (line 693) | def feed_forward_gaussian_fun(action_space, config, observations): function clip_logits (line 733) | def clip_logits(logits, config): class FeedForwardCategoricalPolicy (line 743) | class FeedForwardCategoricalPolicy(PolicyBase): method body (line 746) | def body(self, features): class FeedForwardCnnSmallCategoricalPolicy (line 766) | class FeedForwardCnnSmallCategoricalPolicy(PolicyBase): method body (line 769) | def body(self, features): class FeedForwardCnnSmallCategoricalPolicyNew (line 808) | class FeedForwardCnnSmallCategoricalPolicyNew(PolicyBase): method body (line 811) | def body(self, features): class DenseBitwiseCategoricalPolicy (line 847) | class DenseBitwiseCategoricalPolicy(PolicyBase): method body (line 850) | def body(self, features): class RandomPolicy (line 867) | class RandomPolicy(PolicyBase): method body (line 870) | def body(self, features): FILE: tensor2tensor/models/research/shuffle_network.py function ror (line 39) | def ror(x, n, p=1): function rol (line 59) | def rol(x, n, p=1): function shuffle_layer (line 78) | def shuffle_layer(inputs, shuffle_fn=rol): function reverse_shuffle_layer (line 98) | def reverse_shuffle_layer(inputs): function conv_linear_map (line 113) | def conv_linear_map(inputs, nin, nout, bias_start, prefix): class SwitchLayer (line 145) | class SwitchLayer(object): method __init__ (line 148) | def __init__(self, prefix, dropout, mode): method linear_map (line 165) | def linear_map(self, inputs, suffix, bias_start, in_units, out_units): method gated_linear_map (line 183) | def gated_linear_map(self, inputs, suffix, bias_start_reset, in_units, method __call__ (line 217) | def __call__(self, inputs, residual_inputs): method swap_halves (line 259) | def swap_halves(self, inputs): function shuffle_network (line 274) | def shuffle_network(inputs, hparams): class ShuffleNetwork (line 338) | class ShuffleNetwork(t2t_model.T2TModel): method bottom (line 341) | def bottom(self, features): method pad (line 362) | def pad(tensor, pad_len): method max_pad_length (line 380) | def max_pad_length(self, features): method infer (line 407) | def infer(self, features=None, **kwargs): method loss (line 436) | def loss(self, logits, features): method body (line 458) | def body(self, features): function shuffle_network_baseline (line 471) | def shuffle_network_baseline(): FILE: tensor2tensor/models/research/similarity_transformer.py class SimilarityTransformer (line 27) | class SimilarityTransformer(t2t_model.T2TModel): method top (line 37) | def top(self, body_output, _): method body (line 40) | def body(self, features): method encode (line 96) | def encode(self, features, input_key): method infer (line 116) | def infer(self, features=None, **kwargs): FILE: tensor2tensor/models/research/super_lm.py class SuperLM (line 48) | class SuperLM(t2t_model.T2TModel): method body (line 51) | def body(self, features): function _super_stack (line 127) | def _super_stack(inputs, function super_lm_base (line 242) | def super_lm_base(): function super_lm_conv (line 293) | def super_lm_conv(): function super_lm_big (line 302) | def super_lm_big(): function super_lm_low_mix (line 311) | def super_lm_low_mix(): function super_lm_high_mix (line 319) | def super_lm_high_mix(): function super_lm_b8k (line 327) | def super_lm_b8k(): function super_lm_moe (line 335) | def super_lm_moe(): function super_lm_moe_h4 (line 346) | def super_lm_moe_h4(): function super_lm_moe_4b_diet (line 355) | def super_lm_moe_4b_diet(): function super_lm_tpu (line 371) | def super_lm_tpu(): function super_lm_big_tpu (line 387) | def super_lm_big_tpu(): function super_lm_tpu_memtest (line 394) | def super_lm_tpu_memtest(): FILE: tensor2tensor/models/research/transformer_aux.py function shift_and_pad (line 29) | def shift_and_pad(tensor, shift, axis=0): class TransformerAux (line 68) | class TransformerAux(transformer.Transformer): method _extract_shift_values (line 71) | def _extract_shift_values(self): method auxiliary_loss (line 93) | def auxiliary_loss(self, body_output, features, shift): method body (line 130) | def body(self, features): function transformer_aux_base (line 161) | def transformer_aux_base(): function transformer_aux_tiny (line 170) | def transformer_aux_tiny(): FILE: tensor2tensor/models/research/transformer_aux_test.py class TransformerAuxTest (line 31) | class TransformerAuxTest(parameterized.TestCase, tf.test.TestCase): method test_shift_and_pad (line 77) | def test_shift_and_pad(self, tensor, shift, axis, target): method test_transformer_aux_body (line 83) | def test_transformer_aux_body(self): FILE: tensor2tensor/models/research/transformer_moe.py class TransformerMoe (line 57) | class TransformerMoe(t2t_model.T2TModel): method use_body_sharded (line 61) | def use_body_sharded(): method body_sharded (line 64) | def body_sharded(self, sharded_features): method _prepare_encoder (line 182) | def _prepare_encoder(self, inputs, target_space): method _prepare_decoder (line 200) | def _prepare_decoder(self, targets): method _extract_layer_types (line 214) | def _extract_layer_types(self): function transformer_moe_base (line 268) | def transformer_moe_base(): function transformer_moe_8k (line 316) | def transformer_moe_8k(): function transformer_moe_8k_lm (line 332) | def transformer_moe_8k_lm(): function transformer_moe_2k (line 366) | def transformer_moe_2k(): function transformer_moe_12k (line 400) | def transformer_moe_12k(): function transformer_moe_prepend_8k (line 410) | def transformer_moe_prepend_8k(): FILE: tensor2tensor/models/research/transformer_nat.py function init_vq_bottleneck (line 32) | def init_vq_bottleneck(bottleneck_size, hidden_size): function vq_nearest_neighbor (line 52) | def vq_nearest_neighbor(x, hparams): function vq_discrete_bottleneck (line 73) | def vq_discrete_bottleneck(x, hparams): function vq_discrete_unbottleneck (line 109) | def vq_discrete_unbottleneck(x, hparams): function residual_conv (line 120) | def residual_conv(x, repeat, k, hparams, name, reuse=None): function decompress_step (line 137) | def decompress_step(source, hparams, first_relu, name): function compress (line 151) | def compress(x, hparams, name): function encode (line 168) | def encode(x, x_space, hparams, name): function decode_transformer (line 178) | def decode_transformer(encoder_output, encoder_decoder_attention_bias, t... function get_latent_pred_loss (line 201) | def get_latent_pred_loss(latents_pred, latents_discrete_hot, hparams): function ae_latent_sample_beam (line 210) | def ae_latent_sample_beam(latents_dense_in, inputs, ed, embed, hparams): function ae_transformer_internal (line 244) | def ae_transformer_internal(inputs, targets, target_space, hparams, cach... class TransformerNAT (line 319) | class TransformerNAT(t2t_model.T2TModel): method __init__ (line 322) | def __init__(self, *args, **kwargs): method body (line 330) | def body(self, features): method prepare_features_for_infer (line 339) | def prepare_features_for_infer(self, features): method infer (line 349) | def infer(self, function transformer_nat_small (line 383) | def transformer_nat_small(): function transformer_nat_base (line 410) | def transformer_nat_base(): function transformer_nat_big (line 421) | def transformer_nat_big(): FILE: tensor2tensor/models/research/transformer_parallel.py class TransformerBlockParallel (line 32) | class TransformerBlockParallel(transformer.Transformer): method body (line 35) | def body(self, features): method top (line 69) | def top(self, body_output, features): method loss (line 84) | def loss(self, logits, features): method _greedy_infer (line 121) | def _greedy_infer(self, features, decode_length, use_tpu=False): method _beam_decode (line 125) | def _beam_decode(self, features, decode_length, beam_size, top_beams, ... method _slow_greedy_infer_guess_and_check (line 128) | def _slow_greedy_infer_guess_and_check(self, features, decode_length): function transformer_base_bs1 (line 233) | def transformer_base_bs1(): function transformer_base_bs2 (line 240) | def transformer_base_bs2(): function transformer_base_bs3 (line 247) | def transformer_base_bs3(): function transformer_base_bs4 (line 254) | def transformer_base_bs4(): function transformer_base_bs5 (line 261) | def transformer_base_bs5(): function transformer_base_bs6 (line 268) | def transformer_base_bs6(): function transformer_base_bs7 (line 275) | def transformer_base_bs7(): function transformer_base_bs8 (line 282) | def transformer_base_bs8(): function transformer_base_bs9 (line 289) | def transformer_base_bs9(): function transformer_base_bs10 (line 296) | def transformer_base_bs10(): function transformer_big_bs1 (line 303) | def transformer_big_bs1(): function transformer_tiny_bs1 (line 310) | def transformer_tiny_bs1(): function transformer_tiny_bs2 (line 317) | def transformer_tiny_bs2(): function transformer_tiny_bs3 (line 324) | def transformer_tiny_bs3(): FILE: tensor2tensor/models/research/transformer_revnet.py class TransformerRevnet (line 32) | class TransformerRevnet(transformer.Transformer): method body (line 44) | def body(self, features): function transformer_revnet_encoder (line 75) | def transformer_revnet_encoder(encoder_input, function transformer_revnet_decoder (line 138) | def transformer_revnet_decoder(decoder_input, function transformer_revnet_base (line 219) | def transformer_revnet_base(): function transformer_revnet_big (line 232) | def transformer_revnet_big(): FILE: tensor2tensor/models/research/transformer_revnet_test.py function transformer_revnet_test (line 30) | def transformer_revnet_test(): class TransformerRevnetTest (line 39) | class TransformerRevnetTest(tf.test.TestCase): method testTransformer (line 41) | def testTransformer(self): FILE: tensor2tensor/models/research/transformer_seq2edits.py function maybe_flatten4d3d (line 45) | def maybe_flatten4d3d(x): function maybe_flatten3d2d (line 64) | def maybe_flatten3d2d(x): function maybe_flatten4d2d (line 72) | def maybe_flatten4d2d(x): function features_to_nonpadding (line 76) | def features_to_nonpadding(features, inputs_or_targets="inputs"): function gather_2d (line 84) | def gather_2d(params, indices): class TransformerSeq2edits (line 118) | class TransformerSeq2edits(t2t_model.T2TModel): method __init__ (line 121) | def __init__(self, *args, **kwargs): method encode (line 132) | def encode(self, inputs, target_space, hparams, features=None, losses=... method decode (line 144) | def decode(self, method body (line 170) | def body(self, features): method _prediction_cascade (line 278) | def _prediction_cascade(self, hparams, features, losses, loss_mask, method _loss_single (line 318) | def _loss_single(self, logits, feature_name, feature, weights=None): method top (line 333) | def top(self, body_output, features): function _pointer_feedback (line 347) | def _pointer_feedback(pointers, encoder_output, shift=True): function transformer_edit_ops_layer (line 365) | def transformer_edit_ops_layer(decoder_input, function transformer_between_predictions_layer (line 418) | def transformer_between_predictions_layer(x, function get_error_tag_embedding_matrix (line 444) | def get_error_tag_embedding_matrix(): function transformer_error_tag_prediction_layer (line 455) | def transformer_error_tag_prediction_layer(x, function transformer_pointer_prediction_layer (line 491) | def transformer_pointer_prediction_layer(feature_name, FILE: tensor2tensor/models/research/transformer_sketch.py class TransformerSketch (line 31) | class TransformerSketch(transformer.Transformer): method encode (line 34) | def encode(self, inputs, target_space, hparams, features=None, losses=... function transformer_sketch (line 55) | def transformer_sketch(): FILE: tensor2tensor/models/research/transformer_symshard.py class TransformerSymshard (line 60) | class TransformerSymshard(t2t_model.T2TModel): method body (line 63) | def body(self, features): function _layer_stack (line 227) | def _layer_stack(mp, function transformer_symshard_base (line 343) | def transformer_symshard_base(): function transformer_symshard_sh4 (line 396) | def transformer_symshard_sh4(): function transformer_symshard_lm_0 (line 404) | def transformer_symshard_lm_0(): function transformer_symshard_h4 (line 412) | def transformer_symshard_h4(): FILE: tensor2tensor/models/research/transformer_vae.py function residual_conv (line 47) | def residual_conv(x, repeat, k, hparams, name, reuse=None): function attend (line 64) | def attend(x, source, hparams, name): function decompress_step (line 81) | def decompress_step(source, hparams, first_relu, is_2d, name): function top_k_softmax (line 95) | def top_k_softmax(x, k): function top_k_experts (line 105) | def top_k_experts(x, k, hparams): function compress (line 117) | def compress(x, c, is_2d, hparams, name): function encode (line 137) | def encode(x, x_space, hparams, name): function decode_transformer (line 147) | def decode_transformer(encoder_output, function multinomial_sample (line 213) | def multinomial_sample(x, vocab_size, temperature): function ae_latent_softmax (line 223) | def ae_latent_softmax(latents_pred, latents_discrete, hparams): function ae_latent_sample_beam (line 272) | def ae_latent_sample_beam(latents_dense_in, inputs, ed, embed, hparams): function ae_latent_sample (line 303) | def ae_latent_sample(latents_dense, inputs, ed, embed, iters, hparams): function ae_transformer_internal (line 327) | def ae_transformer_internal(inputs, class TransformerAE (line 544) | class TransformerAE(t2t_model.T2TModel): method __init__ (line 547) | def __init__(self, *args, **kwargs): method body (line 644) | def body(self, features): method prepare_features_for_infer (line 659) | def prepare_features_for_infer(self, features): method infer (line 674) | def infer(self, features=None, decode_length=50, beam_size=1, top_beam... method estimator_spec_eval (line 730) | def estimator_spec_eval(self, features, logits, labels, loss, losses_d... method _summarize_losses (line 751) | def _summarize_losses(self, losses_dict): function transformer_ae_small (line 764) | def transformer_ae_small(): function imagetransformer_ae_cifar (line 838) | def imagetransformer_ae_cifar(): function imagetransformer_ae_imagenet (line 911) | def imagetransformer_ae_imagenet(): function transformer_ae_base (line 924) | def transformer_ae_base(): function transformer_ae_a3 (line 935) | def transformer_ae_a3(): function transformer_ae_a6 (line 947) | def transformer_ae_a6(): function transformer_ae_a8 (line 956) | def transformer_ae_a8(): function transformer_ae_base_tpu (line 965) | def transformer_ae_base_tpu(): function transformer_ae_base_noatt (line 974) | def transformer_ae_base_noatt(): function transformer_ae_small_noatt (line 988) | def transformer_ae_small_noatt(): function transformer_ae_base_ablation_1 (line 1002) | def transformer_ae_base_ablation_1(): function transformer_ae_base_ablation_2 (line 1009) | def transformer_ae_base_ablation_2(): function transformer_ae_base_ablation_3 (line 1016) | def transformer_ae_base_ablation_3(): function transformer_ae_base_ablation_4 (line 1024) | def transformer_ae_base_ablation_4(): function transformer_ae_base_ablation_5 (line 1035) | def transformer_ae_base_ablation_5(): function transformer_ae_base_iaf (line 1042) | def transformer_ae_base_iaf(): FILE: tensor2tensor/models/research/transformer_vae_flow_prior.py class TransformerVaeFlowPrior (line 43) | class TransformerVaeFlowPrior(t2t_model.T2TModel): method __init__ (line 46) | def __init__(self, *args, **kwargs): method is_training (line 56) | def is_training(self): method is_evaluating (line 60) | def is_evaluating(self): method is_predicting (line 64) | def is_predicting(self): method loss_iw (line 67) | def loss_iw(self, logits, features): method _loss_single_iw (line 95) | def _loss_single_iw(self, logits, feature_name, feature, weights=None): method internal (line 171) | def internal(self, features, real_features): method sample_q (line 256) | def sample_q( method compute_iw_marginal (line 279) | def compute_iw_marginal( method argmax_decode (line 325) | def argmax_decode(self, z, decoder_self_attention_bias, **kwargs): method delta_posterior (line 334) | def delta_posterior( method compute_prior_log_prob (line 348) | def compute_prior_log_prob( method sample_p (line 390) | def sample_p( method optimize (line 431) | def optimize(self, loss, num_async_replicas=1, use_tpu=False, variable... method body (line 442) | def body(self, features, real_features): method infer (line 445) | def infer(self, method model_fn (line 475) | def model_fn(self, features): method model_fn_sharded (line 504) | def model_fn_sharded(self, sharded_features): function wmt_enro_tpu (line 541) | def wmt_enro_tpu(): function iwslt_baseline_gpu (line 550) | def iwslt_baseline_gpu(): function iwslt_baseline_single_gpu (line 565) | def iwslt_baseline_single_gpu(): function iwslt_baseline_tpu (line 576) | def iwslt_baseline_tpu(): function iwslt_base (line 593) | def iwslt_base(): function iwslt_diag (line 620) | def iwslt_diag(): function wmt_diag_base (line 657) | def wmt_diag_base(): function wmt_diag_small (line 677) | def wmt_diag_small(): function wmt_diag_small_trueadam (line 687) | def wmt_diag_small_trueadam(): function wmt_diag_small_trueadam_longer (line 695) | def wmt_diag_small_trueadam_longer(): function wmt_diag_small_trueadam_shorter (line 704) | def wmt_diag_small_trueadam_shorter(): function wmt_diag_base_trueadam_1e4 (line 713) | def wmt_diag_base_trueadam_1e4(): function wmt_diag_base_trueadam_longer_1e4 (line 724) | def wmt_diag_base_trueadam_longer_1e4(): function wmt_diag_base_trueadam_shorter_1e4 (line 733) | def wmt_diag_base_trueadam_shorter_1e4(): function wmt_diag_base_1e4_trueadam (line 742) | def wmt_diag_base_1e4_trueadam(): function wmt_diag_base_1e4_trueadam_longer (line 751) | def wmt_diag_base_1e4_trueadam_longer(): function wmt_diag_base_1e4_trueadam_shorter (line 760) | def wmt_diag_base_1e4_trueadam_shorter(): function wmt_diag_base_1e4 (line 769) | def wmt_diag_base_1e4(): function wmt_diag_base_longer_1e4 (line 777) | def wmt_diag_base_longer_1e4(): function wmt_diag_base_shorter_1e4 (line 786) | def wmt_diag_base_shorter_1e4(): function iwslt_diag_1e5 (line 795) | def iwslt_diag_1e5(): function iwslt_diag_1e4 (line 803) | def iwslt_diag_1e4(): function iwslt_affine (line 811) | def iwslt_affine(): function wmt_affine (line 847) | def wmt_affine(): function wmt_affine_base (line 869) | def wmt_affine_base(): function wmt_affine_base_small (line 880) | def wmt_affine_base_small(): function wmt_affine_base_trueadam_small (line 891) | def wmt_affine_base_trueadam_small(): function wmt_affine_base_trueadam_longer_small (line 899) | def wmt_affine_base_trueadam_longer_small(): function wmt_affine_base_trueadam_shorter_small (line 908) | def wmt_affine_base_trueadam_shorter_small(): function wmt_affine_base_trueadam (line 917) | def wmt_affine_base_trueadam(): function wmt_affine_base_trueadam_longer (line 931) | def wmt_affine_base_trueadam_longer(): function wmt_affine_base_trueadam_shorter (line 940) | def wmt_affine_base_trueadam_shorter(): function wmt_affine_base_1e4 (line 949) | def wmt_affine_base_1e4(): function wmt_affine_base_longer_1e4 (line 959) | def wmt_affine_base_longer_1e4(): function wmt_affine_base_shorter_1e4 (line 968) | def wmt_affine_base_shorter_1e4(): function wmt_affine_1e4 (line 977) | def wmt_affine_1e4(): function wmt_affine_large (line 985) | def wmt_affine_large(): function wmt_affine_large_1e4 (line 1007) | def wmt_affine_large_1e4(): function iwslt_affine_tiny (line 1015) | def iwslt_affine_tiny(): function iwslt_affine_small (line 1024) | def iwslt_affine_small(): function iwslt_affine_small_1e4_trueadam (line 1032) | def iwslt_affine_small_1e4_trueadam(): function iwslt_affine_small_1e4_trueadam_longer (line 1040) | def iwslt_affine_small_1e4_trueadam_longer(): function iwslt_affine_small_1e4_trueadam_shorter (line 1049) | def iwslt_affine_small_1e4_trueadam_shorter(): function iwslt_affine_small_1e4 (line 1058) | def iwslt_affine_small_1e4(): function iwslt_affine_tpu_glow_glow_np_1e4_trueadam (line 1066) | def iwslt_affine_tpu_glow_glow_np_1e4_trueadam(): function iwslt_affine_tpu_glow_glow_np_1e4_trueadam_longer (line 1074) | def iwslt_affine_tpu_glow_glow_np_1e4_trueadam_longer(): function iwslt_affine_tpu_glow_glow_np_1e4_trueadam_shorter (line 1083) | def iwslt_affine_tpu_glow_glow_np_1e4_trueadam_shorter(): function iwslt_affine_tpu_glow_glow_np_1e4 (line 1092) | def iwslt_affine_tpu_glow_glow_np_1e4(): function update_hparams_for_tpu (line 1100) | def update_hparams_for_tpu(hparams): FILE: tensor2tensor/models/research/transformer_vae_flow_prior_ops.py function _mixed_precision_is_enabled (line 34) | def _mixed_precision_is_enabled(hparams): function encoder (line 41) | def encoder(name, hparams, inputs, target_space): function transformer_decoder_layers (line 56) | def transformer_decoder_layers(name, function posterior (line 74) | def posterior( function cond_prior (line 96) | def cond_prior( function decoder (line 117) | def decoder(name, latents, hparams, decoder_self_attention_bias, **kwargs): function drop_2d (line 142) | def drop_2d(targets, mode, dropout_p): function sequence_mask (line 156) | def sequence_mask(length, hparams): function get_padding (line 161) | def get_padding(mask, hparams): function get_dtype (line 166) | def get_dtype(hparams): function lenpred_mlp (line 177) | def lenpred_mlp(name, logits, hidden_size, bound): function predict_target_lengths (line 187) | def predict_target_lengths( function lenpred_stats (line 215) | def lenpred_stats(targets_length_pred, targets_length): function save_log_loss (line 224) | def save_log_loss( function get_anneal_mask (line 274) | def get_anneal_mask(hparams): function embedding_to_non_padding (line 288) | def embedding_to_non_padding(emb, dtype=tf.float32): function save_summary (line 294) | def save_summary(monitor, name): function _global_step (line 300) | def _global_step(hparams): function learning_rate_schedule (line 312) | def learning_rate_schedule(hparams): function prepare_for_iw (line 335) | def prepare_for_iw(x, k): function unprepare_for_iw (line 346) | def unprepare_for_iw(x, k): function generic_loss (line 354) | def generic_loss(top_out, targets, model_hparams, vocab_size, weights_fn): FILE: tensor2tensor/models/research/transformer_vae_test.py class TransformerVaeTest (line 27) | class TransformerVaeTest(tf.test.TestCase): method testTransformerAEOnDVQ (line 29) | def testTransformerAEOnDVQ(self): FILE: tensor2tensor/models/research/universal_transformer.py class UniversalTransformer (line 42) | class UniversalTransformer(transformer.Transformer): method encode (line 45) | def encode(self, inputs, target_space, hparams, features=None, losses=... method decode (line 93) | def decode(self, method body (line 156) | def body(self, features): method _greedy_infer (line 228) | def _greedy_infer(self, features, decode_length, use_tpu=False): method _beam_decode (line 252) | def _beam_decode(self, features, decode_length, beam_size, top_beams, ... class UniversalTransformerEncoder (line 281) | class UniversalTransformerEncoder(transformer.Transformer): method encode (line 284) | def encode(self, inputs, target_space, hparams, features=None, losses=... method body (line 322) | def body(self, features): function update_hparams_for_universal_transformer (line 357) | def update_hparams_for_universal_transformer(hparams): function universal_transformer_base (line 445) | def universal_transformer_base(): function universal_transformer_base_tpu (line 460) | def universal_transformer_base_tpu(): function universal_transformer_big (line 468) | def universal_transformer_big(): function universal_transformer_base_fp16 (line 476) | def universal_transformer_base_fp16(): function universal_transformer_small (line 484) | def universal_transformer_small(): function universal_transformer_tiny (line 491) | def universal_transformer_tiny(): function transformer_teeny (line 499) | def transformer_teeny(): function universal_transformer_teeny (line 508) | def universal_transformer_teeny(): function universal_transformer_tall (line 516) | def universal_transformer_tall(): function universal_transformer_small_dropconnect (line 523) | def universal_transformer_small_dropconnect(): function adaptive_universal_transformer_base (line 531) | def adaptive_universal_transformer_base(): function adaptive_universal_transformer_base_tpu (line 538) | def adaptive_universal_transformer_base_tpu(): function adaptive_universal_transformer_multilayer_tpu (line 546) | def adaptive_universal_transformer_multilayer_tpu(): function adaptive_universal_transformer_multilayer_hard (line 562) | def adaptive_universal_transformer_multilayer_hard(): function adaptive_universal_transformer_small (line 575) | def adaptive_universal_transformer_small(): function adaptive_universal_transformer_tiny (line 582) | def adaptive_universal_transformer_tiny(): function adaptive_universal_transformer_sepconv_tiny (line 589) | def adaptive_universal_transformer_sepconv_tiny(): function adaptive_universal_transformer_global_base (line 597) | def adaptive_universal_transformer_global_base(): function adaptive_universal_transformer_global_base_tpu (line 605) | def adaptive_universal_transformer_global_base_tpu(): function adaptive_universal_transformer_tall (line 613) | def adaptive_universal_transformer_tall(): function adaptive_universal_transformer_tall_actlossw0 (line 623) | def adaptive_universal_transformer_tall_actlossw0(): function adaptive_universal_transformer_tall_actlossw001 (line 634) | def adaptive_universal_transformer_tall_actlossw001(): function adaptive_universal_transformer_base_dropout03 (line 645) | def adaptive_universal_transformer_base_dropout03(): function adaptive_universal_transformer_base_dropout05 (line 655) | def adaptive_universal_transformer_base_dropout05(): function universal_transformer_skip_base (line 665) | def universal_transformer_skip_base(): function universal_transformer_highway_base (line 672) | def universal_transformer_highway_base(): function universal_transformer_dwa_base (line 679) | def universal_transformer_dwa_base(): function universal_transformer_lstm_base (line 686) | def universal_transformer_lstm_base(): function universal_transformer_gru_base (line 694) | def universal_transformer_gru_base(): function universal_transformer_lstm_tall (line 702) | def universal_transformer_lstm_tall(): function universal_transformer_position_random_timing_tiny (line 710) | def universal_transformer_position_random_timing_tiny(): function universal_transformer_position_step_timing_tiny (line 717) | def universal_transformer_position_step_timing_tiny(): function universal_transformer_step_sinusoid_timing_tiny (line 724) | def universal_transformer_step_sinusoid_timing_tiny(): function adaptive_universal_transformer_position_random_timing_tiny (line 731) | def adaptive_universal_transformer_position_random_timing_tiny(): function universal_transformer_mix_before_ut_base (line 739) | def universal_transformer_mix_before_ut_base(): function universal_transformer_mix_after_ut_base (line 746) | def universal_transformer_mix_after_ut_base(): function adaptive_universal_transformer_mix_before_ut_base (line 753) | def adaptive_universal_transformer_mix_before_ut_base(): function adaptive_universal_transformer_mix_after_ut_base (line 761) | def adaptive_universal_transformer_mix_after_ut_base(): function adaptive_universal_transformer_concat_tiny (line 769) | def adaptive_universal_transformer_concat_tiny(): function adaptive_universal_transformer_with_sru_base (line 777) | def adaptive_universal_transformer_with_sru_base(): function universal_transformer_sepconv_big (line 785) | def universal_transformer_sepconv_big(): function universal_transformer_sepconv_base (line 792) | def universal_transformer_sepconv_base(): function universal_transformer_sepconv_tiny (line 799) | def universal_transformer_sepconv_tiny(): function universal_transformer_base_range (line 806) | def universal_transformer_base_range(rhp): function adaptive_universal_transformer_base_range (line 819) | def adaptive_universal_transformer_base_range(rhp): FILE: tensor2tensor/models/research/universal_transformer_test.py class UniversalTransformerTest (line 37) | class UniversalTransformerTest(tf.test.TestCase): method get_model (line 39) | def get_model(self, method testTransformer (line 68) | def testTransformer(self): FILE: tensor2tensor/models/research/universal_transformer_util.py function universal_transformer_encoder (line 63) | def universal_transformer_encoder(encoder_input, function universal_transformer_decoder (line 132) | def universal_transformer_decoder(decoder_input, function universal_transformer_layer (line 195) | def universal_transformer_layer(x, function get_ut_layer (line 269) | def get_ut_layer(x, function transformer_encoder_ffn_unit (line 358) | def transformer_encoder_ffn_unit(x, function transformer_encoder_attention_unit (line 406) | def transformer_encoder_attention_unit(x, function transformer_decoder_ffn_unit (line 450) | def transformer_decoder_ffn_unit(x, function transformer_decoder_attention_unit (line 493) | def transformer_decoder_attention_unit(x, function universal_transformer_basic (line 560) | def universal_transformer_basic(layer_inputs, function universal_transformer_highway (line 594) | def universal_transformer_highway(layer_inputs, function universal_transformer_skip (line 684) | def universal_transformer_skip(layer_inputs, function universal_transformer_depthwise_attention (line 774) | def universal_transformer_depthwise_attention(layer_inputs, function universal_transformer_with_gru_as_transition_function (line 832) | def universal_transformer_with_gru_as_transition_function( function universal_transformer_with_lstm_as_transition_function (line 918) | def universal_transformer_with_lstm_as_transition_function( function universal_transformer_act (line 1023) | def universal_transformer_act(x, hparams, ffn_unit, attention_unit): function _ffn_layer_multi_inputs (line 1198) | def _ffn_layer_multi_inputs(inputs_list, function fill_memory_slot (line 1318) | def fill_memory_slot(memory, value, index): function add_depth_embedding (line 1338) | def add_depth_embedding(x): function step_preprocess (line 1365) | def step_preprocess(x, step, hparams): function add_position_timing_signal (line 1397) | def add_position_timing_signal(x, step, hparams): function add_step_timing_signal (line 1447) | def add_step_timing_signal(x, step, hparams): FILE: tensor2tensor/models/research/vqa_attention.py class VqaAttentionBaseline (line 41) | class VqaAttentionBaseline(t2t_model.T2TModel): method body (line 54) | def body(self, features): method infer (line 104) | def infer(self, class VqaSimpleImageSelfAttention (line 126) | class VqaSimpleImageSelfAttention(VqaAttentionBaseline): method body (line 129) | def body(self, features): function image_encoder (line 186) | def image_encoder(image_feat, function _get_rnn_cell (line 239) | def _get_rnn_cell(hparams): function question_encoder (line 249) | def question_encoder(question, hparams, name="encoder"): function attn (line 302) | def attn(image_feat, query, hparams, name="attn"): function mlp (line 325) | def mlp(feature, hparams, name="mlp"): function vqa_attention_base (line 337) | def vqa_attention_base(): function vqa_attention_feature_base (line 408) | def vqa_attention_feature_base(): function vqa_attention_feature_lstmlayernorm (line 415) | def vqa_attention_feature_lstmlayernorm(): function vqa_attention_feature_initializer (line 422) | def vqa_attention_feature_initializer(): function vqa_attention_feature_batch512 (line 430) | def vqa_attention_feature_batch512(): function vqa_attention_feature_hidden1024 (line 437) | def vqa_attention_feature_hidden1024(): function vqa_attention_feature_imagefeat512 (line 444) | def vqa_attention_feature_imagefeat512(): function vqa_attention_feature_imagefeat1024 (line 451) | def vqa_attention_feature_imagefeat1024(): function vqa_attention_feature_batch1024_lstmlayernorm (line 458) | def vqa_attention_feature_batch1024_lstmlayernorm(): function vqa_attention_numglimps1 (line 465) | def vqa_attention_numglimps1(): function vqa_attention_feature_numglimps1 (line 472) | def vqa_attention_feature_numglimps1(): function vqa_attention_feature_batch1024_numglimps1 (line 479) | def vqa_attention_feature_batch1024_numglimps1(): function vqa_attention_feature_batch1024 (line 486) | def vqa_attention_feature_batch1024(): function vqa_attention_feature_batch1024_dnz (line 493) | def vqa_attention_feature_batch1024_dnz(): function vqa_attention_feature_batch1024_dnz_l2 (line 501) | def vqa_attention_feature_batch1024_dnz_l2(): function vqa_attention_feature_dnz (line 508) | def vqa_attention_feature_dnz(): function vqa_attention_feature_dna (line 516) | def vqa_attention_feature_dna(): function vqa_attention_feature_dnz_noscaledp (line 524) | def vqa_attention_feature_dnz_noscaledp(): function vqa_attention_feature_dnz_l2 (line 531) | def vqa_attention_feature_dnz_l2(): function vqa_attention_feature_batch1024_dnz_noscaledp (line 538) | def vqa_attention_feature_batch1024_dnz_noscaledp(): function vqa_attention_feature_batch1024_drop01 (line 545) | def vqa_attention_feature_batch1024_drop01(): function vqa_attention_feature_batch1024_drop01_dna (line 552) | def vqa_attention_feature_batch1024_drop01_dna(): function vqa_attention_drop01_dna (line 560) | def vqa_attention_drop01_dna(): function vqa_attention_feature_batch1024_drop01_dna_concat (line 568) | def vqa_attention_feature_batch1024_drop01_dna_concat(): function vqa_attention_feature_nonormalization (line 577) | def vqa_attention_feature_nonormalization(): function vqa_attention_base_range (line 584) | def vqa_attention_base_range(rhp): FILE: tensor2tensor/models/research/vqa_attention_test.py class VqaAttentionBaselineTest (line 32) | class VqaAttentionBaselineTest(tf.test.TestCase): method testVqaAttentionBaseline (line 34) | def testVqaAttentionBaseline(self): FILE: tensor2tensor/models/research/vqa_recurrent_self_attention.py class VqaRecurrentSelfAttention (line 40) | class VqaRecurrentSelfAttention(vqa_attention.VqaAttentionBaseline): method body (line 53) | def body(self, features): function prepare_image_question_encoder (line 107) | def prepare_image_question_encoder(image_feat, question, hparams): function recurrent_transformer_decoder (line 139) | def recurrent_transformer_decoder( function vqa_recurrent_self_attention_base (line 178) | def vqa_recurrent_self_attention_base(): function vqa_recurrent_self_attention_small (line 238) | def vqa_recurrent_self_attention_small(): function vqa_recurrent_self_attention_big (line 249) | def vqa_recurrent_self_attention_big(): function vqa_recurrent_self_attention_big_l4 (line 258) | def vqa_recurrent_self_attention_big_l4(): function vqa_recurrent_self_attention_highway (line 265) | def vqa_recurrent_self_attention_highway(): function vqa_recurrent_self_attention_gru (line 272) | def vqa_recurrent_self_attention_gru(): function vqa_recurrent_self_attention_l8 (line 279) | def vqa_recurrent_self_attention_l8(): function vqa_recurrent_self_attention_mix_before_ut (line 286) | def vqa_recurrent_self_attention_mix_before_ut(): function vqa_recurrent_self_attention_l4 (line 293) | def vqa_recurrent_self_attention_l4(): function vqa_recurrent_self_attention_ls2 (line 300) | def vqa_recurrent_self_attention_ls2(): function vqa_recurrent_self_attention_drop1 (line 307) | def vqa_recurrent_self_attention_drop1(): function vqa_recurrent_self_attention_drop3 (line 314) | def vqa_recurrent_self_attention_drop3(): FILE: tensor2tensor/models/research/vqa_self_attention.py class VqaSelfAttention (line 39) | class VqaSelfAttention(vqa_attention.VqaAttentionBaseline): method body (line 52) | def body(self, features): class VqaCombinedSelfAttention (line 133) | class VqaCombinedSelfAttention(VqaSelfAttention): method body (line 146) | def body(self, features): class VqaIterativeCombinedSelfAttention (line 198) | class VqaIterativeCombinedSelfAttention(VqaSelfAttention): method body (line 211) | def body(self, features): function image_encoder (line 263) | def image_encoder(image_feat, function prepare_question_encoder (line 317) | def prepare_question_encoder(inputs, hparams): function question_encoder (line 343) | def question_encoder(question, function attn (line 396) | def attn(image_feat, function mlp (line 434) | def mlp(feature, hparams, name="mlp"): function prepare_image_question_encoder (line 449) | def prepare_image_question_encoder(image_feat, question, hparams): function image_question_encoder (line 481) | def image_question_encoder(encoder_inputs, function decoder (line 561) | def decoder(decoder_input, function iterative_encoder_decoder (line 655) | def iterative_encoder_decoder(encoder_input, function vqa_self_attention_base (line 683) | def vqa_self_attention_base(): function vqa_self_attention_feature (line 761) | def vqa_self_attention_feature(): function vqa_self_attention_feature_batch1024 (line 768) | def vqa_self_attention_feature_batch1024(): function vqa_self_attention_feature_batch1024_big (line 775) | def vqa_self_attention_feature_batch1024_big(): function vqa_self_attention_feature_batch1024_exp (line 790) | def vqa_self_attention_feature_batch1024_exp(): function vqa_self_attention_feature_batch1024_hidden6 (line 799) | def vqa_self_attention_feature_batch1024_hidden6(): function vqa_self_attention_feature_batch1024_hidden6_big (line 806) | def vqa_self_attention_feature_batch1024_hidden6_big(): function vqa_self_attention_feature_batch1024_drop03 (line 817) | def vqa_self_attention_feature_batch1024_drop03(): function vqa_self_attention_feature_lr5 (line 824) | def vqa_self_attention_feature_lr5(): FILE: tensor2tensor/models/resnet.py function layers (line 38) | def layers(): function batch_norm_relu (line 42) | def batch_norm_relu(inputs, function fixed_padding (line 85) | def fixed_padding(inputs, kernel_size, data_format="channels_first"): function conv2d_fixed_padding (line 113) | def conv2d_fixed_padding(inputs, function residual_block (line 192) | def residual_block(inputs, function bottleneck_block (line 265) | def bottleneck_block(inputs, function block_layer (line 356) | def block_layer(inputs, function resnet_v2 (line 441) | def resnet_v2(inputs, class Resnet (line 536) | class Resnet(t2t_model.T2TModel): method body (line 539) | def body(self, features): method infer (line 613) | def infer(self, function resnet_base (line 634) | def resnet_base(): function resnet_50 (line 678) | def resnet_50(): function resnet_18 (line 684) | def resnet_18(): function resnet_imagenet_34 (line 692) | def resnet_imagenet_34(): function resnet_imagenet_34_td_weight_05_05 (line 702) | def resnet_imagenet_34_td_weight_05_05(): function resnet_imagenet_34_td_unit_05_05 (line 713) | def resnet_imagenet_34_td_unit_05_05(): function resnet_imagenet_34_td_unit_no_drop (line 724) | def resnet_imagenet_34_td_unit_no_drop(): function resnet_imagenet_102 (line 735) | def resnet_imagenet_102(): function resnet_cifar_15 (line 742) | def resnet_cifar_15(): function resnet_cifar_32 (line 754) | def resnet_cifar_32(): function resnet_cifar_32_td_weight_05_05 (line 761) | def resnet_cifar_32_td_weight_05_05(): function resnet_cifar_32_td_unit_05_05 (line 770) | def resnet_cifar_32_td_unit_05_05(): function resnet_cifar_32_td_unit_no_drop (line 779) | def resnet_cifar_32_td_unit_no_drop(): function resnet_34 (line 788) | def resnet_34(): function resnet_101 (line 795) | def resnet_101(): function resnet_152 (line 802) | def resnet_152(): function resnet_200 (line 809) | def resnet_200(): function resnet_weight (line 817) | def resnet_weight(): function resnet_unit (line 827) | def resnet_unit(): function resnet_fgsm (line 835) | def resnet_fgsm(): function resnet_madry (line 846) | def resnet_madry(): function resnet_random (line 855) | def resnet_random(): FILE: tensor2tensor/models/resnet_test.py function resnet_tiny_cpu (line 32) | def resnet_tiny_cpu(): class ResnetTest (line 39) | class ResnetTest(tf.test.TestCase): method _test_resnet (line 41) | def _test_resnet(self, img_size, output_size): method testResnetLarge (line 65) | def testResnetLarge(self): FILE: tensor2tensor/models/revnet.py function wrapped_partial (line 47) | def wrapped_partial(fn, *args, **kwargs): function f (line 73) | def f(x, depth1, depth2, dim='2d', first_batch_norm=True, stride=1, function downsample_bottleneck (line 126) | def downsample_bottleneck(x, output_channels, dim='2d', stride=1, scope=... function downsample_residual (line 148) | def downsample_residual(x, output_channels, dim='2d', stride=1, scope='h'): function init (line 179) | def init(images, num_channels, dim='2d', stride=2, function unit (line 209) | def unit(x1, x2, block_num, depth, num_layers, dim='2d', function final_block (line 260) | def final_block(x1, x2, dim='2d', training=True, scope='final_block'): function revnet (line 287) | def revnet(inputs, hparams, reuse=None): class Revnet (line 338) | class Revnet(t2t_model.T2TModel): method body (line 340) | def body(self, features): function revnet_base (line 344) | def revnet_base(): function revnet_104 (line 381) | def revnet_104(): function revnet_cifar_base (line 385) | def revnet_cifar_base(): function revnet_38_cifar (line 403) | def revnet_38_cifar(): function revnet_110_cifar (line 414) | def revnet_110_cifar(): function revnet_164_cifar (line 424) | def revnet_164_cifar(): function revnet_range (line 434) | def revnet_range(rhp): FILE: tensor2tensor/models/revnet_test.py class RevnetTest (line 23) | class RevnetTest(tf.test.TestCase): method testH (line 25) | def testH(self): method testHStride (line 30) | def testHStride(self): method testInit (line 36) | def testInit(self): method testInit3D (line 42) | def testInit3D(self): method testUnit1 (line 48) | def testUnit1(self): method testUnit2 (line 56) | def testUnit2(self): method testUnit3 (line 64) | def testUnit3(self): method testUnit4 (line 72) | def testUnit4(self): method testUnit3D (line 80) | def testUnit3D(self): method testFinalBlock (line 88) | def testFinalBlock(self): method testFinalBlock3D (line 94) | def testFinalBlock3D(self): method testEndToEnd (line 100) | def testEndToEnd(self): method testEndToEnd3D (line 107) | def testEndToEnd3D(self): FILE: tensor2tensor/models/shake_shake.py function shake_shake_skip_connection (line 31) | def shake_shake_skip_connection(x, output_filters, stride, is_training): function shake_shake_branch (line 56) | def shake_shake_branch(x, output_filters, stride, rand_forward, rand_bac... function shake_shake_block (line 79) | def shake_shake_block(x, output_filters, stride, hparams): function shake_shake_layer (line 123) | def shake_shake_layer(x, output_filters, num_blocks, stride, hparams): class ShakeShake (line 133) | class ShakeShake(t2t_model.T2TModel): method body (line 141) | def body(self, features): function shakeshake_small (line 166) | def shakeshake_small(): function shake_shake_quick (line 192) | def shake_shake_quick(): function shakeshake_big (line 202) | def shakeshake_big(): function shakeshake_tpu (line 210) | def shakeshake_tpu(): function shake_shake_fgsm (line 218) | def shake_shake_fgsm(): FILE: tensor2tensor/models/slicenet.py function attention (line 34) | def attention(targets_shifted, inputs_encoded, norm_fn, hparams, bias=No... function multi_conv_res (line 86) | def multi_conv_res(x, padding, name, layers, hparams, mask=None, source=... function rank_loss (line 147) | def rank_loss(sentence_emb, image_emb, margin=0.2): function similarity_cost (line 167) | def similarity_cost(inputs_encoded, targets_encoded): function slicenet_middle (line 177) | def slicenet_middle(inputs_encoded, targets, target_space_emb, mask, hpa... function embed_target_space (line 217) | def embed_target_space(target_space_id, hidden_size): function embedding_to_padding (line 223) | def embedding_to_padding(emb): function slicenet_internal (line 229) | def slicenet_internal(inputs, targets, target_space, hparams, run_decode... class SliceNet (line 267) | class SliceNet(t2t_model.T2TModel): method body (line 269) | def body(self, features): function slicenet_params1 (line 298) | def slicenet_params1(): function slicenet_params1_noam (line 340) | def slicenet_params1_noam(): function slicenet_params1_tiny (line 354) | def slicenet_params1_tiny(): function slicenet_range1 (line 366) | def slicenet_range1(ranged_hparams): FILE: tensor2tensor/models/slicenet_test.py class SliceNetTest (line 33) | class SliceNetTest(tf.test.TestCase): method testSliceNet (line 35) | def testSliceNet(self): method testSliceNetImageToText (line 56) | def testSliceNetImageToText(self): FILE: tensor2tensor/models/text_cnn.py class TextCNN (line 31) | class TextCNN(t2t_model.T2TModel): method body (line 34) | def body(self, features): function text_cnn_base (line 86) | def text_cnn_base(): FILE: tensor2tensor/models/transformer.py function transformer_encode (line 58) | def transformer_encode(encoder_function, inputs, target_space, hparams, function transformer_decode (line 118) | def transformer_decode(decoder_function, class Transformer (line 186) | class Transformer(t2t_model.T2TModel): method __init__ (line 189) | def __init__(self, *args, **kwargs): method encode (line 199) | def encode(self, inputs, target_space, hparams, features=None, losses=... method decode (line 207) | def decode(self, method body (line 226) | def body(self, features): method _prepare_inputs_for_body (line 302) | def _prepare_inputs_for_body(self, features): method _greedy_infer (line 316) | def _greedy_infer(self, features, decode_length, use_tpu=False): method _beam_decode (line 345) | def _beam_decode(self, method _prepare_inputs_for_decode (line 386) | def _prepare_inputs_for_decode(self, features): method _fast_decode_tpu (line 419) | def _fast_decode_tpu(self, method get_decode_start_id (line 655) | def get_decode_start_id(self): method get_decode_end_id (line 666) | def get_decode_end_id(self): method _fast_decode (line 674) | def _fast_decode(self, function _init_transformer_cache (line 930) | def _init_transformer_cache(cache, hparams, batch_size, attention_init_l... function fast_decode_tpu (line 993) | def fast_decode_tpu(encoder_output, function fast_decode (line 1156) | def fast_decode(encoder_output, class TransformerScorer (line 1303) | class TransformerScorer(Transformer): method __init__ (line 1309) | def __init__(self, *args, **kwargs): method infer (line 1314) | def infer(self, class TransformerEncoder (line 1349) | class TransformerEncoder(t2t_model.T2TModel): method body (line 1352) | def body(self, features): class TransformerRegressor (line 1375) | class TransformerRegressor(TransformerEncoder): method top (line 1381) | def top(self, body_output, features): function features_to_nonpadding (line 1391) | def features_to_nonpadding(features, inputs_or_targets="inputs"): function transformer_prepare_decoder (line 1398) | def transformer_prepare_decoder(targets, hparams, features=None, pad=None): function transformer_self_attention_layer (line 1460) | def transformer_self_attention_layer(decoder_input, function transformer_decoder_layer (line 1578) | def transformer_decoder_layer(decoder_input, function transformer_decoder (line 1627) | def transformer_decoder(decoder_input, class TransformerMemory (line 1728) | class TransformerMemory(Transformer): method __init__ (line 1734) | def __init__(self, *args, **kwargs): method has_input (line 1757) | def has_input(self): method _beam_decode (line 1762) | def _beam_decode(self, features, decode_length, beam_size, top_beams, ... function transformer_base_v1 (line 1772) | def transformer_base_v1(): function transformer_base_v2 (line 1843) | def transformer_base_v2(): function transformer_base_vq_ada_32ex_packed (line 1857) | def transformer_base_vq_ada_32ex_packed(): function transformer_topk_16_packed (line 1889) | def transformer_topk_16_packed(): function transformer_base_vq1_16_nb1_packed_nda_b01_scales (line 1898) | def transformer_base_vq1_16_nb1_packed_nda_b01_scales(): function transformer_base_vq1_16_nb1_packed_dan_b01_scales (line 1912) | def transformer_base_vq1_16_nb1_packed_dan_b01_scales(): function transformer_base_vq1_16_nb1_packed_nda_b01_scales_dialog (line 1924) | def transformer_base_vq1_16_nb1_packed_nda_b01_scales_dialog(): function transformer_ada_lmpackedbase (line 1934) | def transformer_ada_lmpackedbase(): function transformer_ada_lmpackedbase_dialog (line 1942) | def transformer_ada_lmpackedbase_dialog(): function transformer_ada_lmpackedbase_relative (line 1952) | def transformer_ada_lmpackedbase_relative(): function transformer_base_v3 (line 1960) | def transformer_base_v3(): function transformer_base (line 1975) | def transformer_base(): function transformer_big (line 1982) | def transformer_big(): function transformer_tall (line 1996) | def transformer_tall(): function transformer_tall_finetune_tied (line 2014) | def transformer_tall_finetune_tied(): function transformer_tall_train_tied (line 2033) | def transformer_tall_train_tied(): function transformer_tall_finetune_uniencdec (line 2052) | def transformer_tall_finetune_uniencdec(): function transformer_tall_train_uniencdec (line 2067) | def transformer_tall_train_uniencdec(): function transformer_tall_finetune_textclass (line 2081) | def transformer_tall_finetune_textclass(): function transformer_tall_pretrain_lm (line 2097) | def transformer_tall_pretrain_lm(): function transformer_tall_pretrain_lm_tpu_adafactor (line 2116) | def transformer_tall_pretrain_lm_tpu_adafactor(): function transformer_tall_pretrain_lm_tpu_adafactor_large (line 2128) | def transformer_tall_pretrain_lm_tpu_adafactor_large(): function transformer_tall_pretrain_lm_tpu (line 2142) | def transformer_tall_pretrain_lm_tpu(): function transformer_tall_big (line 2154) | def transformer_tall_big(): function transformer_big_single_gpu (line 2162) | def transformer_big_single_gpu(): function transformer_base_single_gpu (line 2171) | def transformer_base_single_gpu(): function transformer_base_multistep8 (line 2182) | def transformer_base_multistep8(): function transformer_cubbitt (line 2191) | def transformer_cubbitt(): function transformer_parsing_base (line 2204) | def transformer_parsing_base(): function transformer_parsing_big (line 2218) | def transformer_parsing_big(): function transformer_parsing_ice (line 2231) | def transformer_parsing_ice(): function transformer_tiny (line 2240) | def transformer_tiny(): function transformer_test (line 2250) | def transformer_test(): function transformer_small (line 2260) | def transformer_small(): function transformer_l2 (line 2270) | def transformer_l2(): function transformer_l4 (line 2277) | def transformer_l4(): function transformer_l8 (line 2284) | def transformer_l8(): function transformer_l10 (line 2291) | def transformer_l10(): function transformer_h1 (line 2298) | def transformer_h1(): function transformer_h4 (line 2305) | def transformer_h4(): function transformer_h16 (line 2312) | def transformer_h16(): function transformer_h32 (line 2319) | def transformer_h32(): function transformer_k128 (line 2326) | def transformer_k128(): function transformer_k256 (line 2333) | def transformer_k256(): function transformer_ff1024 (line 2340) | def transformer_ff1024(): function transformer_ff4096 (line 2347) | def transformer_ff4096(): function transformer_dr0 (line 2354) | def transformer_dr0(): function transformer_dr2 (line 2361) | def transformer_dr2(): function transformer_ls0 (line 2368) | def transformer_ls0(): function transformer_ls2 (line 2375) | def transformer_ls2(): function transformer_hs256 (line 2382) | def transformer_hs256(): function transformer_hs1024 (line 2389) | def transformer_hs1024(): function transformer_big_dr1 (line 2396) | def transformer_big_dr1(): function transformer_big_enfr (line 2406) | def transformer_big_enfr(): function transformer_big_enfr_tpu (line 2415) | def transformer_big_enfr_tpu(): function transformer_big_dr2 (line 2424) | def transformer_big_dr2(): function transformer_parameter_attention_a (line 2431) | def transformer_parameter_attention_a(): function transformer_parameter_attention_b (line 2439) | def transformer_parameter_attention_b(): function transformer_prepend_v2 (line 2450) | def transformer_prepend_v2(): function transformer_prepend_v1 (line 2458) | def transformer_prepend_v1(): function transformer_prepend (line 2466) | def transformer_prepend(): function transformer_base_range (line 2471) | def transformer_base_range(rhp): function transformer_relative (line 2484) | def transformer_relative(): function transformer_relative_tiny (line 2494) | def transformer_relative_tiny(): function transformer_relative_big (line 2504) | def transformer_relative_big(): function transformer_timeseries (line 2513) | def transformer_timeseries(): function transformer_mlperf_tpu (line 2521) | def transformer_mlperf_tpu(): function update_hparams_for_tpu (line 2537) | def update_hparams_for_tpu(hparams): function transformer_tpu (line 2577) | def transformer_tpu(): function transformer_timeseries_tpu (line 2585) | def transformer_timeseries_tpu(): function transformer_tpu_bf16_activation (line 2594) | def transformer_tpu_bf16_activation(): function transformer_fairseq_fp16_activation_big (line 2602) | def transformer_fairseq_fp16_activation_big(): function transformer_packed_tpu (line 2611) | def transformer_packed_tpu(): function transformer_big_tpu (line 2617) | def transformer_big_tpu(): function transformer_tiny_tpu (line 2624) | def transformer_tiny_tpu(): function transformer_tiny_tpu_range (line 2631) | def transformer_tiny_tpu_range(rhp): function transformer_tpu_range (line 2638) | def transformer_tpu_range(rhp): function transformer_small_tpu (line 2651) | def transformer_small_tpu(): function transformer_clean (line 2663) | def transformer_clean(): function transformer_clean_big (line 2675) | def transformer_clean_big(): function transformer_clean_big_tpu (line 2683) | def transformer_clean_big_tpu(): function transformer_tpu_with_conv (line 2690) | def transformer_tpu_with_conv(): function transformer_lm_tpu_0 (line 2699) | def transformer_lm_tpu_0(): function transformer_lm_tpu_1 (line 2711) | def transformer_lm_tpu_1(): function transformer_librispeech_v1 (line 2720) | def transformer_librispeech_v1(): function transformer_librispeech_v2 (line 2737) | def transformer_librispeech_v2(): function transformer_librispeech_tpu_v1 (line 2762) | def transformer_librispeech_tpu_v1(): function transformer_librispeech_tpu_v2 (line 2773) | def transformer_librispeech_tpu_v2(): function transformer_librispeech_with_area_attention (line 2784) | def transformer_librispeech_with_area_attention(): function transformer_librispeech (line 2795) | def transformer_librispeech(): function transformer_librispeech_tpu (line 2801) | def transformer_librispeech_tpu(): function transformer_common_voice (line 2807) | def transformer_common_voice(): function transformer_common_voice_tpu (line 2813) | def transformer_common_voice_tpu(): function transformer_supervised_attention (line 2821) | def transformer_supervised_attention(): function transformer_tpu_1b (line 2832) | def transformer_tpu_1b(): function transformer_wikitext103_l4k_v0 (line 2848) | def transformer_wikitext103_l4k_v0(): function transformer_wikitext103_l4k_memory_v0 (line 2882) | def transformer_wikitext103_l4k_memory_v0(): function transformer_wikitext103_l16k_memory_v0 (line 2910) | def transformer_wikitext103_l16k_memory_v0(): function transformer_cifar10_memory_v0 (line 2931) | def transformer_cifar10_memory_v0(): function transformer_imagenet64_memory_v0 (line 2958) | def transformer_imagenet64_memory_v0(): FILE: tensor2tensor/models/transformer_test.py function get_model (line 37) | def get_model(hparams=None, mode=tf_estimator.ModeKeys.TRAIN, function small_librispeech_model (line 68) | def small_librispeech_model(param_overrides=None): class TransformerTest (line 97) | class TransformerTest(tf.test.TestCase): method testTransformer (line 99) | def testTransformer(self, get_model_fn=None, p=None): method testTransformerLibrispeech (line 110) | def testTransformerLibrispeech(self, params=None): method testLibrispeechSlowVsFast (line 113) | def testLibrispeechSlowVsFast(self, params=None): method testLibrispeechMultihead (line 116) | def testLibrispeechMultihead(self, params=None): method testLibrispeechWithAreaAttention (line 119) | def testLibrispeechWithAreaAttention(self): method testTransformerRelative (line 125) | def testTransformerRelative(self): method testSlowVsFast (line 133) | def testSlowVsFast(self, get_model_fn=None, p=None): method testSlowVsFastNoInput (line 170) | def testSlowVsFastNoInput(self): method testBeamDecodeWithRelativeAttention (line 205) | def testBeamDecodeWithRelativeAttention(self): method testBeamVsFast (line 223) | def testBeamVsFast(self): method testTransformerWithoutProblem (line 264) | def testTransformerWithoutProblem(self): method testTransformerWithEncoderDecoderAttentionLoss (line 284) | def testTransformerWithEncoderDecoderAttentionLoss(self): method _create_greedy_infer_model (line 297) | def _create_greedy_infer_model(self): method testGreedySlowTPUVsNonTPU (line 323) | def testGreedySlowTPUVsNonTPU(self): method testGreedyFastTPUVsNonTPU (line 345) | def testGreedyFastTPUVsNonTPU(self): method testGreedyTPUSlowVsFast (line 365) | def testGreedyTPUSlowVsFast(self): class TransformerScorerTest (line 387) | class TransformerScorerTest(tf.test.TestCase): method testReturnsScores (line 389) | def testReturnsScores(self): method testVarNames (line 403) | def testVarNames(self): FILE: tensor2tensor/models/vanilla_gan.py function lrelu (line 34) | def lrelu(input_, leak=0.2, name="lrelu"): function deconv2d (line 38) | def deconv2d( function reverse_gradient (line 52) | def reverse_gradient(x): class AbstractGAN (line 56) | class AbstractGAN(t2t_model.T2TModel): method discriminator (line 59) | def discriminator(self, x, is_training, reuse=False): method generator (line 96) | def generator(self, z, is_training, out_shape): method losses (line 124) | def losses(self, inputs, generated): method body (line 128) | def body(self, features): method top (line 163) | def top(self, body_output, features): class SlicedGan (line 169) | class SlicedGan(AbstractGAN): method losses (line 172) | def losses(self, inputs, generated): method infer (line 182) | def infer(self, *args, **kwargs): # pylint: disable=arguments-differ function sliced_gan (line 200) | def sliced_gan(): FILE: tensor2tensor/models/video/base.py function flat_lists (line 36) | def flat_lists(list_of_lists): function pixels_from_softmax (line 40) | def pixels_from_softmax(frame_logits, pure_sampling=False, class NextFrameBase (line 63) | class NextFrameBase(t2t_model.T2TModel): method next_frame (line 84) | def next_frame(self, method video_features (line 120) | def video_features( method video_extra_loss (line 141) | def video_extra_loss(self, frames_predicted, frames_target, method is_recurrent_model (line 161) | def is_recurrent_model(self): method init_internal_states (line 168) | def init_internal_states(self): method reset_internal_states_ops (line 176) | def reset_internal_states_ops(self): method load_internal_states_ops (line 180) | def load_internal_states_ops(self): method save_internal_states_ops (line 184) | def save_internal_states_ops(self, internal_states): method __init__ (line 192) | def __init__(self, *args, **kwargs): method _target_modality (line 197) | def _target_modality(self): method is_per_pixel_softmax (line 201) | def is_per_pixel_softmax(self): method get_iteration_num (line 205) | def get_iteration_num(self): method visualize_predictions (line 212) | def visualize_predictions(self, predics, targets): method get_scheduled_sample_func (line 218) | def get_scheduled_sample_func(self, batch_size): method get_scheduled_sample_inputs (line 282) | def get_scheduled_sample_inputs(self, method get_extra_internal_loss (line 314) | def get_extra_internal_loss(self, extra_raw_gts, extra_gts, extra_pds): method get_sampled_frame (line 365) | def get_sampled_frame(self, pred_frame): method __get_next_inputs (line 395) | def __get_next_inputs(self, index, all_frames, all_actions, all_rewards): method infer (line 427) | def infer(self, features, *args, **kwargs): # pylint: disable=argumen... method __process (line 499) | def __process(self, all_frames, all_actions, all_rewards, all_raw_fram... method loss (line 625) | def loss(self, *args, **kwargs): method body (line 631) | def body(self, features): function next_frame_base (line 674) | def next_frame_base(): FILE: tensor2tensor/models/video/base_vae.py class NextFrameBaseVae (line 28) | class NextFrameBaseVae(object): method __init__ (line 31) | def __init__(self, hparams): method get_beta (line 34) | def get_beta(self, kl_loss=0.0): method get_kl_loss (line 74) | def get_kl_loss(self, means, log_vars, means_p=None, log_vars_p=None): method construct_latent_tower (line 97) | def construct_latent_tower(self, images, time_axis): FILE: tensor2tensor/models/video/basic_deterministic.py class NextFrameBasicDeterministic (line 34) | class NextFrameBasicDeterministic(base.NextFrameBase): method is_recurrent_model (line 38) | def is_recurrent_model(self): method inject_latent (line 41) | def inject_latent(self, layer, inputs, target, action): method middle_network (line 45) | def middle_network(self, layer, internal_states): method update_internal_states_early (line 64) | def update_internal_states_early(self, internal_states, frames): method next_frame (line 69) | def next_frame(self, frames, actions, rewards, target_frame, FILE: tensor2tensor/models/video/basic_deterministic_params.py function next_frame_basic_deterministic (line 27) | def next_frame_basic_deterministic(): function next_frame_pixel_noise (line 60) | def next_frame_pixel_noise(): function next_frame_pixel_noise_long (line 70) | def next_frame_pixel_noise_long(): function next_frame_sampling (line 79) | def next_frame_sampling(): function next_frame_tpu (line 89) | def next_frame_tpu(): function next_frame_ae (line 96) | def next_frame_ae(): function next_frame_ae_tiny (line 110) | def next_frame_ae_tiny(): function next_frame_small (line 121) | def next_frame_small(): function next_frame_tiny (line 129) | def next_frame_tiny(): function next_frame_l1 (line 140) | def next_frame_l1(): function next_frame_l2 (line 150) | def next_frame_l2(): function next_frame_base_range (line 160) | def next_frame_base_range(rhp): function next_frame_doubling_range (line 174) | def next_frame_doubling_range(rhp): function next_frame_clipgrad_range (line 181) | def next_frame_clipgrad_range(rhp): function next_frame_xent_cutoff_range (line 188) | def next_frame_xent_cutoff_range(rhp): function next_frame_ae_range (line 194) | def next_frame_ae_range(rhp): FILE: tensor2tensor/models/video/basic_deterministic_test.py class NextFrameTest (line 29) | class NextFrameTest(tests_utils.BaseNextFrameTest): method testBasicDeterministic (line 31) | def testBasicDeterministic(self): FILE: tensor2tensor/models/video/basic_recurrent.py class NextFrameBasicRecurrent (line 28) | class NextFrameBasicRecurrent( method is_recurrent_model (line 33) | def is_recurrent_model(self): method middle_network (line 36) | def middle_network(self, layer, internal_states): function next_frame_basic_recurrent (line 52) | def next_frame_basic_recurrent(): FILE: tensor2tensor/models/video/basic_recurrent_test.py class NextFrameTest (line 28) | class NextFrameTest(tests_utils.BaseNextFrameTest): method testBasicDeterministic (line 30) | def testBasicDeterministic(self): FILE: tensor2tensor/models/video/basic_stochastic.py class NextFrameBasicStochastic (line 40) | class NextFrameBasicStochastic( method inject_latent (line 45) | def inject_latent(self, layer, inputs, target, action): class NextFrameBasicStochasticDiscrete (line 66) | class NextFrameBasicStochasticDiscrete( method is_recurrent_model (line 71) | def is_recurrent_model(self): method init_internal_states (line 74) | def init_internal_states(self): method reset_internal_states_ops (line 86) | def reset_internal_states_ops(self): method load_internal_states_ops (line 92) | def load_internal_states_ops(self): method save_internal_states_ops (line 98) | def save_internal_states_ops(self, internal_states): method update_internal_states_early (line 105) | def update_internal_states_early(self, internal_states, frames): method inject_latent (line 124) | def inject_latent(self, layer, inputs, target, action): function next_frame_basic_stochastic (line 215) | def next_frame_basic_stochastic(): function next_frame_sampling_stochastic (line 235) | def next_frame_sampling_stochastic(): function next_frame_basic_stochastic_discrete (line 255) | def next_frame_basic_stochastic_discrete(): function next_frame_basic_stochastic_discrete_long (line 286) | def next_frame_basic_stochastic_discrete_long(): function next_frame_stochastic_discrete_range (line 295) | def next_frame_stochastic_discrete_range(rhp): function next_frame_stochastic_discrete_latent_range (line 307) | def next_frame_stochastic_discrete_latent_range(rhp): FILE: tensor2tensor/models/video/basic_stochastic_test.py class NextFrameTest (line 28) | class NextFrameTest(tests_utils.BaseNextFrameTest): method testBasicStochastic (line 30) | def testBasicStochastic(self): FILE: tensor2tensor/models/video/emily.py class NextFrameEmily (line 45) | class NextFrameEmily(sv2p.NextFrameSv2pLegacy): method encoder (line 48) | def encoder(self, inputs, nout, has_batchnorm=True): method decoder (line 114) | def decoder(self, inputs, nout, skips=None, has_batchnorm=True): method stacked_lstm (line 186) | def stacked_lstm(self, inputs, states, hidden_size, output_size, nlaye... method lstm_gaussian (line 209) | def lstm_gaussian(self, inputs, states, hidden_size, output_size, nlay... method construct_model (line 234) | def construct_model(self, images, actions, rewards): method get_extra_loss (line 391) | def get_extra_loss(self, method body (line 399) | def body(self, features): function next_frame_emily (line 495) | def next_frame_emily(): FILE: tensor2tensor/models/video/emily_test.py class NextFrameTest (line 29) | class NextFrameTest(tests_utils.BaseNextFrameTest): method testEmily (line 31) | def testEmily(self): FILE: tensor2tensor/models/video/epva.py function van_image_enc_2d (line 54) | def van_image_enc_2d(x, first_depth, reuse=False, hparams=None): function van_enc_2d (line 128) | def van_enc_2d(x, first_depth, reuse=False): function van_dec_2d (line 186) | def van_dec_2d(x, skip_connections, output_shape, first_depth, hparams=N... function analogy_computation_2d (line 253) | def analogy_computation_2d(f_first_enc, function van (line 302) | def van(first_enc, function encoder_vgg (line 350) | def encoder_vgg(x, enc_final_size, reuse=False, scope_prefix='', hparams... function predictor (line 405) | def predictor(enc_flat, function construct_model (line 496) | def construct_model(images, function peak_signal_to_noise_ratio (line 573) | def peak_signal_to_noise_ratio(true, pred): function mean_squared_error (line 585) | def mean_squared_error(true, pred): function l1_error (line 599) | def l1_error(true, pred): function calc_loss_psnr (line 604) | def calc_loss_psnr(gen_images, images, name, hparams=None, use_l1_loss=F... class NextFrameEpva (line 632) | class NextFrameEpva(sv2p.NextFrameSv2pLegacy): method body (line 635) | def body(self, features): FILE: tensor2tensor/models/video/epva_params.py function next_frame_epva (line 27) | def next_frame_epva(): FILE: tensor2tensor/models/video/next_frame_glow.py function next_frame_glow_hparams (line 38) | def next_frame_glow_hparams(): function next_frame_glow_bair_quant (line 92) | def next_frame_glow_bair_quant(): function next_frame_glow_bair_qual (line 116) | def next_frame_glow_bair_qual(): function next_frame_glow_shapes (line 126) | def next_frame_glow_shapes(): function frame_glow_hparams (line 143) | def frame_glow_hparams(): function get_cond_latents (line 151) | def get_cond_latents(all_latents=None, hparams=None): class NextFrameGlow (line 184) | class NextFrameGlow(glow.Glow): method init_preprocess_single (line 187) | def init_preprocess_single(self, features): method init_preprocess (line 192) | def init_preprocess(self, features): method preprocess (line 204) | def preprocess(self, x): method infer (line 218) | def infer(self, features, *args, **kwargs): # pylint: disable=argumen... method get_squeeze_prior (line 283) | def get_squeeze_prior(self): method top_cond_prior (line 316) | def top_cond_prior(self, name, cond_top_latents): method uncond_top_dist (line 375) | def uncond_top_dist(self): method cond_top_dist (line 381) | def cond_top_dist(self, cond_latents): method top_prior (line 386) | def top_prior(self, condition=False, cond_latents=None): method get_z_top_shape (line 422) | def get_z_top_shape(self, init=False): method squeeze_video (line 434) | def squeeze_video(self, video, init=False): method glow_encoder (line 443) | def glow_encoder(self, frame, condition=False, cond_latents=None, init... method get_num_train_frames (line 470) | def get_num_train_frames(self): method get_all_frames (line 494) | def get_all_frames(self, input_frames, target_frames): method video_objective_tower (line 517) | def video_objective_tower(self, input_frames, target_frames, init=False): method objective_tower (line 597) | def objective_tower(self, features, init=False): FILE: tensor2tensor/models/video/nfg_conv3d_test.py class NextFrameGlowConv3DTest (line 33) | class NextFrameGlowConv3DTest(nfg_test_utils.NextFrameGlowTest, method testGlowTrainAndDecode (line 37) | def testGlowTrainAndDecode(self, in_frames=1, out_frames=1, FILE: tensor2tensor/models/video/nfg_conv_lstm_test.py class NextFrameGlowConv3DTest (line 31) | class NextFrameGlowConv3DTest(nfg_test_utils.NextFrameGlowTest, method testGlowTrainAndDecode (line 35) | def testGlowTrainAndDecode(self, in_frames=1, out_frames=1, FILE: tensor2tensor/models/video/nfg_conv_test.py class NextFrameGlowConvTest (line 27) | class NextFrameGlowConvTest(nfg_test_utils.NextFrameGlowTest, method testGlowTrainAndDecode (line 31) | def testGlowTrainAndDecode(self, in_frames=1, out_frames=1, FILE: tensor2tensor/models/video/nfg_interpolate.py function decode_hparams (line 56) | def decode_hparams(overrides=""): function preprocess_frame (line 73) | def preprocess_frame(frame): function frame_to_latents (line 91) | def frame_to_latents(frame, hparams): function latents_to_frames (line 103) | def latents_to_frames(z_top_interp, level_eps_interp, hparams): function interpolate (line 112) | def interpolate(features, hparams, decode_hp): function get_summaries_log_dir (line 156) | def get_summaries_log_dir(decode_hp, output_dir, dataset_split): function interpolations_to_summary (line 170) | def interpolations_to_summary(sample_ind, interpolations, first_frame, function main (line 211) | def main(_): FILE: tensor2tensor/models/video/nfg_test_utils.py function fill_hparams (line 35) | def fill_hparams(hparams, in_frames, out_frames, gen_mode="conditional", function fill_infer_targets (line 75) | def fill_infer_targets(x): function create_basic_features (line 80) | def create_basic_features(hparams): class NextFrameGlowTest (line 87) | class NextFrameGlowTest(tf.test.TestCase): method should_run_session (line 90) | def should_run_session(self, hparams): method checkAllConds (line 94) | def checkAllConds(self, conds_array, num_total_frames, hparams): method RunModel (line 102) | def RunModel(self, model, train_op, hparams, features, num_frames, method GlowTrainAndDecode (line 130) | def GlowTrainAndDecode(self, in_frames=1, out_frames=1, FILE: tensor2tensor/models/video/nfg_uncond_test.py class NfgUncondTest (line 31) | class NfgUncondTest(nfg_test_utils.NextFrameGlowTest, parameterized.Test... method testGlowTrainAndDecode (line 34) | def testGlowTrainAndDecode(self, in_frames=1, out_frames=1, FILE: tensor2tensor/models/video/savp.py class NextFrameSavpBase (line 42) | class NextFrameSavpBase(object): method encoder (line 45) | def encoder(self, inputs, n_layers=3): method expected_output_shape (line 110) | def expected_output_shape(self, input_shape, stride, padding, kernel_s... method get_fc_dimensions (line 113) | def get_fc_dimensions(self, strides, kernel_sizes): method discriminator (line 123) | def discriminator(self, frames): method d_step (line 158) | def d_step(self, true_frames, gen_frames): method g_step (line 197) | def g_step(self, gen_frames, fake_logits_stop): method get_gan_loss (line 231) | def get_gan_loss(self, true_frames, gen_frames, name): method get_extra_loss (line 267) | def get_extra_loss(self, latent_means=None, latent_stds=None, method pad_conv3d_lrelu (line 301) | def pad_conv3d_lrelu(self, activations, n_filters, kernel_size, strides, method train_hooks (line 333) | def train_hooks(hook_context): class NextFrameSAVP (line 339) | class NextFrameSAVP(NextFrameSavpBase, sv2p.NextFrameSv2pLegacy): method construct_model (line 342) | def construct_model(self, images, actions, rewards): class NextFrameSavpRl (line 465) | class NextFrameSavpRl(NextFrameSavpBase, sv2p.NextFrameSv2p): method video_features (line 468) | def video_features( method video_extra_loss (line 483) | def video_extra_loss(self, frames_predicted, frames_target, method next_frame (line 497) | def next_frame(self, frames, actions, rewards, target_frame, FILE: tensor2tensor/models/video/savp_params.py function next_frame_savp (line 27) | def next_frame_savp(): function next_frame_savp_l2 (line 60) | def next_frame_savp_l2(): function next_frame_savp_vae (line 70) | def next_frame_savp_vae(): function next_frame_savp_gan (line 81) | def next_frame_savp_gan(): FILE: tensor2tensor/models/video/savp_test.py class NextFrameTest (line 30) | class NextFrameTest(tests_utils.BaseNextFrameTest): method testSavpVAE (line 32) | def testSavpVAE(self): method testSavpGAN (line 41) | def testSavpGAN(self): method testSavpGANVAE (line 50) | def testSavpGANVAE(self): method testInvalidVAEGANCombinations (line 56) | def testInvalidVAEGANCombinations(self): FILE: tensor2tensor/models/video/sv2p.py class NextFrameSv2p (line 44) | class NextFrameSv2p(base.NextFrameBase, base_vae.NextFrameBaseVae): method is_recurrent_model (line 48) | def is_recurrent_model(self): method tinyify (line 51) | def tinyify(self, array): method bottom_part_tower (line 55) | def bottom_part_tower(self, input_image, input_reward, action, latent, method reward_prediction (line 148) | def reward_prediction(self, *args, **kwargs): method reward_prediction_basic (line 159) | def reward_prediction_basic( method reward_prediction_mid (line 168) | def reward_prediction_mid( method reward_prediction_big (line 187) | def reward_prediction_big( method get_extra_loss (line 221) | def get_extra_loss(self, method construct_predictive_tower (line 228) | def construct_predictive_tower( method video_features (line 358) | def video_features( method next_frame (line 369) | def next_frame(self, frames, actions, rewards, target_frame, class NextFrameSv2pDiscrete (line 397) | class NextFrameSv2pDiscrete(NextFrameSv2p): method video_features (line 400) | def video_features( method basic_conv_net (line 406) | def basic_conv_net(self, images, conv_size, scope): method simple_discrete_latent_tower (line 420) | def simple_discrete_latent_tower(self, input_image, target_image): method next_frame (line 441) | def next_frame(self, frames, actions, rewards, target_frame, class NextFrameSv2pAtari (line 468) | class NextFrameSv2pAtari(NextFrameSv2p): method init_internal_states (line 471) | def init_internal_states(self): method reset_internal_states_ops (line 493) | def reset_internal_states_ops(self): method load_internal_states_ops (line 498) | def load_internal_states_ops(self): method save_internal_states_ops (line 502) | def save_internal_states_ops(self, internal_states): class NextFrameSv2pLegacy (line 509) | class NextFrameSv2pLegacy(NextFrameSv2p): method visualize_predictions (line 512) | def visualize_predictions(self, real_frames, gen_frames, actions=None): method get_input_if_exists (line 540) | def get_input_if_exists(self, features, key, batch_size, num_frames): method construct_model (line 547) | def construct_model(self, method infer (line 653) | def infer(self, features, *args, **kwargs): method body (line 689) | def body(self, features): class NextFrameSv2pTwoFrames (line 764) | class NextFrameSv2pTwoFrames(NextFrameSv2pLegacy): method construct_model (line 767) | def construct_model(self, images, actions, rewards): FILE: tensor2tensor/models/video/sv2p_params.py function next_frame_sv2p (line 27) | def next_frame_sv2p(): function next_frame_sv2p_discrete (line 65) | def next_frame_sv2p_discrete(): function next_frame_sv2p_atari (line 81) | def next_frame_sv2p_atari(): function next_frame_sv2p_atari_softmax (line 98) | def next_frame_sv2p_atari_softmax(): function next_frame_sv2p_atari_deterministic (line 109) | def next_frame_sv2p_atari_deterministic(): function next_frame_sv2p_atari_softmax_deterministic (line 117) | def next_frame_sv2p_atari_softmax_deterministic(): function next_frame_sv2p_tiny (line 125) | def next_frame_sv2p_tiny(): function next_frame_sv2p_tiny_external (line 138) | def next_frame_sv2p_tiny_external(): function next_frame_sv2p_cutoff (line 146) | def next_frame_sv2p_cutoff(): FILE: tensor2tensor/models/video/sv2p_test.py class NextFrameTest (line 29) | class NextFrameTest(tests_utils.BaseNextFrameTest): method testSv2p (line 31) | def testSv2p(self): method testSv2pWithActions (line 38) | def testSv2pWithActions(self): method testSv2pWithActionsAndRewards (line 45) | def testSv2pWithActionsAndRewards(self): method testSv2pWithActionsAndRewardsExternalLoss (line 54) | def testSv2pWithActionsAndRewardsExternalLoss(self): method testSv2pTwoFrames (line 63) | def testSv2pTwoFrames(self): FILE: tensor2tensor/models/video/tests_utils.py function fill_hparams (line 32) | def fill_hparams(hparams, in_frames, out_frames): function action_modalities (line 44) | def action_modalities(hparams): function full_modalities (line 61) | def full_modalities(hparams): function create_basic_features (line 83) | def create_basic_features(in_frames, out_frames): function create_action_features (line 93) | def create_action_features(in_frames, out_frames): function create_full_features (line 102) | def create_full_features(in_frames, out_frames): function get_tensor_shape (line 111) | def get_tensor_shape(tensor): class BaseNextFrameTest (line 115) | class BaseNextFrameTest(tf.test.TestCase): method RunModel (line 118) | def RunModel(self, model, hparams, features): method InferModel (line 126) | def InferModel(self, model, hparams, features): method TestVideoModel (line 134) | def TestVideoModel(self, method TestVideoModelInfer (line 151) | def TestVideoModelInfer(self, method TestVideoModelWithActions (line 172) | def TestVideoModelWithActions(self, method TestVideoModelWithActionsInfer (line 189) | def TestVideoModelWithActionsInfer(self, method TestVideoModelWithActionAndRewards (line 210) | def TestVideoModelWithActionAndRewards(self, method TestVideoModelWithActionAndRewardsInfer (line 233) | def TestVideoModelWithActionAndRewardsInfer(self, method TestOnVariousInputOutputSizes (line 258) | def TestOnVariousInputOutputSizes( method TestWithActions (line 269) | def TestWithActions(self, hparams, model, expected_last_dim, test_infe... method TestWithActionAndRewards (line 279) | def TestWithActionAndRewards( method TestOnVariousUpSampleLayers (line 290) | def TestOnVariousUpSampleLayers(self, hparams, model, expected_last_dim): FILE: tensor2tensor/models/xception.py function residual_block (line 33) | def residual_block(x, hparams): function xception_internal (line 48) | def xception_internal(inputs, hparams): function xception_entry (line 73) | def xception_entry(inputs, hidden_dim): function xception_exit (line 113) | def xception_exit(inputs): class Xception (line 137) | class Xception(t2t_model.T2TModel): method body (line 139) | def body(self, features): function xception_base (line 144) | def xception_base(): function xception_tiny (line 170) | def xception_tiny(): function xception_tiny_tpu (line 180) | def xception_tiny_tpu(): FILE: tensor2tensor/models/xception_test.py class XceptionTest (line 32) | class XceptionTest(tf.test.TestCase): method _test_xception (line 34) | def _test_xception(self, img_size): method testXceptionSmallImage (line 58) | def testXceptionSmallImage(self): method testXceptionLargeImage (line 61) | def testXceptionLargeImage(self): FILE: tensor2tensor/problems.py function problem (line 25) | def problem(name): function available (line 29) | def available(): FILE: tensor2tensor/problems_colab.py function problem (line 25) | def problem(name): function available (line 29) | def available(): FILE: tensor2tensor/problems_test.py class ProblemsTest (line 26) | class ProblemsTest(tf.test.TestCase): method testImport (line 28) | def testImport(self): FILE: tensor2tensor/rl/batch_dqn_agent_test.py class BatchDQNAgentTest (line 36) | class BatchDQNAgentTest(tf.test.TestCase): method setUp (line 40) | def setUp(self): method _create_test_agent (line 59) | def _create_test_agent(self, sess): method testCreateAgentWithDefaults (line 100) | def testCreateAgentWithDefaults(self): method testBeginEpisode (line 110) | def testBeginEpisode(self): FILE: tensor2tensor/rl/batch_runner_test.py function _create_mock_checkpointer (line 38) | def _create_mock_checkpointer(): class MockEnvironment (line 46) | class MockEnvironment(object): method __init__ (line 49) | def __init__(self, max_steps=10, reward_multiplier=1): method reset (line 55) | def reset(self): method step (line 59) | def step(self, action): method render (line 70) | def render(self, mode): class BatchEnv (line 74) | class BatchEnv(object): method __init__ (line 84) | def __init__(self, envs): method step (line 90) | def step(self, actions): method reset (line 98) | def reset(self): method render (line 101) | def render(self, mode): class MockLogger (line 105) | class MockLogger(object): method __init__ (line 108) | def __init__(self, test_cls=None, run_asserts=True, data=None): method __setitem__ (line 116) | def __setitem__(self, key, val): method log_to_file (line 123) | def log_to_file(self, filename_prefix, iteration_number): class BatchedRunnerTest (line 131) | class BatchedRunnerTest(tf.test.TestCase): method _agent_step (line 137) | def _agent_step(self, rewards, observations): method prepare_mock_agent (line 146) | def prepare_mock_agent(self, batch_size): method setUp (line 155) | def setUp(self): method testRunEpisodeBatch (line 162) | def testRunEpisodeBatch(self): method testRunOneEpisodeWithLowMaxSteps (line 181) | def testRunOneEpisodeWithLowMaxSteps(self): method testRunOnePhase (line 198) | def testRunOnePhase(self): method testRunOneIteration (line 231) | def testRunOneIteration(self): method testLogExperiment (line 262) | def testLogExperiment(self, mock_logger_constructor): FILE: tensor2tensor/rl/datagen_with_agent.py function main (line 41) | def main(_): FILE: tensor2tensor/rl/dopamine_connector.py class _DQNAgent (line 65) | class _DQNAgent(dqn_agent.DQNAgent): method __init__ (line 72) | def __init__(self, replay_capacity, buffer_batch_size, method _build_replay_buffer (line 79) | def _build_replay_buffer(self, use_staging): class BatchDQNAgent (line 101) | class BatchDQNAgent(_DQNAgent): method __init__ (line 109) | def __init__(self, env_batch_size, *args, **kwargs): method reset_current_rollouts (line 120) | def reset_current_rollouts(self): method _record_observation (line 123) | def _record_observation(self, observation_batch): method _reset_state (line 132) | def _reset_state(self): method begin_episode (line 135) | def begin_episode(self, observation): method _update_current_rollouts (line 145) | def _update_current_rollouts(self, last_observation, action, reward, method _store_current_rollouts (line 151) | def _store_current_rollouts(self): method step (line 157) | def step(self, reward, observation): method end_episode (line 172) | def end_episode(self, reward): method _select_action (line 179) | def _select_action(self): class _OutOfGraphReplayBuffer (line 200) | class _OutOfGraphReplayBuffer(OutOfGraphReplayBuffer): method __init__ (line 215) | def __init__(self, artificial_done, **kwargs): method is_valid_transition (line 222) | def is_valid_transition(self, index): method get_artificial_done_stack (line 227) | def get_artificial_done_stack(self, index): method add (line 231) | def add(self, observation, action, reward, terminal, *args): method load (line 241) | def load(self, *args, **kwargs): class _WrappedPrioritizedReplayBuffer (line 248) | class _WrappedPrioritizedReplayBuffer(WrappedPrioritizedReplayBuffer): method __init__ (line 251) | def __init__(self, wrapped_memory, batch_size, use_staging): class _RainbowAgent (line 257) | class _RainbowAgent(rainbow_agent.RainbowAgent): method __init__ (line 264) | def __init__(self, replay_capacity, buffer_batch_size, method _build_replay_buffer (line 271) | def _build_replay_buffer(self, use_staging): class BatchRainbowAgent (line 294) | class BatchRainbowAgent(_RainbowAgent): method __init__ (line 302) | def __init__(self, env_batch_size, *args, **kwargs): method reset_current_rollouts (line 313) | def reset_current_rollouts(self): method _record_observation (line 316) | def _record_observation(self, observation_batch): method _reset_state (line 325) | def _reset_state(self): method begin_episode (line 328) | def begin_episode(self, observation): method _update_current_rollouts (line 338) | def _update_current_rollouts(self, last_observation, action, reward, method _store_current_rollouts (line 344) | def _store_current_rollouts(self): method step (line 350) | def step(self, reward, observation): method end_episode (line 365) | def end_episode(self, reward): method _select_action (line 372) | def _select_action(self): class BatchRunner (line 393) | class BatchRunner(run_experiment.Runner): method __init__ (line 399) | def __init__(self, base_dir, create_agent_fn, **kwargs): method _run_one_episode (line 403) | def _run_one_episode(self): method _run_one_phase (line 409) | def _run_one_phase(self, min_steps, statistics, run_mode_str): method close (line 434) | def close(self): class _OutOfGraphPrioritizedReplayBuffer (line 438) | class _OutOfGraphPrioritizedReplayBuffer(OutOfGraphPrioritizedReplayBuff... method __init__ (line 453) | def __init__(self, artificial_done, **kwargs): method is_valid_transition (line 462) | def is_valid_transition(self, index): method get_artificial_done_stack (line 469) | def get_artificial_done_stack(self, index): method add (line 473) | def add(self, observation, action, reward, terminal, priority): method load (line 485) | def load(self, *args, **kwargs): function get_create_agent (line 492) | def get_create_agent(agent_kwargs): class ResizeBatchObservation (line 539) | class ResizeBatchObservation(object): method __init__ (line 551) | def __init__(self, batch_env, size=84): method observation (line 555) | def observation(self, frames): method step (line 562) | def step(self, actions): method reset (line 567) | def reset(self, *args, **kwargs): method action_space (line 571) | def action_space(self): method batch_size (line 575) | def batch_size(self): method close (line 578) | def close(self): class DopamineBatchEnv (line 582) | class DopamineBatchEnv(object): method __init__ (line 591) | def __init__(self, batch_env, max_episode_steps): method reset (line 597) | def reset(self): method step (line 602) | def step(self, actions): method render (line 621) | def render(self, mode): method close (line 624) | def close(self): method action_space (line 628) | def action_space(self): method batch_size (line 632) | def batch_size(self): class PaddedTrajectoriesEnv (line 636) | class PaddedTrajectoriesEnv(DopamineBatchEnv): method reset (line 649) | def reset(self): method step (line 655) | def step(self, actions): function get_create_batch_env_fun (line 681) | def get_create_batch_env_fun(batch_env_fn, time_limit): function _parse_hparams (line 702) | def _parse_hparams(hparams): function _get_optimizer (line 725) | def _get_optimizer(params): class DQNLearner (line 731) | class DQNLearner(PolicyLearner): method __init__ (line 734) | def __init__(self, frame_stack_size, base_event_dir, agent_model_dir, method _target_iteractions_and_steps (line 740) | def _target_iteractions_and_steps(self, num_env_steps, save_continuously, method create_runner (line 752) | def create_runner(self, env_fn, hparams, target_iterations, method train (line 773) | def train(self, method evaluate (line 808) | def evaluate(self, env_fn, hparams, sampling_temp): FILE: tensor2tensor/rl/envs/in_graph_batch_env.py class InGraphBatchEnv (line 30) | class InGraphBatchEnv(object): method __init__ (line 34) | def __init__(self, observ_space, action_space): method __str__ (line 38) | def __str__(self): method __len__ (line 41) | def __len__(self): method __getitem__ (line 45) | def __getitem__(self, index): method simulate (line 49) | def simulate(self, action): method reset (line 62) | def reset(self, indices=None): method _get_tf_dtype (line 77) | def _get_tf_dtype(space): method observ_dtype (line 85) | def observ_dtype(self): method observ_shape (line 89) | def observ_shape(self): method action_dtype (line 93) | def action_dtype(self): method action_shape (line 97) | def action_shape(self): method observ (line 101) | def observ(self): method close (line 105) | def close(self): FILE: tensor2tensor/rl/envs/py_func_batch_env.py class PyFuncBatchEnv (line 31) | class PyFuncBatchEnv(InGraphBatchEnv): method __init__ (line 39) | def __init__(self, batch_env): method __str__ (line 54) | def __str__(self): method __getattr__ (line 57) | def __getattr__(self, name): method initialize (line 68) | def initialize(self, sess): method __len__ (line 71) | def __len__(self): method __getitem__ (line 75) | def __getitem__(self, index): method simulate (line 79) | def simulate(self, action): method _reset_non_empty (line 112) | def _reset_non_empty(self, indices): method observ (line 129) | def observ(self): method close (line 133) | def close(self): FILE: tensor2tensor/rl/envs/simulated_batch_env.py function PIL_Image (line 42) | def PIL_Image(): # pylint: disable=invalid-name function PIL_ImageDraw (line 48) | def PIL_ImageDraw(): # pylint: disable=invalid-name class HistoryBuffer (line 53) | class HistoryBuffer(object): method __init__ (line 56) | def __init__(self, initial_frame_chooser, observ_shape, observ_dtype, method get_all_elements (line 68) | def get_all_elements(self): method move_by_one_element (line 71) | def move_by_one_element(self, element): method reset (line 79) | def reset(self, indices): function compute_uncertainty_reward (line 86) | def compute_uncertainty_reward(logits, predictions): class SimulatedBatchEnv (line 103) | class SimulatedBatchEnv(in_graph_batch_env.InGraphBatchEnv): method __init__ (line 111) | def __init__( method initialize (line 162) | def initialize(self, sess): method __str__ (line 173) | def __str__(self): method __len__ (line 176) | def __len__(self): method simulate (line 180) | def simulate(self, action): method _reset_non_empty (line 233) | def _reset_non_empty(self, indices): method observ (line 263) | def observ(self): method history_observations (line 268) | def history_observations(self): method _video_dump_frame (line 271) | def _video_dump_frame(self, obs, rews): method _video_dump_frames (line 286) | def _video_dump_frames(self, obs): method _video_reset_writer (line 293) | def _video_reset_writer(self): method close (line 298) | def close(self): FILE: tensor2tensor/rl/envs/simulated_batch_gym_env.py class FlatBatchEnv (line 31) | class FlatBatchEnv(Env): method __init__ (line 34) | def __init__(self, batch_env): method step (line 41) | def step(self, action): method reset (line 45) | def reset(self): class SimulatedBatchGymEnv (line 50) | class SimulatedBatchGymEnv(Env): method __init__ (line 53) | def __init__(self, *args, **kwargs): method batch_size (line 71) | def batch_size(self): method observation_space (line 75) | def observation_space(self): method action_space (line 79) | def action_space(self): method render (line 82) | def render(self, mode="human"): method reset (line 85) | def reset(self, indices=None): method step (line 91) | def step(self, actions): method close (line 97) | def close(self): FILE: tensor2tensor/rl/envs/tf_atari_wrappers.py class WrapperBase (line 29) | class WrapperBase(InGraphBatchEnv): method __init__ (line 32) | def __init__(self, batch_env): method initialize (line 38) | def initialize(self, sess): method observ (line 43) | def observ(self): method observ_shape (line 48) | def observ_shape(self): method __len__ (line 51) | def __len__(self): method _reset_non_empty (line 55) | def _reset_non_empty(self, indices): method _transform_history_observations (line 63) | def _transform_history_observations(self, frames): method history_observations (line 77) | def history_observations(self): class StackWrapper (line 91) | class StackWrapper(WrapperBase): method __init__ (line 94) | def __init__(self, batch_env, history=4): method __str__ (line 103) | def __str__(self): method observ_shape (line 107) | def observ_shape(self): method simulate (line 110) | def simulate(self, action): method _reset_non_empty (line 131) | def _reset_non_empty(self, indices): method _transform_history_observations (line 147) | def _transform_history_observations(self, frames): FILE: tensor2tensor/rl/evaluator.py function planner_tiny (line 112) | def planner_tiny(): function planner_small (line 125) | def planner_small(): function planner_base (line 138) | def planner_base(): function planner_guess1 (line 155) | def planner_guess1(): function planner_guess2 (line 163) | def planner_guess2(): function planner_guess3 (line 171) | def planner_guess3(): function planner_guess4 (line 182) | def planner_guess4(): function planner_guess5 (line 191) | def planner_guess5(): function planner_guess6 (line 200) | def planner_guess6(): function planner_guess7 (line 209) | def planner_guess7(): function planner_guess8 (line 218) | def planner_guess8(): function planner_guess9 (line 227) | def planner_guess9(): function planner_guess0 (line 236) | def planner_guess0(): function make_env (line 244) | def make_env(env_type, real_env, sim_env_kwargs): function make_agent (line 257) | def make_agent( function collect_frames_for_random_starts (line 284) | def collect_frames_for_random_starts( function make_agent_from_hparams (line 304) | def make_agent_from_hparams( function make_eval_fn_with_agent (line 328) | def make_eval_fn_with_agent( function evaluate_world_model (line 379) | def evaluate_world_model( function evaluate (line 407) | def evaluate( function get_game_for_worker (line 468) | def get_game_for_worker(map_name, directory_id): function evaluate_all_epochs (line 484) | def evaluate_all_epochs( function main (line 499) | def main(_): FILE: tensor2tensor/rl/evaluator_test.py class EvalTest (line 27) | class EvalTest(tf.test.TestCase): method test_evaluate_pong_random_agent (line 29) | def test_evaluate_pong_random_agent(self): FILE: tensor2tensor/rl/gym_utils.py class StickyActionEnv (line 31) | class StickyActionEnv(gym.Wrapper): method __init__ (line 34) | def __init__(self, env, p=0.25): method step (line 39) | def step(self, action): method reset (line 46) | def reset(self, **kwargs): class MaxAndSkipEnv (line 50) | class MaxAndSkipEnv(gym.Wrapper): method __init__ (line 53) | def __init__(self, env, skip=4): method __str__ (line 62) | def __str__(self): method step (line 65) | def step(self, action): method reset (line 82) | def reset(self, **kwargs): class ActionDiscretizeWrapper (line 86) | class ActionDiscretizeWrapper(gym.ActionWrapper): method __init__ (line 93) | def __init__(self, env, num_actions): method _discretize_env (line 122) | def _discretize_env(self, env): method _map_actions (line 160) | def _map_actions(self, action): method action (line 182) | def action(self, action): method reverse_action (line 193) | def reverse_action(self, action): class RenderedEnv (line 197) | class RenderedEnv(gym.Wrapper): method __init__ (line 200) | def __init__(self, method _maybe_resize (line 230) | def _maybe_resize(self, obs): method step (line 240) | def step(self, action): method reset (line 245) | def reset(self, **kwargs): function remove_time_limit_wrapper (line 251) | def remove_time_limit_wrapper(env): function gym_env_wrapper (line 273) | def gym_env_wrapper(env, rl_env_max_episode_steps, maxskip_env, rendered... function make_gym_env (line 308) | def make_gym_env(name, function register_gym_env (line 346) | def register_gym_env(class_entry_point, version="v0", kwargs=None): FILE: tensor2tensor/rl/gym_utils_test.py class SimpleEnv (line 31) | class SimpleEnv(gym.Env): method __init__ (line 34) | def __init__(self): method reset (line 39) | def reset(self): method step (line 42) | def step(self, action): method render (line 48) | def render(self, mode="human"): class SimpleContinuousActionsEnv (line 53) | class SimpleContinuousActionsEnv(gym.Env): method __init__ (line 56) | def __init__(self, dimensions): method reset (line 61) | def reset(self): method step (line 64) | def step(self, action): method render (line 70) | def render(self, mode="human"): class EnvWithOptions (line 75) | class EnvWithOptions(SimpleEnv): method __init__ (line 78) | def __init__(self, done_action=0): method step (line 83) | def step(self, action): class GymUtilsTest (line 89) | class GymUtilsTest(tf.test.TestCase): method test_making_simple_env (line 92) | def test_making_simple_env(self): method test_making_timewrapped_env (line 97) | def test_making_timewrapped_env(self): method test_unlimited_env (line 104) | def test_unlimited_env(self): method test_rendered_env (line 109) | def test_rendered_env(self): method test_rendered_env_continuous_1d (line 119) | def test_rendered_env_continuous_1d(self): method test_rendered_env_continuous_2d (line 133) | def test_rendered_env_continuous_2d(self): method test_correct_number_of_discrete_actions_1d (line 147) | def test_correct_number_of_discrete_actions_1d(self): method test_correct_number_of_discrete_actions_2d (line 156) | def test_correct_number_of_discrete_actions_2d(self): method test_action_mapping_1d (line 164) | def test_action_mapping_1d(self): method test_action_mapping_2d (line 188) | def test_action_mapping_2d(self): method test_gym_registration (line 214) | def test_gym_registration(self): method test_gym_registration_continuous (line 230) | def test_gym_registration_continuous(self): method test_gym_registration_with_kwargs (line 247) | def test_gym_registration_with_kwargs(self): FILE: tensor2tensor/rl/player.py class PlayerEnv (line 106) | class PlayerEnv(gym.Env): method __init__ (line 139) | def __init__(self, action_meanings): method get_keys_to_action (line 157) | def get_keys_to_action(self): method _player_actions (line 193) | def _player_actions(self): method _player_toggle_wait_action (line 199) | def _player_toggle_wait_action(self): method step (line 203) | def step(self, action): method _augment_observation (line 223) | def _augment_observation(self, ob, reward, cumulative_reward): method reset (line 256) | def reset(self): method _step_envs (line 259) | def _step_envs(self, action): method _update_statistics (line 263) | def _update_statistics(self, envs_step_tuples): method _player_return_done_action (line 267) | def _player_return_done_action(self): method _player_step_tuple (line 276) | def _player_step_tuple(self, envs_step_tuples): class SimAndRealEnvPlayer (line 281) | class SimAndRealEnvPlayer(PlayerEnv): method __init__ (line 304) | def __init__(self, real_env, sim_env, action_meanings): method _player_actions (line 332) | def _player_actions(self): method get_keys_to_action (line 340) | def get_keys_to_action(self): method _player_step_tuple (line 345) | def _player_step_tuple(self, envs_step_tuples): method reset (line 375) | def reset(self): method _pack_step_tuples (line 392) | def _pack_step_tuples(self, real_env_step_tuple, sim_env_step_tuple): method set_zero_cumulative_rewards (line 396) | def set_zero_cumulative_rewards(self): method _step_envs (line 400) | def _step_envs(self, action): method _update_statistics (line 408) | def _update_statistics(self, envs_step_tuples): method _player_return_done_action (line 412) | def _player_return_done_action(self): method player_restart_simulated_env_action (line 417) | def player_restart_simulated_env_action(self): class SingleEnvPlayer (line 426) | class SingleEnvPlayer(PlayerEnv): method __init__ (line 439) | def __init__(self, env, action_meanings): method _player_step_tuple (line 449) | def _player_step_tuple(self, envs_step_tuples): method _pack_step_tuples (line 455) | def _pack_step_tuples(self, env_step_tuple): method reset (line 458) | def reset(self): method _step_envs (line 465) | def _step_envs(self, action): method _update_statistics (line 469) | def _update_statistics(self, envs_step_tuples): method _player_return_done_action (line 473) | def _player_return_done_action(self): function main (line 478) | def main(_): FILE: tensor2tensor/rl/player_utils.py class SimulatedGymEnv (line 45) | class SimulatedGymEnv(gym.Env): method __init__ (line 61) | def __init__(self, real_env, world_model_dir, hparams, random_starts, method reset (line 105) | def reset(self): method step (line 108) | def step(self, action): method add_to_initial_stack (line 111) | def add_to_initial_stack(self, frame): function infer_last_epoch_num (line 123) | def infer_last_epoch_num(data_dir): function setup_and_load_epoch (line 132) | def setup_and_load_epoch(hparams, data_dir, which_epoch_data=None): function infer_game_name_from_filenames (line 159) | def infer_game_name_from_filenames(data_dir, snake_case=True): function load_data_and_make_simulated_env (line 174) | def load_data_and_make_simulated_env( class ExtendToEvenDimentions (line 188) | class ExtendToEvenDimentions(gym.ObservationWrapper): method __init__ (line 192) | def __init__(self, env): method observation (line 208) | def observation(self, frame): method if_odd (line 219) | def if_odd(self, n): class RenderObservations (line 223) | class RenderObservations(gym.Wrapper): method __init__ (line 226) | def __init__(self, env): method step (line 231) | def step(self, action): method reset (line 236) | def reset(self, **kwargs): method render (line 240) | def render(self, mode="human", **kwargs): function wrap_with_monitor (line 245) | def wrap_with_monitor(env, video_dir): function create_simulated_env (line 267) | def create_simulated_env( class PPOPolicyInferencer (line 301) | class PPOPolicyInferencer(object): method __init__ (line 313) | def __init__(self, hparams, action_space, observation_space, policy_dir): method frame_stack_shape (line 334) | def frame_stack_shape(self): method reset_frame_stack (line 337) | def reset_frame_stack(self, frame_stack=None): method _add_to_stack (line 345) | def _add_to_stack(self, ob): method infer (line 350) | def infer(self, ob): method infer_from_frame_stack (line 363) | def infer_from_frame_stack(self, ob_stack): function infer_paths (line 377) | def infer_paths(output_dir, **subdirs): FILE: tensor2tensor/rl/policy_learner.py class PolicyLearner (line 23) | class PolicyLearner(object): method __init__ (line 26) | def __init__( method train (line 34) | def train( method evaluate (line 50) | def evaluate(self, env_fn, hparams, sampling_temp): FILE: tensor2tensor/rl/ppo.py function define_ppo_step (line 33) | def define_ppo_step(data_points, hparams, action_space, lr, epoch=-1, function _distributional_to_value (line 98) | def _distributional_to_value(value_d, size, subscale, threshold): function define_ppo_epoch (line 116) | def define_ppo_epoch(memory, hparams, action_space, batch_size, function calculate_generalized_advantage_estimator (line 222) | def calculate_generalized_advantage_estimator( function discounted_rewards (line 246) | def discounted_rewards(reward, done, gae_gamma, end_values): FILE: tensor2tensor/rl/ppo_learner.py class PPOLearner (line 38) | class PPOLearner(PolicyLearner): method __init__ (line 41) | def __init__(self, frame_stack_size, base_event_dir, agent_model_dir, method train (line 51) | def train(self, method evaluate (line 135) | def evaluate(self, env_fn, hparams, sampling_temp): function _define_train (line 162) | def _define_train( function _run_train (line 210) | def _run_train(ppo_hparams, function _rollout_metadata (line 279) | def _rollout_metadata(batch_env, distributional_size=1): class _MemoryWrapper (line 299) | class _MemoryWrapper(WrapperBase): method __init__ (line 302) | def __init__(self, batch_env): method __str__ (line 316) | def __str__(self): method simulate (line 319) | def simulate(self, action): function _define_collect (line 338) | def _define_collect(batch_env, ppo_hparams, scope, frame_stack_size, eva... FILE: tensor2tensor/rl/restarter.py class Restarter (line 24) | class Restarter(object): method __init__ (line 49) | def __init__(self, model_mode, checkpoint_dir, target_local_step): method training_loop (line 90) | def training_loop(self): method _get_global_step (line 104) | def _get_global_step(self): method _read_counters (line 111) | def _read_counters(self): method _write_counters (line 120) | def _write_counters(self, local_step, global_step): FILE: tensor2tensor/rl/restarter_test.py class RestarterTest (line 30) | class RestarterTest(tf.test.TestCase): method setUp (line 32) | def setUp(self): method create_checkpoint (line 37) | def create_checkpoint(self, global_step): method run_single_mode (line 46) | def run_single_mode(self, mode, target_local_step, target_global_step): method assert_first_run (line 51) | def assert_first_run(self, restarter, steps_to_go, target_global_step): method test_runs_in_single_mode (line 57) | def test_runs_in_single_mode(self): method test_runs_in_two_modes (line 65) | def test_runs_in_two_modes(self): method test_skips_already_done (line 85) | def test_skips_already_done(self): method test_restarts_after_interruption (line 97) | def test_restarts_after_interruption(self): FILE: tensor2tensor/rl/rl_utils.py function compute_mean_reward (line 46) | def compute_mean_reward(rollouts, clipped): function get_metric_name (line 61) | def get_metric_name(sampling_temp, max_num_noops, clipped): function _eval_fn_with_learner (line 67) | def _eval_fn_with_learner( function evaluate_single_config (line 78) | def evaluate_single_config( function evaluate_all_configs (line 101) | def evaluate_all_configs( function evaluate_world_model (line 121) | def evaluate_world_model( function summarize_metrics (line 253) | def summarize_metrics(eval_metrics_writer, metrics, epoch): function full_game_name (line 271) | def full_game_name(short_name): function should_apply_max_and_skip_env (line 285) | def should_apply_max_and_skip_env(hparams): function setup_env (line 290) | def setup_env(hparams, function update_hparams_from_hparams (line 317) | def update_hparams_from_hparams(target_hparams, source_hparams, prefix): function random_rollout_subsequences (line 324) | def random_rollout_subsequences(rollouts, num_subsequences, subsequence_... function make_initial_frame_chooser (line 340) | def make_initial_frame_chooser( function absolute_hinge_difference (line 386) | def absolute_hinge_difference(arr1, arr2, min_diff=10, dtype=np.uint8): function augment_observation (line 403) | def augment_observation( function run_rollouts (line 427) | def run_rollouts( class BatchAgent (line 503) | class BatchAgent(object): method __init__ (line 512) | def __init__(self, batch_size, observation_space, action_space): method act (line 517) | def act(self, observations, env_state=None): method estimate_value (line 529) | def estimate_value(self, observations): method action_distribution (line 542) | def action_distribution(self, observations): class RandomAgent (line 556) | class RandomAgent(BatchAgent): method act (line 559) | def act(self, observations, env_state=None): method estimate_value (line 565) | def estimate_value(self, observations): method action_distribution (line 568) | def action_distribution(self, observations): class PolicyAgent (line 574) | class PolicyAgent(BatchAgent): method __init__ (line 577) | def __init__( method _run (line 603) | def _run(self, observations): method act (line 609) | def act(self, observations, env_state=None): method estimate_value (line 614) | def estimate_value(self, observations): method action_distribution (line 618) | def action_distribution(self, observations): class PlannerAgent (line 623) | class PlannerAgent(BatchAgent): method __init__ (line 629) | def __init__( method act (line 661) | def act(self, observations, env_state=None): method _uct_bonus (line 744) | def _uct_bonus(self, count, prob): method _get_first_actions (line 749) | def _get_first_actions(self, observations): class BatchWrapper (line 761) | class BatchWrapper(object): method __init__ (line 764) | def __init__(self, env): method reset (line 771) | def reset(self, indices=None): method step (line 774) | def step(self, actions): method close (line 777) | def close(self): class BatchStackWrapper (line 781) | class BatchStackWrapper(BatchWrapper): method __init__ (line 787) | def __init__(self, env, stack_size): method state (line 803) | def state(self): method set_initial_state (line 807) | def set_initial_state(self, initial_state, initial_frames): method reset (line 812) | def reset(self, indices=None): method step (line 834) | def step(self, actions): class SimulatedBatchGymEnvWithFixedInitialFrames (line 841) | class SimulatedBatchGymEnvWithFixedInitialFrames(BatchWrapper): method __init__ (line 844) | def __init__(self, *args, **kwargs): method state (line 855) | def state(self): method set_initial_state (line 859) | def set_initial_state(self, initial_state, initial_frames): FILE: tensor2tensor/rl/trainer_model_based.py function real_env_step_increment (line 53) | def real_env_step_increment(hparams): function world_model_step_increment (line 60) | def world_model_step_increment(hparams, epoch): function setup_directories (line 68) | def setup_directories(base_dir, subdirs): function make_relative_timing_fn (line 85) | def make_relative_timing_fn(): function make_log_fn (line 99) | def make_log_fn(epoch, log_relative_time_fn): function random_rollout_subsequences (line 109) | def random_rollout_subsequences(rollouts, num_subsequences, subsequence_... function train_supervised (line 125) | def train_supervised(problem, model_name, hparams, data_dir, output_dir, function train_agent (line 141) | def train_agent(real_env, learner, world_model_dir, hparams, epoch): function train_agent_real_env (line 174) | def train_agent_real_env(env, learner, hparams, epoch): function train_world_model (line 200) | def train_world_model( function load_metrics (line 230) | def load_metrics(event_dir, epoch): function training_loop (line 252) | def training_loop(hparams, output_dir, report_fn=None, report_metric=None): function main (line 380) | def main(_): FILE: tensor2tensor/rl/trainer_model_based_agent_only.py function get_simulated_problem_name (line 46) | def get_simulated_problem_name(game): function main (line 53) | def main(_): FILE: tensor2tensor/rl/trainer_model_based_params.py function _rlmb_base (line 47) | def _rlmb_base(): function update_hparams (line 129) | def update_hparams(hparams, other): function rlmb_ppo_base (line 138) | def rlmb_ppo_base(): function rlmb_ppo_base_param_sharing (line 175) | def rlmb_ppo_base_param_sharing(): function rlmb_base (line 184) | def rlmb_base(): function rlmb_dqn_base (line 189) | def rlmb_dqn_base(): function rlmb_dqn_guess1 (line 214) | def rlmb_dqn_guess1(): function rlmb_dqn_guess1_rainbow (line 225) | def rlmb_dqn_guess1_rainbow(): function rlmb_dqn_rainbow_large_epsilon (line 233) | def rlmb_dqn_rainbow_large_epsilon(): function rlmb_dqn_guess1_2m_replay_buffer (line 246) | def rlmb_dqn_guess1_2m_replay_buffer(): function rlmb_dqn_guess1_10m_replay_buffer (line 254) | def rlmb_dqn_guess1_10m_replay_buffer(): function rlmb_basetest (line 262) | def rlmb_basetest(): function rlmb_noresize (line 274) | def rlmb_noresize(): function rlmb_ppo_quick (line 282) | def rlmb_ppo_quick(): function rlmb_quick (line 293) | def rlmb_quick(): function rlmb_ppo_quick_param_sharing (line 299) | def rlmb_ppo_quick_param_sharing(): function rlmb_quick_noresize (line 308) | def rlmb_quick_noresize(): function rlmb_quick_sd (line 316) | def rlmb_quick_sd(): function rlmb_sdtest (line 325) | def rlmb_sdtest(): function rlmb_quick_sm (line 334) | def rlmb_quick_sm(): function rlmb_base_stochastic (line 342) | def rlmb_base_stochastic(): function rlmb_base_sampling_stochastic (line 352) | def rlmb_base_sampling_stochastic(): function rlmb_base_stochastic_discrete (line 361) | def rlmb_base_stochastic_discrete(): function rlmb_base_stochastic_discrete_sticky_actions (line 376) | def rlmb_base_stochastic_discrete_sticky_actions(): function rlmb_base_stochastic_discrete_20k (line 384) | def rlmb_base_stochastic_discrete_20k(): function rlmb_base_stochastic_discrete_50k (line 396) | def rlmb_base_stochastic_discrete_50k(): function rlmb_base_stochastic_discrete_75k_model_steps (line 404) | def rlmb_base_stochastic_discrete_75k_model_steps(): function rlmb_base_stochastic_discrete_20k_model_steps (line 412) | def rlmb_base_stochastic_discrete_20k_model_steps(): function rlmb_base_stochastic_discrete_30k_model_steps (line 420) | def rlmb_base_stochastic_discrete_30k_model_steps(): function rlmb_base_stochastic_discrete_200k (line 428) | def rlmb_base_stochastic_discrete_200k(): function rlmb_base_stochastic_discrete_500k (line 436) | def rlmb_base_stochastic_discrete_500k(): function rlmb_base_stochastic_discrete_1m (line 444) | def rlmb_base_stochastic_discrete_1m(): function rlmb_base_stochastic_discrete_param_sharing (line 452) | def rlmb_base_stochastic_discrete_param_sharing(): function rlmb_long (line 461) | def rlmb_long(): function rlmb_long_stochastic_discrete (line 469) | def rlmb_long_stochastic_discrete(): function rlmb_long_stochastic_discrete_planner (line 478) | def rlmb_long_stochastic_discrete_planner(): function rlmb_long_stochastic_discrete_simulation_deterministic_starts (line 487) | def rlmb_long_stochastic_discrete_simulation_deterministic_starts(): function rlmb_long_stochastic_discrete_100steps (line 497) | def rlmb_long_stochastic_discrete_100steps(): function rlmb_long_stochastic_discrete_25steps (line 507) | def rlmb_long_stochastic_discrete_25steps(): function rlmb_long_stochastic_discrete_gamma95 (line 517) | def rlmb_long_stochastic_discrete_gamma95(): function rlmb_long_stochastic_discrete_gamma90 (line 525) | def rlmb_long_stochastic_discrete_gamma90(): function rlmb_base_stochastic_discrete_3epochs (line 533) | def rlmb_base_stochastic_discrete_3epochs(): function rlmb_base_stochastic_discrete_1epoch (line 542) | def rlmb_base_stochastic_discrete_1epoch(): function rlmb_base_recurrent (line 551) | def rlmb_base_recurrent(): function rlmb_base_stochastic_discrete_noresize (line 560) | def rlmb_base_stochastic_discrete_noresize(): function rlmb_base_sv2p (line 571) | def rlmb_base_sv2p(): function rlmb_base_sv2p_softmax (line 581) | def rlmb_base_sv2p_softmax(): function rlmb_base_sv2p_deterministic (line 589) | def rlmb_base_sv2p_deterministic(): function rlmb_base_sv2p_deterministic_softmax (line 597) | def rlmb_base_sv2p_deterministic_softmax(): function rlmb_base_sampling (line 606) | def rlmb_base_sampling(): function rlmb_base_sampling_noresize (line 614) | def rlmb_base_sampling_noresize(): function _rlmb_tiny_overrides (line 621) | def _rlmb_tiny_overrides(): function rlmb_ppo_tiny (line 642) | def rlmb_ppo_tiny(): function rlmb_tiny (line 658) | def rlmb_tiny(): function rlmb_dqn_tiny (line 663) | def rlmb_dqn_tiny(): function rlmb_tiny_stochastic (line 681) | def rlmb_tiny_stochastic(): function rlmb_tiny_recurrent (line 691) | def rlmb_tiny_recurrent(): function rlmb_tiny_sv2p (line 701) | def rlmb_tiny_sv2p(): function rlmb_tiny_simulation_deterministic_starts (line 711) | def rlmb_tiny_simulation_deterministic_starts(): function rlmb_grid (line 723) | def rlmb_grid(rhp): function rlmb_variance (line 736) | def rlmb_variance(rhp): function rlmb_variance_nogame (line 743) | def rlmb_variance_nogame(rhp): function rlmb_three (line 749) | def rlmb_three(rhp): function rlmb_test1 (line 755) | def rlmb_test1(rhp): function rlmb_scheduled_sampling (line 764) | def rlmb_scheduled_sampling(rhp): function rlmb_all_games (line 769) | def rlmb_all_games(rhp): function rlmb_whitelisted_games (line 775) | def rlmb_whitelisted_games(rhp): function rlmb_human_score_games (line 781) | def rlmb_human_score_games(rhp): function rlmb_human_score_games_v100unfriendly (line 788) | def rlmb_human_score_games_v100unfriendly(rhp): function rlmb_curious_games10 (line 796) | def rlmb_curious_games10(rhp): function rlmb_curious_games5 (line 802) | def rlmb_curious_games5(rhp): function rlmb_debug_games (line 808) | def rlmb_debug_games(rhp): function rlmb_ae_variance (line 814) | def rlmb_ae_variance(rhp): function rlmb_ppolr_game (line 824) | def rlmb_ppolr_game(rhp): function rlmb_ppolr (line 831) | def rlmb_ppolr(rhp): function rlmb_ae_ppo_lr (line 837) | def rlmb_ae_ppo_lr(rhp): function rlmb_dropout_range (line 844) | def rlmb_dropout_range(rhp): function rlmb_intrinsic_reward_scale (line 849) | def rlmb_intrinsic_reward_scale(rhp): function rlmb_l1l2cutoff_range (line 854) | def rlmb_l1l2cutoff_range(rhp): function rlmb_xentcutoff_range (line 860) | def rlmb_xentcutoff_range(rhp): function rlmb_pixel_noise (line 866) | def rlmb_pixel_noise(rhp): function rlmb_dummy_range (line 875) | def rlmb_dummy_range(rhp): function rlmb_epochs_num (line 881) | def rlmb_epochs_num(rhp): function rlmb_ppo_epochs_num (line 888) | def rlmb_ppo_epochs_num(rhp): function rlmb_ppo_epoch_len (line 895) | def rlmb_ppo_epoch_len(rhp): function rlmb_num_frames (line 902) | def rlmb_num_frames(rhp): function rlmb_ppo_optimization_batch_size (line 910) | def rlmb_ppo_optimization_batch_size(rhp): function rlmb_logits_clip (line 917) | def rlmb_logits_clip(rhp): function rlmb_games_problematic_for_ppo (line 924) | def rlmb_games_problematic_for_ppo(rhp): function rlmf_proportional_epoch_length (line 935) | def rlmf_proportional_epoch_length(rhp): function merge_unscoped_hparams (line 940) | def merge_unscoped_hparams(scopes_and_hparams): function split_scoped_hparams (line 951) | def split_scoped_hparams(scopes, merged_hparams): function training_loop_hparams_from_scoped_overrides (line 965) | def training_loop_hparams_from_scoped_overrides(scoped_overrides, trial_... function dynamic_register_hparams (line 1011) | def dynamic_register_hparams(name, hparams): function create_loop_hparams (line 1020) | def create_loop_hparams(): FILE: tensor2tensor/rl/trainer_model_based_recurrent_test.py class ModelRLExperimentRecurrentTest (line 28) | class ModelRLExperimentRecurrentTest(tf.test.TestCase): method test_basic_recurrent (line 30) | def test_basic_recurrent(self): FILE: tensor2tensor/rl/trainer_model_based_stochastic_test.py class ModelRLExperimentStochasticTest (line 28) | class ModelRLExperimentStochasticTest(tf.test.TestCase): method test_basic_stochastic (line 30) | def test_basic_stochastic(self): FILE: tensor2tensor/rl/trainer_model_based_sv2p_test.py class ModelRLExperimentSv2pTest (line 28) | class ModelRLExperimentSv2pTest(tf.test.TestCase): method test_sv2p (line 30) | def test_sv2p(self): FILE: tensor2tensor/rl/trainer_model_based_test.py class ModelRLExperimentTest (line 28) | class ModelRLExperimentTest(tf.test.TestCase): method _test_hparams_skip_evaluation (line 30) | def _test_hparams_skip_evaluation(self, hparams_set): method test_basic (line 36) | def test_basic(self): FILE: tensor2tensor/rl/trainer_model_free.py function initialize_env_specs (line 68) | def initialize_env_specs(hparams, env_problem_name): function train (line 85) | def train(hparams, output_dir, env_problem_name, report_fn=None): function main (line 159) | def main(_): FILE: tensor2tensor/rl/trainer_model_free_test.py class TrainTest (line 29) | class TrainTest(tf.test.TestCase): method _test_hparams_set (line 31) | def _test_hparams_set(self, hparams_set): method test_train_pong (line 37) | def test_train_pong(self): method test_train_pong_dqn (line 40) | def test_train_pong_dqn(self): FILE: tensor2tensor/rl/trainer_model_free_tictactoe_test.py class TrainerModelFreeTicTacToeTest (line 30) | class TrainerModelFreeTicTacToeTest(tf.test.TestCase): method test_train_tictactoe (line 32) | def test_train_tictactoe(self): FILE: tensor2tensor/serving/export.py function _get_hparams_path (line 53) | def _get_hparams_path(): function create_estimator (line 80) | def create_estimator(run_config, hparams): function create_hparams (line 91) | def create_hparams(): function export_module_spec_with_checkpoint (line 102) | def export_module_spec_with_checkpoint(module_spec, function export_as_tfhub_module (line 125) | def export_as_tfhub_module(model_name, function main (line 179) | def main(_): FILE: tensor2tensor/serving/query.py function validate_flags (line 53) | def validate_flags(): function make_request_fn (line 63) | def make_request_fn(): function main (line 79) | def main(_): FILE: tensor2tensor/serving/serving_utils.py function _make_example (line 39) | def _make_example(input_ids, problem, input_feature_name="inputs"): function _create_stub (line 87) | def _create_stub(server): function _encode (line 92) | def _encode(inputs, encoder, add_eos=True): function _decode (line 99) | def _decode(output_ids, output_decoder): function make_grpc_request_fn (line 108) | def make_grpc_request_fn(servable_name, server, timeout_secs): function make_cloud_mlengine_request_fn (line 131) | def make_cloud_mlengine_request_fn(credentials, model_name, version): function predict (line 156) | def predict(inputs_list, problem, request_fn): FILE: tensor2tensor/test_data/example_usr_dir/my_submodule.py function my_very_own_hparams (line 30) | def my_very_own_hparams(): class PoetryLines (line 41) | class PoetryLines(text_problems.Text2TextProblem): method approx_vocab_size (line 45) | def approx_vocab_size(self): method is_generate_per_split (line 49) | def is_generate_per_split(self): method dataset_splits (line 54) | def dataset_splits(self): method generate_samples (line 65) | def generate_samples(self, data_dir, tmp_dir, dataset_split): FILE: tensor2tensor/utils/adafactor.py class AdafactorOptimizer (line 27) | class AdafactorOptimizer(tf.train.Optimizer): method __init__ (line 106) | def __init__(self, method _should_use_factored_second_moment_estimate (line 162) | def _should_use_factored_second_moment_estimate(self, shape): method _create_slots (line 174) | def _create_slots(self, var_list): method _apply_dense (line 188) | def _apply_dense(self, grad, var): method _apply_sparse (line 191) | def _apply_sparse(self, grad, var): method _resource_apply_sparse (line 194) | def _resource_apply_sparse(self, grad, handle, indices): method _parameter_scale (line 199) | def _parameter_scale(self, var): method _resource_apply_dense (line 215) | def _resource_apply_dense(self, grad, handle): method _decay_rate_default (line 282) | def _decay_rate_default(self): method _learning_rate_default (line 285) | def _learning_rate_default(self, multiply_by_parameter_scale): function adafactor_decay_rate_adam (line 292) | def adafactor_decay_rate_adam(beta2): function adafactor_decay_rate_pow (line 306) | def adafactor_decay_rate_pow(exponent): function step_num (line 317) | def step_num(): function adafactor_optimizer_from_hparams (line 321) | def adafactor_optimizer_from_hparams(hparams, lr): function reduce_rms (line 359) | def reduce_rms(x): FILE: tensor2tensor/utils/adafactor_test.py class AdafactorTest (line 27) | class AdafactorTest(tf.test.TestCase): method testCallableLearningRate (line 29) | def testCallableLearningRate(self): FILE: tensor2tensor/utils/adv_attack_utils.py function fgsm (line 30) | def fgsm(): function madry (line 35) | def madry(): function random (line 40) | def random(): class T2TAttackModel (line 44) | class T2TAttackModel(model.Model): method __init__ (line 47) | def __init__(self, model_fn, features, params, config, scope=None): method fprop (line 55) | def fprop(self, x): class RandomAttack (line 79) | class RandomAttack(attacks.FastGradientMethod): method __init__ (line 82) | def __init__(self, m, back='tf', sess=None): method generate (line 98) | def generate(self, x, **kwargs): method parse_params (line 186) | def parse_params( FILE: tensor2tensor/utils/avg_checkpoints.py function checkpoint_exists (line 41) | def checkpoint_exists(path): function main (line 46) | def main(_): FILE: tensor2tensor/utils/beam_search.py function _merge_beam_dim (line 37) | def _merge_beam_dim(tensor): function _unmerge_beam_dim (line 52) | def _unmerge_beam_dim(tensor, batch_size, beam_size): function _expand_to_beam_size (line 68) | def _expand_to_beam_size(tensor, beam_size): function get_state_shape_invariants (line 85) | def get_state_shape_invariants(tensor): function compute_batch_indices (line 93) | def compute_batch_indices(batch_size, beam_size): function fast_tpu_gather (line 111) | def fast_tpu_gather(params, indices, name=None): function _create_make_unique (line 168) | def _create_make_unique(inputs): function _create_topk_unique (line 232) | def _create_topk_unique(inputs, k): function top_k_with_unique (line 273) | def top_k_with_unique(inputs, k): function compute_topk_scores_and_seq (line 298) | def compute_topk_scores_and_seq(sequences, function beam_search (line 396) | def beam_search(symbols_to_logits_fn, FILE: tensor2tensor/utils/beam_search_test.py class BeamSearchTest (line 27) | class BeamSearchTest(tf.test.TestCase): method testShapes (line 29) | def testShapes(self): method testComputeTopkScoresAndSeq (line 49) | def testComputeTopkScoresAndSeq(self): method testGreedyBatchOne (line 78) | def testGreedyBatchOne(self): method testNotGreedyBeamTwoWithStopEarly (line 132) | def testNotGreedyBeamTwoWithStopEarly(self): method testNotGreedyBeamTwoWithoutStopEarly (line 169) | def testNotGreedyBeamTwoWithoutStopEarly(self): method testGreedyWithCornerCase (line 203) | def testGreedyWithCornerCase(self): method testNotGreedyBatchTwoBeamTwoWithAlpha (line 232) | def testNotGreedyBatchTwoBeamTwoWithAlpha(self): method testNotGreedyBeamTwoWithAlpha (line 279) | def testNotGreedyBeamTwoWithAlpha(self): method testStates (line 318) | def testStates(self): method testStatesAfterLoop (line 363) | def testStatesAfterLoop(self): method testStateBeamTwo (line 398) | def testStateBeamTwo(self): method testTPUBeam (line 448) | def testTPUBeam(self): FILE: tensor2tensor/utils/bleu_hook.py function _get_ngrams (line 40) | def _get_ngrams(segment, max_order): function compute_bleu (line 60) | def compute_bleu(reference_corpus, function bleu_score (line 132) | def bleu_score(predictions, labels, **unused_kwargs): class UnicodeRegex (line 155) | class UnicodeRegex(object): method __init__ (line 158) | def __init__(self): method property_chars (line 164) | def property_chars(self, prefix): function bleu_tokenize (line 172) | def bleu_tokenize(string): function bleu_wrapper (line 202) | def bleu_wrapper(ref_filename, hyp_filename, case_sensitive=False): function _try_twice_tf_glob (line 221) | def _try_twice_tf_glob(pattern): function _read_stepfiles_list (line 248) | def _read_stepfiles_list(path_prefix, path_suffix=".index", min_steps=0): function stepfiles_iterator (line 267) | def stepfiles_iterator(path_prefix, wait_minutes=0, min_steps=0, FILE: tensor2tensor/utils/bleu_hook_test.py class BleuHookTest (line 33) | class BleuHookTest(tf.test.TestCase): method testComputeBleuEqual (line 35) | def testComputeBleuEqual(self): method testComputeNotEqual (line 42) | def testComputeNotEqual(self): method testComputeMultipleBatch (line 50) | def testComputeMultipleBatch(self): method testComputeMultipleNgrams (line 57) | def testComputeMultipleNgrams(self): method testBleuTokenize (line 64) | def testBleuTokenize(self): method _generate_test_data (line 68) | def _generate_test_data(self, name, hyps, refs): method testBleuWrapper (line 90) | def testBleuWrapper(self): method testBleuWrapperWithUnicodeLineSeparator (line 97) | def testBleuWrapperWithUnicodeLineSeparator(self): FILE: tensor2tensor/utils/checkpoint_compatibility_test.py function get_data_dir (line 44) | def get_data_dir(): class CheckpointCompatibilityTest (line 55) | class CheckpointCompatibilityTest(tf.test.TestCase): method testCompatibility (line 58) | def testCompatibility(self): method input_fn (line 71) | def input_fn(self): method input_generator (line 81) | def input_generator(self): FILE: tensor2tensor/utils/cloud_mlengine.py function shell_output (line 44) | def shell_output(cmd_, **kwargs): function shell_run (line 48) | def shell_run(cmd_, **kwargs): function format_cmd (line 52) | def format_cmd(cmd_, **kwargs): function default_region (line 56) | def default_region(): function default_project (line 60) | def default_project(): function get_setup_file (line 64) | def get_setup_file(name, packages=None): function job_dir (line 79) | def job_dir(): function get_requirements (line 84) | def get_requirements(usr_dir): function flags_as_args (line 93) | def flags_as_args(): function get_default_master_type (line 116) | def get_default_master_type(num_gpus=1): function configure_job (line 130) | def configure_job(): function launch_job (line 173) | def launch_job(job_spec): function _tar_and_copy (line 184) | def _tar_and_copy(src_dir, target_dir): function tar_and_copy_t2t (line 205) | def tar_and_copy_t2t(train_dir): function tar_and_copy_usr_dir (line 245) | def tar_and_copy_usr_dir(usr_dir, train_dir): function autotune_paramspecs (line 266) | def autotune_paramspecs(hparams_range): function configure_autotune (line 272) | def configure_autotune(hparams_range, function configure_trainer_package (line 286) | def configure_trainer_package(job_spec, t2t_tar): function configure_usr_dir (line 291) | def configure_usr_dir(job_spec, usr_tar): function validate_flags (line 298) | def validate_flags(): function confirm (line 329) | def confirm(): function launch (line 334) | def launch(): FILE: tensor2tensor/utils/compute_video_metrics.py function main (line 33) | def main(_): FILE: tensor2tensor/utils/contrib.py function err_if_tf2 (line 42) | def err_if_tf2(msg='err'): class DummyModule (line 52) | class DummyModule(object): method __init__ (line 54) | def __init__(self, **kw): function slim (line 59) | def slim(): function util (line 63) | def util(): function tfe (line 69) | def tfe(): function deprecated (line 75) | def deprecated(reason, date): function framework (line 83) | def framework(msg='err'): function nn (line 99) | def nn(): function layers (line 105) | def layers(): function rnn (line 115) | def rnn(): function seq2seq (line 121) | def seq2seq(): function tpu (line 127) | def tpu(): function training (line 133) | def training(): function summary (line 139) | def summary(): function metrics (line 145) | def metrics(): function opt (line 151) | def opt(): function mixed_precision (line 161) | def mixed_precision(): function cluster_resolver (line 167) | def cluster_resolver(): function distribute (line 173) | def distribute(): function replace_monitors_with_hooks (line 179) | def replace_monitors_with_hooks(monitors_or_hooks, estimator): function learn (line 194) | def learn(): function tf_prof (line 206) | def tf_prof(): function eager (line 212) | def eager(): function image (line 218) | def image(): FILE: tensor2tensor/utils/data_reader.py function cast_ints_to_int32 (line 35) | def cast_ints_to_int32(features): function example_length (line 44) | def example_length(example): function example_valid_size (line 56) | def example_valid_size(example, min_length, max_length): function padded_batch (line 64) | def padded_batch(dataset, batch_size, padded_shapes=None): function _bucket_boundaries (line 71) | def _bucket_boundaries(max_length, min_length=8, length_bucket_step=1.1): function batching_scheme (line 82) | def batching_scheme(batch_size, function hparams_to_batching_scheme (line 169) | def hparams_to_batching_scheme(hparams, class DummyQueueRunner (line 185) | class DummyQueueRunner(object): method __init__ (line 188) | def __init__(self): method create_threads (line 191) | def create_threads(self, sess, coord=None, daemon=False, start=False): function pad_for_tpu (line 196) | def pad_for_tpu(shapes_dict, hparams, max_length): function cpu_count (line 223) | def cpu_count(): function _summarize_features (line 229) | def _summarize_features(features, num_shards=1): function standardize_shapes (line 242) | def standardize_shapes(features, batch_size=None): function _are_shapes_fully_defined (line 264) | def _are_shapes_fully_defined(shapes_dict): function _file_num_records_cached (line 271) | def _file_num_records_cached(filename): function skip_random_fraction (line 286) | def skip_random_fraction(dataset, data_file): function pad_batch (line 294) | def pad_batch(features, batch_multiple): function input_fn (line 314) | def input_fn(dataset, FILE: tensor2tensor/utils/data_reader_test.py class TestProblem (line 38) | class TestProblem(problem_mod.Problem): method generator (line 40) | def generator(self, data_dir, tmp_dir, is_training): method generate_data (line 45) | def generate_data(self, data_dir, tmp_dir, task_id=-1): method hparams (line 53) | def hparams(self, defaults, model_hparams): method example_reading_spec (line 60) | def example_reading_spec(self): method preprocess_example (line 69) | def preprocess_example(self, example, unused_mode, unused_hparams): function generate_test_data (line 74) | def generate_test_data(problem, tmp_dir): class DataReaderTest (line 79) | class DataReaderTest(tf.test.TestCase): method setUpClass (line 82) | def setUpClass(cls): method tearDownClass (line 89) | def tearDownClass(cls): method testBasicExampleReading (line 96) | def testBasicExampleReading(self): method testPreprocess (line 115) | def testPreprocess(self): method testLengthFilter (line 126) | def testLengthFilter(self): method testBatchingSchemeMaxLength (line 142) | def testBatchingSchemeMaxLength(self): method testBatchingSchemeBuckets (line 175) | def testBatchingSchemeBuckets(self): FILE: tensor2tensor/utils/decoding.py function decode_hparams (line 49) | def decode_hparams(overrides=""): function log_decode_results (line 108) | def log_decode_results(inputs, function decode_from_dataset (line 177) | def decode_from_dataset(estimator, function decode_once (line 249) | def decode_once(estimator, function decode_from_file (line 398) | def decode_from_file(estimator, function _add_shard_to_filename (line 566) | def _add_shard_to_filename(filename, decode_hp): function _decode_filename (line 577) | def _decode_filename(base_filename, problem_name, decode_hp): function make_input_fn_from_generator (line 605) | def make_input_fn_from_generator(gen): function decode_interactively (line 629) | def decode_interactively(estimator, hparams, decode_hp, checkpoint_path=... function _decode_batch_input_fn (line 673) | def _decode_batch_input_fn(num_decode_batches, sorted_inputs, vocabulary, function _interactive_input_fn (line 704) | def _interactive_input_fn(hparams, decode_hp): function save_video (line 786) | def save_video(video, save_path_template): function show_and_save_image (line 802) | def show_and_save_image(img, save_path): function _get_language_modeling_inputs (line 816) | def _get_language_modeling_inputs(filename, function _get_sorted_inputs (line 847) | def _get_sorted_inputs(filename, delimiter="\n"): function _save_until_eos (line 883) | def _save_until_eos(ids, skip=False): function _interactive_input_tensor_to_features_dict (line 896) | def _interactive_input_tensor_to_features_dict(feature_map, hparams): function _decode_input_tensor_to_features_dict (line 944) | def _decode_input_tensor_to_features_dict(feature_map, hparams, decode_hp): function get_step_from_ckpt_path (line 983) | def get_step_from_ckpt_path(path): function latest_checkpoint_step (line 987) | def latest_checkpoint_step(ckpt_dir): class DecodeHookArgs (line 995) | class DecodeHookArgs(collections.namedtuple( function run_postdecode_hooks (line 1002) | def run_postdecode_hooks(decode_hook_args, dataset_split): FILE: tensor2tensor/utils/devices.py function data_parallelism_from_flags (line 26) | def data_parallelism_from_flags(daisy_chain_variables=True, all_workers=... function data_parallelism (line 62) | def data_parallelism(daisy_chain_variables=True, FILE: tensor2tensor/utils/diet.py function diet_adam_optimizer_params (line 34) | def diet_adam_optimizer_params(): function diet_expert (line 54) | def diet_expert(x, hidden_size, params): class DietVariableOptimizer (line 80) | class DietVariableOptimizer(object): method __init__ (line 83) | def __init__(self, params): method params (line 88) | def params(self): method global_step (line 92) | def global_step(self): method create_slots (line 95) | def create_slots(self, var): method update_variable (line 98) | def update_variable(self, var, grad_var): class DietAdamOptimizer (line 102) | class DietAdamOptimizer(DietVariableOptimizer): method create_slots (line 144) | def create_slots(self, var): method update_variable (line 177) | def update_variable(self, var, grad_var): function _create_diet_optimizer (line 228) | def _create_diet_optimizer(params): function _quantize (line 235) | def _quantize(x, params, randomize=True): function _dequantize (line 253) | def _dequantize(q, params): function make_diet_var_getter (line 260) | def make_diet_var_getter(params): function _fn_with_diet_vars (line 296) | def _fn_with_diet_vars(fn, args, params): function fn_with_diet_vars (line 352) | def fn_with_diet_vars(params): FILE: tensor2tensor/utils/diet_test.py class DietVarTest (line 26) | class DietVarTest(tf.test.TestCase): method testDiet (line 28) | def testDiet(self): FILE: tensor2tensor/utils/expert_utils.py function add_scope (line 40) | def add_scope(scope=None, scope_fn=None): function add_var_scope (line 67) | def add_var_scope(scope=None): function add_name_scope (line 71) | def add_name_scope(scope=None): function _add_variable_proxy_methods (line 75) | def _add_variable_proxy_methods(var, proxy_tensor): class Parallelism (line 90) | class Parallelism(object): method __init__ (line 108) | def __init__(self, method __call__ (line 138) | def __call__(self, fn, *args, **kwargs): method n (line 240) | def n(self): method devices (line 244) | def devices(self): method ps_devices (line 248) | def ps_devices(self): method _maybe_repeat (line 251) | def _maybe_repeat(self, x): function _rowwise_unsorted_segment_sum (line 267) | def _rowwise_unsorted_segment_sum(values, indices, n): function _normal_distribution_cdf (line 284) | def _normal_distribution_cdf(x, stddev): function _prob_in_top_k (line 303) | def _prob_in_top_k( function cv_squared (line 351) | def cv_squared(x): function _gates_to_load (line 371) | def _gates_to_load(gates): function update_hparams_for_vq_gating (line 384) | def update_hparams_for_vq_gating(hparams): function _my_top_k (line 405) | def _my_top_k(x, k): function vq_gating (line 437) | def vq_gating(x, function noisy_top_k_gating (line 514) | def noisy_top_k_gating(x, class PadRemover (line 582) | class PadRemover(object): method __init__ (line 604) | def __init__(self, pad_mask): method remove (line 624) | def remove(self, x): method restore (line 645) | def restore(self, x): function map_ids (line 665) | def map_ids(x, indices, map_fn): class SparseDispatcher (line 733) | class SparseDispatcher(object): method __init__ (line 773) | def __init__(self, num_experts, gates): method dispatch (line 794) | def dispatch(self, inp): method combine (line 810) | def combine(self, expert_out, multiply_by_gates=True): method expert_to_gates (line 835) | def expert_to_gates(self): method expert_to_batch_indices (line 845) | def expert_to_batch_indices(self): method part_sizes (line 856) | def part_sizes(self): class DistributedSparseDispatcher (line 860) | class DistributedSparseDispatcher(object): method __init__ (line 872) | def __init__(self, data_parallelism, expert_parallelism, gates): method dispatch (line 890) | def dispatch(self, inp): method combine (line 907) | def combine(self, expert_out, multiply_by_gates=True): method expert_to_gates (line 932) | def expert_to_gates(self): function transpose_list_of_lists (line 944) | def transpose_list_of_lists(lol): function ffn_expert_fn (line 956) | def ffn_expert_fn(input_size, function flatten_all_but_last (line 986) | def flatten_all_but_last(a): function local_moe (line 994) | def local_moe(x, class TruncatingDispatcher (line 1077) | class TruncatingDispatcher(object): method __init__ (line 1101) | def __init__(self, requests, expert_capacity): method dispatch (line 1158) | def dispatch(self, inp): method combine (line 1172) | def combine(self, x): method nonpadding (line 1190) | def nonpadding(self): method gates (line 1198) | def gates(self): method length_coordinate (line 1207) | def length_coordinate(self): function local_moe_tpu (line 1217) | def local_moe_tpu(inputs, function reduce_by_device (line 1414) | def reduce_by_device(parallelism, data, reduce_fn): function expand_by_device (line 1446) | def expand_by_device(original_parallelism, device_parallelism, data): function all_reduce_ring (line 1463) | def all_reduce_ring(x, parallelism, maybe_reduce=True, use_bfloat16=True): FILE: tensor2tensor/utils/expert_utils_test.py class ExpertUtilsTest (line 26) | class ExpertUtilsTest(tf.test.TestCase): method _verify_value (line 28) | def _verify_value(self, sess, tensor, expected): method testPadRemover (line 32) | def testPadRemover(self): method testTruncatingDispatcher (line 139) | def testTruncatingDispatcher(self): FILE: tensor2tensor/utils/get_rouge.py function write_to_file (line 37) | def write_to_file(filename, data): function prep_data (line 43) | def prep_data(decode_dir, target_dir): function main (line 53) | def main(_): FILE: tensor2tensor/utils/hparam.py function _parse_fail (line 42) | def _parse_fail(name, var_type, value, values): function _reuse_fail (line 49) | def _reuse_fail(name, values): function _process_scalar_value (line 55) | def _process_scalar_value(name, parse_fn, var_type, m_dict, values, function _process_list_value (line 104) | def _process_list_value(name, parse_fn, var_type, m_dict, values, function _cast_to_type_if_compatible (line 138) | def _cast_to_type_if_compatible(name, param_type, value): function parse_values (line 186) | def parse_values(values, type_map, ignore_unknown=False): class HParams (line 301) | class HParams(object): method __init__ (line 371) | def __init__(self, model_structure=None, **kwargs): method add_hparam (line 418) | def add_hparam(self, name, value): method set_hparam (line 443) | def set_hparam(self, name, value): method del_hparam (line 470) | def del_hparam(self, name): method parse (line 482) | def parse(self, values): method override_from_dict (line 506) | def override_from_dict(self, values_dict): method set_model_structure (line 523) | def set_model_structure(self, model_structure): method get_model_structure (line 526) | def get_model_structure(self): method to_json (line 529) | def to_json(self, indent=None, separators=None, sort_keys=False): method parse_json (line 558) | def parse_json(self, values_json): method values (line 574) | def values(self): method get (line 583) | def get(self, key, default=None): method __contains__ (line 610) | def __contains__(self, key): method __str__ (line 613) | def __str__(self): method __repr__ (line 616) | def __repr__(self): method _get_kind_name (line 620) | def _get_kind_name(param_type, is_list): FILE: tensor2tensor/utils/hparam_test.py class HParamsTest (line 27) | class HParamsTest(tf.test.TestCase): method testEmpty (line 29) | def testEmpty(self): method testContains (line 37) | def testContains(self): method testSomeValues (line 42) | def testSomeValues(self): method testWithPeriodInVariableName (line 114) | def testWithPeriodInVariableName(self): method testSetFromMap (line 129) | def testSetFromMap(self): method testFunction (line 139) | def testFunction(self): method testBoolParsing (line 148) | def testBoolParsing(self): method testBoolParsingFail (line 155) | def testBoolParsingFail(self): method testLists (line 160) | def testLists(self): method testParseValuesWithIndexAssigment1 (line 196) | def testParseValuesWithIndexAssigment1(self): method testParseValuesWithIndexAssigment1_IgnoreUnknown (line 203) | def testParseValuesWithIndexAssigment1_IgnoreUnknown(self): method testParseValuesWithIndexAssigment2 (line 211) | def testParseValuesWithIndexAssigment2(self): method testParseValuesWithIndexAssigment2_IgnoreUnknown (line 218) | def testParseValuesWithIndexAssigment2_IgnoreUnknown(self): method testParseValuesWithIndexAssigment3 (line 226) | def testParseValuesWithIndexAssigment3(self): method testParseValuesWithIndexAssigment3_IgnoreUnknown (line 237) | def testParseValuesWithIndexAssigment3_IgnoreUnknown(self): method testParseValuesWithIndexAssigment4 (line 248) | def testParseValuesWithIndexAssigment4(self): method testParseValuesWithIndexAssigment4_IgnoreUnknown (line 260) | def testParseValuesWithIndexAssigment4_IgnoreUnknown(self): method testParseValuesWithIndexAssigment5 (line 271) | def testParseValuesWithIndexAssigment5(self): method testParseValuesWithIndexAssigment5_IgnoreUnknown (line 289) | def testParseValuesWithIndexAssigment5_IgnoreUnknown(self): method testParseValuesWithBadIndexAssigment1 (line 305) | def testParseValuesWithBadIndexAssigment1(self): method testParseValuesWithBadIndexAssigment1_IgnoreUnknown (line 311) | def testParseValuesWithBadIndexAssigment1_IgnoreUnknown(self): method testParseValuesWithBadIndexAssigment2 (line 318) | def testParseValuesWithBadIndexAssigment2(self): method testParseValuesWithBadIndexAssigment2_IgnoreUnknown (line 324) | def testParseValuesWithBadIndexAssigment2_IgnoreUnknown(self): method testParseValuesWithBadIndexAssigment3 (line 328) | def testParseValuesWithBadIndexAssigment3(self): method testParseValuesWithBadIndexAssigment3_IgnoreUnknown (line 334) | def testParseValuesWithBadIndexAssigment3_IgnoreUnknown(self): method testWithReusedVariables (line 338) | def testWithReusedVariables(self): method testJson (line 355) | def testJson(self): method testSetHParam (line 395) | def testSetHParam(self): method testSetHParamListNonListMismatch (line 421) | def testSetHParamListNonListMismatch(self): method testSetHParamTypeMismatch (line 428) | def testSetHParamTypeMismatch(self): method testGet (line 457) | def testGet(self): method testDel (line 500) | def testDel(self): FILE: tensor2tensor/utils/hparams_lib.py function copy_hparams (line 31) | def copy_hparams(hparams): function create_hparams (line 42) | def create_hparams(hparams_set, function create_hparams_from_json (line 62) | def create_hparams_from_json(json_path, hparams=None): function add_problem_hparams (line 94) | def add_problem_hparams(hparams, problem_name_or_instance): FILE: tensor2tensor/utils/hparams_lib_test.py class HparamsLibTest (line 29) | class HparamsLibTest(tf.test.TestCase): method testCreateHparamsFromJson (line 31) | def testCreateHparamsFromJson(self): FILE: tensor2tensor/utils/learning_rate.py function learning_rate_factor (line 26) | def learning_rate_factor(name, step_num, hparams): function learning_rate_schedule (line 85) | def learning_rate_schedule(hparams): function legacy_learning_rate_schedule (line 101) | def legacy_learning_rate_schedule(hparams): function _global_step (line 118) | def _global_step(hparams): function _legacy_sqrt_decay (line 130) | def _legacy_sqrt_decay(step): function _piecewise_learning_rate (line 135) | def _piecewise_learning_rate(step, boundaries, values): function _learning_rate_decay (line 154) | def _learning_rate_decay(hparams, warmup_steps=0): function _learning_rate_warmup (line 199) | def _learning_rate_warmup(warmup_steps, warmup_schedule="exp", hparams=N... FILE: tensor2tensor/utils/metrics.py class Metrics (line 35) | class Metrics(object): function image_rmse (line 73) | def image_rmse(predictions, labels, weights_fn=common_layers.weights_all): function padded_rmse (line 82) | def padded_rmse(predictions, labels, weights_fn=common_layers.weights_all): function unpadded_mse (line 92) | def unpadded_mse(predictions, labels, weights_fn=common_layers.weights_a... function abs_error (line 101) | def abs_error(predictions, labels, weights_fn=None): function padded_log_poisson (line 110) | def padded_log_poisson(predictions, function padded_variance_explained (line 122) | def padded_variance_explained(predictions, function padded_accuracy_topk (line 137) | def padded_accuracy_topk(predictions, function padded_accuracy_top5 (line 158) | def padded_accuracy_top5(predictions, function rounding_sequence_accuracy (line 164) | def rounding_sequence_accuracy(predictions, function two_class_accuracy (line 177) | def two_class_accuracy(predictions, labels, weights_fn=None): function two_class_log_likelihood (line 188) | def two_class_log_likelihood(predictions, labels, weights_fn=None): function padded_sequence_accuracy (line 212) | def padded_sequence_accuracy(predictions, function prefix_accuracy (line 248) | def prefix_accuracy(predictions, function sequence_edit_distance (line 283) | def sequence_edit_distance(predictions, function padded_neg_log_perplexity (line 327) | def padded_neg_log_perplexity(predictions, function padded_neg_log_perplexity_with_masking (line 336) | def padded_neg_log_perplexity_with_masking( function dmol_neg_log_perplexity (line 359) | def dmol_neg_log_perplexity(predictions, function rounding_accuracy (line 369) | def rounding_accuracy(predictions, function padded_accuracy (line 380) | def padded_accuracy(predictions, function multilabel_accuracy_matchk (line 396) | def multilabel_accuracy_matchk(predictions, function multilabel_accuracy_match3 (line 429) | def multilabel_accuracy_match3(predictions, labels, function set_precision (line 434) | def set_precision(predictions, labels, function set_recall (line 457) | def set_recall(predictions, labels, weights_fn=common_layers.weights_non... function image_summary (line 479) | def image_summary(predictions, targets, hparams): function softmax_cross_entropy_one_hot (line 500) | def softmax_cross_entropy_one_hot(logits, labels, weights_fn=None): function sigmoid_accuracy_one_hot (line 518) | def sigmoid_accuracy_one_hot(logits, labels, weights_fn=None): function sigmoid_accuracy (line 537) | def sigmoid_accuracy(logits, labels, weights_fn=None): function sigmoid_precision_one_hot (line 555) | def sigmoid_precision_one_hot(logits, labels, weights_fn=None): function sigmoid_recall_one_hot (line 578) | def sigmoid_recall_one_hot(logits, labels, weights_fn=None): function sigmoid_cross_entropy_one_hot (line 601) | def sigmoid_cross_entropy_one_hot(logits, labels, weights_fn=None): function roc_auc (line 619) | def roc_auc(logits, labels, weights_fn=None): function create_evaluation_metrics (line 638) | def create_evaluation_metrics(problems, model_hparams): function create_eager_metrics_for_problem (line 742) | def create_eager_metrics_for_problem(problem, model_hparams): function create_eager_metrics (line 753) | def create_eager_metrics(metric_names, weights_fn=common_layers.weights_... function create_eager_metrics_internal (line 771) | def create_eager_metrics_internal(metric_fns, function word_error_rate (line 808) | def word_error_rate(raw_predictions, function pearson_correlation_coefficient (line 868) | def pearson_correlation_coefficient(predictions, labels, weights_fn=None): FILE: tensor2tensor/utils/metrics_hook.py class MetricsBasedHook (line 28) | class MetricsBasedHook(tf.train.SessionRunHook): method __init__ (line 40) | def __init__(self, events_dir, subdirs=None, tags=None, every_n_steps=... method _init_multiplexer (line 59) | def _init_multiplexer(self): method begin (line 64) | def begin(self): method after_create_session (line 69) | def after_create_session(self, session, coord): method before_run (line 74) | def before_run(self, run_context): method after_run (line 78) | def after_run(self, run_context, run_values): method _after_run (line 85) | def _after_run(self, run_context, run_values, global_step, metrics): method _collect_metrics (line 90) | def _collect_metrics(self): method _process_metrics (line 105) | def _process_metrics(self, global_step, metrics): class EarlyStoppingHook (line 123) | class EarlyStoppingHook(MetricsBasedHook): method __init__ (line 126) | def __init__(self, method _process_metrics (line 157) | def _process_metrics(self, global_step, metrics): class PlateauOpHook (line 174) | class PlateauOpHook(MetricsBasedHook): method __init__ (line 177) | def __init__(self, method keep_alive (line 199) | def keep_alive(self): method before_run (line 204) | def before_run(self, run_context): method _after_run (line 215) | def _after_run(self, run_context, run_values, global_step, metrics): function has_metric_plateaued (line 249) | def has_metric_plateaued(steps, values, num_steps=100, delta=0.1, FILE: tensor2tensor/utils/metrics_hook_test.py class DummyHook (line 30) | class DummyHook(metrics_hook.MetricsBasedHook): method _process_metrics (line 32) | def _process_metrics(self, global_step, metrics): class MetricsHookTest (line 43) | class MetricsHookTest(tf.test.TestCase): method setUpClass (line 46) | def setUpClass(cls): method ckpt_dir (line 50) | def ckpt_dir(self, name): method sess (line 54) | def sess(self, hook, ckpt_dir): method flush (line 63) | def flush(self): method testStop (line 66) | def testStop(self): method testEarlyStoppingHook (line 99) | def testEarlyStoppingHook(self): method testPlateauOpHook (line 143) | def testPlateauOpHook(self): FILE: tensor2tensor/utils/metrics_test.py class MetricsTest (line 27) | class MetricsTest(tf.test.TestCase): method testAccuracyMetric (line 29) | def testAccuracyMetric(self): method testAccuracyTopKMetric (line 42) | def testAccuracyTopKMetric(self): method testPrefixAccuracy (line 59) | def testPrefixAccuracy(self): method testSequenceAccuracyMetric (line 79) | def testSequenceAccuracyMetric(self): method testTwoClassAccuracyMetric (line 93) | def testTwoClassAccuracyMetric(self): method testTwoClassLogLikelihood (line 104) | def testTwoClassLogLikelihood(self): method testTwoClassLogLikelihoodVersusOldImplementation (line 114) | def testTwoClassLogLikelihoodVersusOldImplementation(self): method testRMSEMetric (line 137) | def testRMSEMetric(self): method testUnpaddedRMSEMetric (line 149) | def testUnpaddedRMSEMetric(self): method testSequenceEditDistanceMetric (line 161) | def testSequenceEditDistanceMetric(self): method testWordErrorRateMetric (line 184) | def testWordErrorRateMetric(self): method testNegativeLogPerplexity (line 220) | def testNegativeLogPerplexity(self): method testNegativeLogPerplexityMasked (line 232) | def testNegativeLogPerplexityMasked(self): method testNegativeLogPerplexityMaskedAssert (line 248) | def testNegativeLogPerplexityMaskedAssert(self): method testSigmoidAccuracyOneHot (line 265) | def testSigmoidAccuracyOneHot(self): method testSigmoidAccuracy (line 288) | def testSigmoidAccuracy(self): method testSigmoidPrecisionOneHot (line 304) | def testSigmoidPrecisionOneHot(self): method testSigmoidRecallOneHot (line 327) | def testSigmoidRecallOneHot(self): method testSigmoidCrossEntropyOneHot (line 350) | def testSigmoidCrossEntropyOneHot(self): method testRocAuc (line 373) | def testRocAuc(self): method testMultilabelMatch3 (line 396) | def testMultilabelMatch3(self): method testPearsonCorrelationCoefficient (line 418) | def testPearsonCorrelationCoefficient(self): FILE: tensor2tensor/utils/misc_utils.py function camelcase_to_snakecase (line 30) | def camelcase_to_snakecase(name): function snakecase_to_camelcase (line 35) | def snakecase_to_camelcase(name): function pprint_hparams (line 39) | def pprint_hparams(hparams): FILE: tensor2tensor/utils/misc_utils_test.py class MiscUtilsTest (line 27) | class MiscUtilsTest(tf.test.TestCase): method test_camelcase_to_snakecase (line 29) | def test_camelcase_to_snakecase(self): method test_snakecase_to_camelcase (line 49) | def test_snakecase_to_camelcase(self): method test_pprint_hparams (line 59) | def test_pprint_hparams(self): FILE: tensor2tensor/utils/mlperf_log.py function get_mode (line 79) | def get_mode(hparams): function get_caller (line 84) | def get_caller(stack_index=2, root_dir=None): function _mlperf_print (line 101) | def _mlperf_print(key, value=None, benchmark=None, stack_offset=0, function transformer_print (line 169) | def transformer_print(key, value=None, stack_offset=2, deferred=False, FILE: tensor2tensor/utils/mtf_model.py class MtfModel (line 37) | class MtfModel(t2t_model.T2TModel): method estimator_model_fn (line 41) | def estimator_model_fn(cls, method estimator_spec_eval (line 189) | def estimator_spec_eval( method estimator_spec_predict (line 232) | def estimator_spec_predict(self, features, mesh, mesh_impl, use_tpu): method sample (line 262) | def sample(self, features, mesh): method mtf_model_fn (line 266) | def mtf_model_fn(self, features, mesh): FILE: tensor2tensor/utils/multistep_optimizer.py class MultistepAdamOptimizer (line 32) | class MultistepAdamOptimizer(tf.train.AdamOptimizer): method __init__ (line 35) | def __init__(self, learning_rate=0.001, beta1=0.9, beta2=0.999, epsilo... method _create_slots (line 43) | def _create_slots(self, var_list): method _get_iter_variable (line 53) | def _get_iter_variable(self): method _prepare (line 58) | def _prepare(self): method _apply_cond (line 62) | def _apply_cond(self, apply_fn, grad, var, *args, **kwargs): method _apply_dense (line 83) | def _apply_dense(self, grad, var): method _resource_apply_dense (line 87) | def _resource_apply_dense(self, grad, var): method _apply_sparse_shared (line 91) | def _apply_sparse_shared(self, grad, var, indices, scatter_add): method _apply_sparse (line 96) | def _apply_sparse(self, grad, var): method _resource_apply_sparse_duplicate_indices (line 103) | def _resource_apply_sparse_duplicate_indices(self, grad, var, indices): method _finish (line 116) | def _finish(self, update_ops, name_scope): FILE: tensor2tensor/utils/multistep_optimizer_test.py class MultistepAdamOptimizerTest (line 26) | class MultistepAdamOptimizerTest(tf.test.TestCase): method testMultistep (line 28) | def testMultistep(self): method testResourceVariables (line 96) | def testResourceVariables(self): FILE: tensor2tensor/utils/multistep_with_adamoptimizer.py class MultistepAdamOptimizer (line 49) | class MultistepAdamOptimizer(tf.train.Optimizer): method __init__ (line 52) | def __init__(self, method _get_beta_accumulators (line 74) | def _get_beta_accumulators(self): method _create_slots (line 83) | def _create_slots(self, var_list): method _get_iter_variable (line 102) | def _get_iter_variable(self): method _prepare (line 106) | def _prepare(self): method _apply_cond (line 117) | def _apply_cond(self, apply_fn, grad, var, *args, **kwargs): method _apply_dense (line 138) | def _apply_dense(self, grad, var): method _apply_dense_in_action (line 141) | def _apply_dense_in_action(self, grad, var): method _resource_apply_dense (line 158) | def _resource_apply_dense(self, grad, var): method _resource_apply_dense_in_action (line 161) | def _resource_apply_dense_in_action(self, grad, var): method _apply_sparse_shared (line 178) | def _apply_sparse_shared(self, grad, var, indices, scatter_add): method _apply_sparse (line 204) | def _apply_sparse(self, grad, var): method _resource_apply_sparse_duplicate_indices (line 210) | def _resource_apply_sparse_duplicate_indices(self, grad, var, indices): method _resource_scatter_add (line 222) | def _resource_scatter_add(self, x, i, v): method _resource_apply_sparse (line 227) | def _resource_apply_sparse(self, grad, var, indices): method _finish (line 231) | def _finish(self, update_ops, name_scope): FILE: tensor2tensor/utils/multistep_with_adamoptimizer_test.py class MultistepAdamOptimizerTest (line 40) | class MultistepAdamOptimizerTest(tf.test.TestCase): method testMultistep (line 42) | def testMultistep(self): method testResourceVariables (line 110) | def testResourceVariables(self): FILE: tensor2tensor/utils/optimize.py function _mixed_precision_is_enabled (line 37) | def _mixed_precision_is_enabled(hparams): function optimize (line 44) | def optimize(loss, function adam (line 114) | def adam(learning_rate, hparams): function multistep_adam (line 134) | def multistep_adam(learning_rate, hparams): function momentum (line 144) | def momentum(learning_rate, hparams): function yellow_fin (line 152) | def yellow_fin(learning_rate, hparams): function true_adam (line 159) | def true_adam(learning_rate, hparams): function adam_w (line 168) | def adam_w(learning_rate, hparams): function adafactor (line 178) | def adafactor(learning_rate, hparams): function _register_base_optimizer (line 184) | def _register_base_optimizer(name, opt): class ConditionalOptimizer (line 196) | class ConditionalOptimizer(tf.train.Optimizer): method __init__ (line 199) | def __init__(self, optimizer_name, lr, hparams, use_tpu=False): # pyl... method compute_gradients (line 240) | def compute_gradients(self, loss, var_list=None, **kwargs): # pylint:... method apply_gradients (line 256) | def apply_gradients(self, grads_and_vars, global_step=None, name=None): function weight_decay_and_noise (line 266) | def weight_decay_and_noise(loss, hparams, learning_rate, var_list=None): function weight_noise (line 287) | def weight_noise(noise_rate, learning_rate, var_list): function weight_decay (line 309) | def weight_decay(decay_rate, var_list, skip_biases=True): function log_variable_sizes (line 329) | def log_variable_sizes(var_list=None, tag=None, verbose=False): function summarize_variables (line 358) | def summarize_variables(var_list=None, tag=None): function get_variable_initializer (line 376) | def get_variable_initializer(hparams): FILE: tensor2tensor/utils/optimize_test.py class OptimizeTest (line 28) | class OptimizeTest(parameterized.TestCase, tf.test.TestCase): method test_names (line 42) | def test_names(self, opt_name): FILE: tensor2tensor/utils/partial_checkpoint_load_hook.py class PartialCheckpointLoad (line 24) | class PartialCheckpointLoad(tf.train.SessionRunHook): method __init__ (line 35) | def __init__(self, hook_context, chk_scopename, graph_scopename): method begin (line 47) | def begin(self): FILE: tensor2tensor/utils/pruning_utils.py function weight (line 27) | def weight(w, sparsity): function unit (line 37) | def unit(w, sparsity): function sparsify (line 45) | def sparsify(sess, eval_model, pruning_strategy, pruning_params): FILE: tensor2tensor/utils/quantization.py function bfloat16_activations_var_getter (line 25) | def bfloat16_activations_var_getter(getter, *args, **kwargs): function float16_activations_var_getter (line 51) | def float16_activations_var_getter(getter, *args, **kwargs): function simulated_quantize (line 89) | def simulated_quantize(x, num_bits, noise): function noise_from_step_num (line 137) | def noise_from_step_num(): function _randomized_roundoff_to_bfloat16 (line 160) | def _randomized_roundoff_to_bfloat16(x, noise, cand1, cand2): function _to_bfloat16_unbiased (line 186) | def _to_bfloat16_unbiased(x, noise): class ParameterEncoding (line 209) | class ParameterEncoding(object): method encode (line 221) | def encode(self, x, noise): method decode (line 233) | def decode(self, x): method _decode_with_identity_gradient (line 237) | def _decode_with_identity_gradient(self, x): method custom_getter (line 246) | def custom_getter(self, activation_dtype=tf.bfloat16): class _EncodingInitializer (line 271) | class _EncodingInitializer(object): method __init__ (line 277) | def __init__(self, base_initializer, parameter_encoding): method __call__ (line 281) | def __call__(self, shape, dtype, partition_info=None): class EighthPowerEncoding (line 294) | class EighthPowerEncoding(ParameterEncoding): method encode (line 302) | def encode(self, x, noise): method decode (line 310) | def decode(self, x): FILE: tensor2tensor/utils/registry.py function default_name (line 77) | def default_name(class_or_fn): class Registry (line 95) | class Registry(object): method __init__ (line 133) | def __init__(self, method default_key (line 161) | def default_key(self, value): method name (line 166) | def name(self): method validate (line 169) | def validate(self, key, value): method on_set (line 174) | def on_set(self, key, value): method __setitem__ (line 179) | def __setitem__(self, key, value): method register (line 201) | def register(self, key_or_value=None): method __getitem__ (line 251) | def __getitem__(self, key): method __contains__ (line 258) | def __contains__(self, key): method keys (line 261) | def keys(self): method values (line 264) | def values(self): method items (line 267) | def items(self): method __iter__ (line 270) | def __iter__(self): method __len__ (line 273) | def __len__(self): method _clear (line 276) | def _clear(self): method get (line 279) | def get(self, key, default=None): function _on_model_set (line 283) | def _on_model_set(k, v): function _nargs_validator (line 287) | def _nargs_validator(nargs, message): function parse_problem_name (line 306) | def parse_problem_name(name): function get_problem_name (line 337) | def get_problem_name(base_name, was_reversed=False, was_copy=False): function _problem_name_validator (line 363) | def _problem_name_validator(k, v): function _on_problem_set (line 370) | def _on_problem_set(k, v): function _call_value (line 374) | def _call_value(k, v): function _hparams_value_transformer (line 379) | def _hparams_value_transformer(key, value): class Registries (line 387) | class Registries(object): method __init__ (line 390) | def __init__(self): function optimizer (line 435) | def optimizer(name): function list_hparams (line 476) | def list_hparams(prefix=None): function problem (line 496) | def problem(problem_name, **kwargs): function env_problem (line 516) | def env_problem(env_problem_name, **kwargs): function display_list_by_prefix (line 550) | def display_list_by_prefix(names_list, starting_spaces=0): function help_string (line 564) | def help_string(): FILE: tensor2tensor/utils/registry_test.py class RegistryClassTest (line 31) | class RegistryClassTest(tf.test.TestCase): method testGetterSetter (line 34) | def testGetterSetter(self): method testDefaultKeyFn (line 41) | def testDefaultKeyFn(self): method testNoKeyProvided (line 46) | def testNoKeyProvided(self): method testMembership (line 53) | def testMembership(self): method testIteration (line 60) | def testIteration(self): method testLen (line 66) | def testLen(self): method testTransformer (line 74) | def testTransformer(self): method testGet (line 84) | def testGet(self): class EnvProblemRegistryTest (line 93) | class EnvProblemRegistryTest(tf.test.TestCase): method setUp (line 95) | def setUp(self): method testEnvProblem (line 98) | def testEnvProblem(self): class ModelRegistryTest (line 123) | class ModelRegistryTest(tf.test.TestCase): method setUp (line 125) | def setUp(self): method testT2TModelRegistration (line 128) | def testT2TModelRegistration(self): method testNamedRegistration (line 137) | def testNamedRegistration(self): method testNonT2TModelRegistration (line 146) | def testNonT2TModelRegistration(self): method testUnknownModel (line 155) | def testUnknownModel(self): method testDuplicateRegistration (line 159) | def testDuplicateRegistration(self): method testListModels (line 171) | def testListModels(self): class OptimizerRegistryTest (line 184) | class OptimizerRegistryTest(tf.test.TestCase): method setUp (line 186) | def setUp(self): method testRegistration (line 189) | def testRegistration(self): method testMembership (line 202) | def testMembership(self): method testArgErrorCheck (line 216) | def testArgErrorCheck(self): method testMultipleRegistration (line 230) | def testMultipleRegistration(self): method testUnknownOptimizer (line 241) | def testUnknownOptimizer(self): method testGetterSetterInterface (line 245) | def testGetterSetterInterface(self): class HParamRegistryTest (line 256) | class HParamRegistryTest(tf.test.TestCase): method setUp (line 258) | def setUp(self): method testHParamSet (line 262) | def testHParamSet(self): method testNamedRegistration (line 276) | def testNamedRegistration(self): method testUnknownHparams (line 289) | def testUnknownHparams(self): method testNoneHparams (line 295) | def testNoneHparams(self): method testDuplicateRegistration (line 304) | def testDuplicateRegistration(self): method testListHparams (line 326) | def testListHparams(self): method testRangeSignatureCheck (line 348) | def testRangeSignatureCheck(self): class RegistryHelpTest (line 363) | class RegistryHelpTest(tf.test.TestCase): method testRegistryHelp (line 366) | def testRegistryHelp(self): FILE: tensor2tensor/utils/restore_hook.py class RestoreHook (line 28) | class RestoreHook(tf.train.SessionRunHook): method __init__ (line 31) | def __init__(self, checkpoint_path="", new_model_scope="", old_model_s... method begin (line 39) | def begin(self): FILE: tensor2tensor/utils/rouge.py function _len_lcs (line 33) | def _len_lcs(x, y): function _lcs (line 50) | def _lcs(x, y): function _f_lcs (line 77) | def _f_lcs(llcs, m, n): function rouge_l_sentence_level (line 100) | def rouge_l_sentence_level(eval_sentences, ref_sentences): function rouge_l_fscore (line 134) | def rouge_l_fscore(predictions, labels, **unused_kwargs): function _get_ngrams (line 156) | def _get_ngrams(n, text): function rouge_n (line 174) | def rouge_n(eval_sentences, ref_sentences, n=2): function rouge_2_fscore (line 217) | def rouge_2_fscore(predictions, labels, **unused_kwargs): FILE: tensor2tensor/utils/rouge_test.py class TestRouge2Metric (line 27) | class TestRouge2Metric(tf.test.TestCase): method testRouge2Identical (line 30) | def testRouge2Identical(self): method testRouge2Disjoint (line 37) | def testRouge2Disjoint(self): method testRouge2PartialOverlap (line 44) | def testRouge2PartialOverlap(self): class TestRougeLMetric (line 52) | class TestRougeLMetric(tf.test.TestCase): method testRougeLIdentical (line 55) | def testRougeLIdentical(self): method testRougeLDisjoint (line 63) | def testRougeLDisjoint(self): method testRougeLPartialOverlap (line 70) | def testRougeLPartialOverlap(self): class TestRougeMetricsE2E (line 79) | class TestRougeMetricsE2E(tf.test.TestCase): method testRouge2MetricE2E (line 82) | def testRouge2MetricE2E(self): method testRougeLMetricE2E (line 98) | def testRougeLMetricE2E(self): FILE: tensor2tensor/utils/sari_hook.py function _get_ngram_counter (line 50) | def _get_ngram_counter(ids, n): function _get_fbeta_score (line 70) | def _get_fbeta_score(true_positives, selected, relevant, beta=1): function get_addition_score (line 97) | def get_addition_score(source_counts, prediction_counts, target_counts): function get_keep_score (line 110) | def get_keep_score(source_counts, prediction_counts, target_counts): function get_deletion_score (line 121) | def get_deletion_score(source_counts, prediction_counts, target_counts, ... function get_sari_score (line 132) | def get_sari_score(source_ids, prediction_ids, list_of_targets, function get_sari (line 182) | def get_sari(source_ids, prediction_ids, target_ids, max_gram_size=4): function sari_score (line 224) | def sari_score(predictions, labels, features, **unused_kwargs): FILE: tensor2tensor/utils/sari_hook_test.py class SariHookTest (line 29) | class SariHookTest(tf.test.TestCase): method setUp (line 31) | def setUp(self): method testSariSent1 (line 41) | def testSariSent1(self): method testSariSent2 (line 53) | def testSariSent2(self): method testSariSent3 (line 60) | def testSariSent3(self): method testMatchingSentences (line 67) | def testMatchingSentences(self): method testMatchingOutputAndReference (line 76) | def testMatchingOutputAndReference(self): method testMatchingSentencesWithRepetitions (line 85) | def testMatchingSentencesWithRepetitions(self): method testKeepScore (line 94) | def testKeepScore(self): method testDeletionScore (line 104) | def testDeletionScore(self): method testIdsWithZeros (line 120) | def testIdsWithZeros(self): method testSariScoreE2E (line 129) | def testSariScoreE2E(self): FILE: tensor2tensor/utils/scheduled_sampling.py function sequential_scheduled_sampling_for_t2tmodel (line 45) | def sequential_scheduled_sampling_for_t2tmodel(t2tmodel, features): function sequential_scheduled_sampling (line 77) | def sequential_scheduled_sampling(infer_fn, mix_fn, loss_fn, targets): function _mix_tokens (line 147) | def _mix_tokens(p_sample, gold_targets, sampled_targets): function _sample_next_tokens (line 166) | def _sample_next_tokens(logits): function _update_timestep (line 175) | def _update_timestep(x, timestep, values): function inverse_decay_mix_prob (line 196) | def inverse_decay_mix_prob(warmup_schedule_name, p_max, num_warmup_steps): class ScheduledSamplingAdapter (line 206) | class ScheduledSamplingAdapter(object): method __init__ (line 209) | def __init__(self, t2tmodel, features): method infer_fn (line 216) | def infer_fn(self, partial_targets): method mix_fn (line 246) | def mix_fn(self, gold_tokens, sampled_tokens): method loss_fn (line 258) | def loss_fn(self, targets, logits): FILE: tensor2tensor/utils/t2t_model.py function _flatten_dict (line 66) | def _flatten_dict(original_dict): function _unflatten_dict (line 93) | def _unflatten_dict(flat_dict, prefixes): class T2TModel (line 123) | class T2TModel(base.Layer): method __init__ (line 152) | def __init__(self, method _add_variable_scope (line 238) | def _add_variable_scope(self, key, vs): method summarize_hparams (line 242) | def summarize_hparams(self): method train_hooks (line 256) | def train_hooks(hook_context): method eval_hooks (line 260) | def eval_hooks(hook_context): method hparams (line 264) | def hparams(self): method problem_hparams (line 268) | def problem_hparams(self): method is_training (line 272) | def is_training(self): method is_predicting (line 276) | def is_predicting(self): method has_input (line 280) | def has_input(self): method _custom_getter (line 287) | def _custom_getter(self): method _target_modality_is_real (line 305) | def _target_modality_is_real(self): method call (line 316) | def call(self, inputs, **kwargs): method has_symmetric_shards (line 336) | def has_symmetric_shards(model_name): method use_body_sharded (line 343) | def use_body_sharded(): method body_sharded (line 346) | def body_sharded(self, sharded_features): method model_fn_sharded (line 351) | def model_fn_sharded(self, sharded_features): method model_fn (line 417) | def model_fn(self, features): method bottom (line 446) | def bottom(self, features): method body (line 521) | def body(self, features): method _top_single (line 541) | def _top_single(self, body_output, feature_name, features): method top (line 586) | def top(self, body_output, features): method _loss_single (line 617) | def _loss_single(self, logits, feature_name, feature, weights=None): method loss (line 685) | def loss(self, logits, features): method optimize (line 713) | def optimize(self, loss, num_async_replicas=1, use_tpu=False, variable... method set_mode (line 724) | def set_mode(self, mode): method prepare_features_for_infer (line 737) | def prepare_features_for_infer(self, features): method eval_autoregressive (line 741) | def eval_autoregressive(self, features=None, decode_length=50): method _fill_problem_hparams_features (line 758) | def _fill_problem_hparams_features(self, features): method infer (line 765) | def infer(self, method _beam_decode (line 825) | def _beam_decode(self, method _beam_decode_slow (line 851) | def _beam_decode_slow(self, features, decode_length, beam_size, top_be... method _greedy_infer (line 959) | def _greedy_infer(self, features, decode_length, use_tpu=False): method _slow_greedy_infer_tpu (line 983) | def _slow_greedy_infer_tpu(self, features, decode_length): method _slow_greedy_infer (line 1152) | def _slow_greedy_infer(self, features, decode_length): method sample (line 1334) | def sample(self, features): method _shard_features (line 1366) | def _shard_features(self, features): # pylint: disable=missing-docstring method _to_features_per_datashard (line 1380) | def _to_features_per_datashard(self, features): method _to_single_features_dict (line 1388) | def _to_single_features_dict(self, datashard_features): method get_train_hooks (line 1397) | def get_train_hooks(model_name, hook_context): method get_eval_hooks (line 1402) | def get_eval_hooks(model_name, hook_context): method make_estimator_model_fn (line 1407) | def make_estimator_model_fn(model_name, method estimator_model_fn (line 1427) | def estimator_model_fn(cls, method initialize_from_ckpt (line 1551) | def initialize_from_ckpt(self, ckpt_dir): method create_train_host_call (line 1554) | def create_train_host_call(self): method create_eval_host_call (line 1557) | def create_eval_host_call(self): method estimator_spec_train (line 1563) | def estimator_spec_train(self, loss, num_async_replicas=1, use_tpu=Fal... method estimator_spec_eval (line 1602) | def estimator_spec_eval(self, features, logits, labels, loss, losses_d... method estimator_spec_predict (line 1695) | def estimator_spec_predict(self, features, use_tpu=False): method _normalize_body_output (line 1781) | def _normalize_body_output(self, body_out): method _summarize_losses (line 1796) | def _summarize_losses(self, losses_dict): method maybe_scheduled_sampling (line 1803) | def maybe_scheduled_sampling(self, features, logits, losses): function _with_timing (line 1983) | def _with_timing(fn, msg, silent=False): function create_dummy_vars (line 1995) | def create_dummy_vars(): function create_tpu_eval_metrics_fn (line 2018) | def create_tpu_eval_metrics_fn(problem, model_hparams): function remove_summaries (line 2115) | def remove_summaries(): function create_host_call (line 2124) | def create_host_call(model_dir): function _del_dict_non_tensors (line 2198) | def _del_dict_non_tensors(d): class DummyVariableStore (line 2204) | class DummyVariableStore(object): method as_default (line 2207) | def as_default(self): function create_eager_var_store (line 2211) | def create_eager_var_store(): function average_sharded_losses (line 2218) | def average_sharded_losses(sharded_losses): function summarize_features (line 2243) | def summarize_features(features, num_shards=1): function _eager_log (line 2264) | def _eager_log(level, *args): function log_debug (line 2271) | def log_debug(*args): function log_info (line 2275) | def log_info(*args): function log_warn (line 2279) | def log_warn(*args): function _compose_custom_getters (line 2283) | def _compose_custom_getters(getter_a, getter_b): function set_custom_getter_compose (line 2311) | def set_custom_getter_compose(custom_getter): function _create_target_modality (line 2324) | def _create_target_modality(modality_dict): function initialize_from_ckpt (line 2333) | def initialize_from_ckpt(ckpt_dir, hparams): FILE: tensor2tensor/utils/t2t_model_test.py class T2TModelTest (line 31) | class T2TModelTest(tf.test.TestCase): method testSummarizeLosses (line 34) | def testSummarizeLosses(self): method testLossSingleWeights (line 45) | def testLossSingleWeights(self): FILE: tensor2tensor/utils/test_utils.py function run_in_graph_and_eager_modes (line 25) | def run_in_graph_and_eager_modes(func=None, function run_in_graph_mode_only (line 101) | def run_in_graph_mode_only(func=None, config=None, use_gpu=True): function test_main (line 122) | def test_main(): FILE: tensor2tensor/utils/test_utils_test.py class RunInGraphAndEagerTest (line 28) | class RunInGraphAndEagerTest(tf.test.TestCase): method test_run_in_graph_and_eager_modes (line 30) | def test_run_in_graph_and_eager_modes(self): method test_run_in_graph_and_eager_modes_setup_in_same_mode (line 51) | def test_run_in_graph_and_eager_modes_setup_in_same_mode(self): FILE: tensor2tensor/utils/trainer_lib.py function next_checkpoint (line 49) | def next_checkpoint(model_dir, timeout_mins=240): function next_undecoded_checkpoint (line 75) | def next_undecoded_checkpoint(model_dir, timeout_mins=240): function create_session_config (line 108) | def create_session_config(log_device_placement=False, function is_cloud_async_distributed (line 143) | def is_cloud_async_distributed(): function create_run_config (line 148) | def create_run_config(model_name, function create_estimator (line 290) | def create_estimator(model_name, function create_hooks (line 396) | def create_hooks(use_tfdbg=False, class HookContext (line 436) | class HookContext(collections.namedtuple( class T2TExperiment (line 442) | class T2TExperiment(object): method __init__ (line 445) | def __init__(self, estimator, hparams, train_spec, eval_spec, method estimator (line 455) | def estimator(self): method train_steps (line 459) | def train_steps(self): method eval_steps (line 463) | def eval_steps(self): method continuous_train_and_eval (line 466) | def continuous_train_and_eval(self, continuous_eval_predicate_fn=None): method train_and_evaluate (line 472) | def train_and_evaluate(self): method train (line 479) | def train(self, max_steps=None): method train_eval_and_decode (line 487) | def train_eval_and_decode(self): method _set_eval_dir_name (line 531) | def _set_eval_dir_name(self, eval_dir_name): method evaluate (line 538) | def evaluate(self): method evaluate_on_train_data (line 547) | def evaluate_on_train_data(self): method continuous_eval (line 556) | def continuous_eval(self): method continuous_eval_on_train_data (line 567) | def continuous_eval_on_train_data(self): method test (line 578) | def test(self): method run_std_server (line 589) | def run_std_server(self): method decode (line 606) | def decode(self, method continuous_decode (line 626) | def continuous_decode(self): method continuous_decode_on_train_data (line 632) | def continuous_decode_on_train_data(self): method continuous_decode_on_eval_data (line 638) | def continuous_decode_on_eval_data(self): method continuous_decode_from_file (line 674) | def continuous_decode_from_file(self): function create_experiment (line 681) | def create_experiment( function create_experiment_fn (line 842) | def create_experiment_fn(*args, **kwargs): function set_random_seed (line 851) | def set_random_seed(seed): function restore_checkpoint (line 857) | def restore_checkpoint(ckpt_dir, saver, sess, must_restore=False): FILE: tensor2tensor/utils/trainer_lib_test.py class TrainerLibTest (line 32) | class TrainerLibTest(tf.test.TestCase): method setUpClass (line 35) | def setUpClass(cls): method testExperiment (line 38) | def testExperiment(self): method testExperimentWithClass (line 56) | def testExperimentWithClass(self): method testModel (line 74) | def testModel(self): method testMultipleTargetModalities (line 103) | def testMultipleTargetModalities(self): method testCreateHparams (line 149) | def testCreateHparams(self): FILE: tensor2tensor/utils/update_ops_hook.py class UpdateOpsHook (line 24) | class UpdateOpsHook(tf.train.SessionRunHook): method before_run (line 27) | def before_run(self, run_context): FILE: tensor2tensor/utils/usr_dir.py function import_usr_dir (line 30) | def import_usr_dir(usr_dir): FILE: tensor2tensor/utils/video/prediction2gif.py function main (line 57) | def main(_): FILE: tensor2tensor/utils/video/reward_confusion.py function print_confusion_matrix (line 46) | def print_confusion_matrix(title, cm): function main (line 55) | def main(_): FILE: tensor2tensor/utils/video2gif.py function create_gif (line 53) | def create_gif(name): function main (line 58) | def main(_): FILE: tensor2tensor/utils/video_metrics.py function load_image_map_function (line 30) | def load_image_map_function(filename, frame_shape): function load_videos (line 38) | def load_videos(template, video_length, frame_shape): function file_pattern (line 66) | def file_pattern(output_dir, problem_name, prefix): function get_target_and_output_filepatterns (line 70) | def get_target_and_output_filepatterns(output_dir, problem_name): function get_zipped_dataset_from_png_files (line 75) | def get_zipped_dataset_from_png_files( function save_results (line 85) | def save_results(results, output_dir, problem_name): function psnr_and_ssim (line 93) | def psnr_and_ssim(output, target): function stack_data_given_key (line 110) | def stack_data_given_key(predictions, key): function get_zipped_dataset_from_predictions (line 116) | def get_zipped_dataset_from_predictions(predictions): function compute_one_decoding_video_metrics (line 135) | def compute_one_decoding_video_metrics(iterator, feed_dict, num_videos): function reduce_to_best_decode (line 167) | def reduce_to_best_decode(metrics, reduce_func): function compute_all_metrics_statistics (line 188) | def compute_all_metrics_statistics(all_results): function compute_video_metrics_from_predictions (line 223) | def compute_video_metrics_from_predictions(predictions, decode_hparams): function compute_video_metrics_from_png_files (line 249) | def compute_video_metrics_from_png_files( function compute_and_save_video_metrics (line 282) | def compute_and_save_video_metrics( FILE: tensor2tensor/utils/video_metrics_test.py class VideoMetricsTest (line 27) | class VideoMetricsTest(tf.test.TestCase): method test_reduce_to_best_decode (line 29) | def test_reduce_to_best_decode(self): FILE: tensor2tensor/utils/yellowfin.py class YellowFinOptimizer (line 30) | class YellowFinOptimizer(object): method __init__ (line 36) | def __init__(self, method _curvature_range (line 193) | def _curvature_range(self): method _grad_variance (line 232) | def _grad_variance(self): method _dist_to_opt (line 265) | def _dist_to_opt(self): method _grad_sparsity (line 291) | def _grad_sparsity(self): method _prepare_variables (line 308) | def _prepare_variables(self): method _get_cubic_root (line 351) | def _get_cubic_root(self): method _get_lr_tensor (line 389) | def _get_lr_tensor(self): method _get_mu_tensor (line 398) | def _get_mu_tensor(self): method _yellowfin (line 410) | def _yellowfin(self): method get_name (line 456) | def get_name(self): method apply_gradients (line 460) | def apply_gradients(self, grads_and_vars, global_step=None, name=None): method compute_gradients (line 521) | def compute_gradients(self, method minimize (line 562) | def minimize(self, method get_slot (line 624) | def get_slot(self, var, name): method get_slot_names (line 636) | def get_slot_names(self): FILE: tensor2tensor/utils/yellowfin_test.py class YellowFinTest (line 32) | class YellowFinTest(tf.test.TestCase): method tune_everything (line 34) | def tune_everything(self, x0squared, c, t, gmin, gmax): method testMeasurement (line 68) | def testMeasurement(self): method testLrMu (line 125) | def testLrMu(self): FILE: tensor2tensor/visualization/attention.js function lighten (line 19) | function lighten(colour) { function transpose (line 27) | function transpose(mat) { function zip (line 35) | function zip(a, b) { function renderVis (line 42) | function renderVis(id, top_text, bot_text, attention_heads, config) { function renderText (line 68) | function renderText(svg, text, is_top, att_data, left_pos) { function renderAttentionHighlights (line 220) | function renderAttentionHighlights(svg, attention) { function renderAttention (line 233) | function renderAttention(svg, attention_heads) { function box_offset (line 259) | function box_offset(i) { function active_heads (line 265) | function active_heads() { function draw_checkboxes (line 271) | function draw_checkboxes(config, top, svg, attention_heads) { function visualize (line 324) | function visualize() { function render (line 333) | function render() { FILE: tensor2tensor/visualization/attention.py function show (line 47) | def show(inp_text, out_text, enc_atts, dec_atts, encdec_atts): function _show_attention (line 56) | def _show_attention(att_json): function resize (line 62) | def resize(att_mat, max_length=None): function _get_attention (line 78) | def _get_attention(inp_text, out_text, enc_atts, dec_atts, encdec_atts): FILE: tensor2tensor/visualization/visualization.py class AttentionVisualizer (line 35) | class AttentionVisualizer(object): method __init__ (line 38) | def __init__( method encode (line 53) | def encode(self, input_str): method decode (line 59) | def decode(self, integers): method encode_list (line 64) | def encode_list(self, integers): method decode_list (line 69) | def decode_list(self, integers): method get_vis_data_from_string (line 74) | def get_vis_data_from_string(self, sess, input_string): function build_model (line 119) | def build_model(hparams_set, model_name, data_dir, problem_name, beam_si... function get_att_mats (line 165) | def get_att_mats(translate_model): FILE: tensor2tensor/visualization/visualization_test.py function get_data_dir (line 39) | def get_data_dir(): class VisualizationTest (line 50) | class VisualizationTest(tf.test.TestCase): method setUp (line 52) | def setUp(self): method test_build_model_greedy (line 56) | def test_build_model_greedy(self): method test_build_model_beam (line 64) | def test_build_model_beam(self): method test_get_vis_data_from_string (line 72) | def test_get_vis_data_from_string(self):