Skip to content

Reduce tf.function retracing#100

Open
ymd-h wants to merge 4 commits intokeiohta:masterfrom
ymd-h:HotFix_tf_retracing
Open

Reduce tf.function retracing#100
ymd-h wants to merge 4 commits intokeiohta:masterfrom
ymd-h:HotFix_tf_retracing

Conversation

@ymd-h
Copy link
Contributor

@ymd-h ymd-h commented Aug 10, 2020

This PR ensures input arguments of graph function (decorated by tf.function) as tf.Tensor instead of pure Python object, in order to reduce tf.function retracing.

Related with #99

@ymd-h
Copy link
Contributor Author

ymd-h commented Aug 10, 2020

@keiohta

If it is possible, please evaluate with more realistic tasks as well as simple tests.

We want to know whether there are good effects (speed up etc.) at TF2.3 and there are no bad effect (slow down, wrong answer etc.) at TF2.2 and before.

@keiohta
Copy link
Owner

keiohta commented Aug 25, 2020

Thanks for the PR! I'll merge it after checking whether the adding tf.constant deteriorate the performance in terms of time for computing forward and backward propagation of a network.

Unfortunately Anaconda has not supported gpu version of tf2.3 (which I typically use), so please wait for a moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants