-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding `shuffle()` and `batch()`.
- Loading branch information
Showing
7 changed files
with
111 additions
and
29 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import tensorflow as tf | ||
|
||
|
||
def add(a, b): | ||
return a + b | ||
|
||
|
||
dataset = tf.data.Dataset.from_tensor_slices([1, 2, 3]).shuffle(3) | ||
|
||
for element in dataset: | ||
c = add(element, element) |
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,11 @@ | ||
import tensorflow as tf | ||
|
||
|
||
def add(a, b): | ||
return a + b | ||
|
||
|
||
dataset = tf.data.Dataset(None) # This is actually illegal since this ctor is not publicly visible. | ||
|
||
for element in dataset: | ||
c = add(element, element) |
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,11 @@ | ||
import tensorflow as tf | ||
|
||
|
||
def add(a, b): | ||
return a + b | ||
|
||
|
||
dataset = tf.data.Dataset(None).shuffle(3) # This is actually illegal since this ctor is not publicly visible. | ||
|
||
for element in dataset: | ||
c = add(element, element) |
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,11 @@ | ||
import tensorflow as tf | ||
|
||
|
||
def add(a, b): | ||
return a + b | ||
|
||
|
||
dataset = tf.data.Dataset.from_tensor_slices([1, 2, 3]).shuffle(3).batch(2) | ||
|
||
for element in dataset: | ||
c = add(element, element) |