-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgrade ML for #280. * Adding callback test * Fixing comment * Must use at least ML 0.13.0. * Simplify test. --------- Co-authored-by: Tatiana Castro Velez <[email protected]>
- Loading branch information
Showing
6 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
edu.cuny.hunter.hybridize.tests/resources/HybridizeFunction/testCallback/in/A.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# From https://www.tensorflow.org/versions/r2.9/api_docs/python/tf/distribute/Strategy#example_usage_2. | ||
|
||
import tensorflow as tf | ||
|
||
strategy = tf.distribute.MirroredStrategy(["GPU:0", "GPU:1"]) | ||
tensor_input = tf.constant(3.0) | ||
|
||
|
||
@tf.function | ||
def replica_fn(input): | ||
return input * 2.0 | ||
|
||
|
||
# Indirect call to replica_fun(). | ||
result = strategy.run(replica_fn, (tensor_input,)) | ||
print(result) |
1 change: 1 addition & 0 deletions
1
edu.cuny.hunter.hybridize.tests/resources/HybridizeFunction/testCallback/in/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tensorflow==2.9.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters