fd5c54dfd76d06569d615634526eb631aab1d05f,open_seq2seq/optimizers/optimizers.py,,optimize_loss,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,89
Before Change
tf.cast(tf.less(larc_grad_update, 1.0), tf.int32))
larc_grad_update = tf.minimum(larc_grad_update, 1.0)
larc_grad_update = tf.saturate_cast(larc_grad_update, var_dtype)
summary.scalar("larc_grad_update/{}".format(v.name), larc_grad_update)
gradients[idx] = (larc_grad_update * g, v)
// Create gradient updates.
grad_updates = opt.apply_gradients(
After Change
gradients[idx] = (larc_grad_update * g, v)
// adding additional summary
if "larc_summaries" in summaries:
summary.scalar("larc_grad_update/{}".format(v.name), larc_grad_update)
summary.scalar("larc_grad_norm/{}".format(v.name),
tf.cast(g_norm, var_dtype) * larc_grad_update)
// Create gradient updates.
grad_updates = opt.apply_gradients(
gradients,
global_step=global_step if increment_global_step else None,
name="train")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: NVIDIA/OpenSeq2Seq
Commit Name: fd5c54dfd76d06569d615634526eb631aab1d05f
Time: 2018-05-02
Author: igor.a.gitman@gmail.com
File Name: open_seq2seq/optimizers/optimizers.py
Class Name:
Method Name: optimize_loss
Project Name: NervanaSystems/coach
Commit Name: d302168c8c817e5d4f4a59d9f5dfe283a4150cb1
Time: 2018-05-24
Author: 30383381+itaicaspi-intel@users.noreply.github.com
File Name: architectures/tensorflow_components/general_network.py
Class Name: GeneralTensorFlowNetwork
Method Name: get_model
Project Name: uber/ludwig
Commit Name: cdab60e331b42dfbb77c143595d337e3e0e279a8
Time: 2020-02-01
Author: piero@uber.com
File Name: ludwig/features/timeseries_feature.py
Class Name: TimeseriesOutputFeature
Method Name: build_output