-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9dff828
commit d674118
Showing
4 changed files
with
108 additions
and
120 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1 @@ | ||
from __future__ import absolute_import | ||
from __future__ import division | ||
from __future__ import print_function | ||
|
||
import os | ||
|
||
import tensorflow as tf | ||
|
||
# TODO: Merge into dataset class | ||
def get_batches_per_epoch(opt): | ||
trainA_size = len(os.listdir(os.path.join(opt.data_dir, 'trainA'))) | ||
trainB_size = len(os.listdir(os.path.join(opt.data_dir, 'trainB'))) | ||
batches_per_epoch = (trainA_size + trainB_size) // (2 * opt.batch_size) # floor(Avg dataset size / batch_size) | ||
return batches_per_epoch |
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