• Hongkun Yu's avatar
    Merged commit includes the following changes: (#7252) · 1fb34e76
    Hongkun Yu authored
    258597234  by rxsang<rxsang@google.com>:
    
        Update all the TPUStrategy examples to use the new v2 APIs, i.e.
        make_dataset_iterator -> experimental_distribute_dataset,
        make_input_fn_iterator -> experimental_distribute_datasets_from_function,
        unwrap -> experimental_local_results,
        experimental_run -> experimental_run_v2
    
    --
    258581998  by taylorrobie<taylorrobie@google.com>:
    
        Update keras v2 optimizers to reuse coefficients which are shared across all updates, which reduces the total number of ops created by between 5% (for simple optimizers such as SGD and Adagrad) and 25% (for complicated optimizers such as Adam and NAdam). Separate copies are made for each device and dtype.
    
        The effect of this change on run time is fairly minimal since Grappler is expected to consolidate most of these ops; however it does improve graph construction time.
    
    --
    
    PiperOrigin-RevId: 258597234
    1fb34e76
optimization.py 6.59 KB