-
Notifications
You must be signed in to change notification settings - Fork 621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move examples to fn api #2566
Move examples to fn api #2566
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@@ -202,14 +166,32 @@ def main(): | |||
FLAGS.device_id = int(env['FLAGS_selected_gpus']) | |||
FLAGS.whole_batch_size = FLAGS.world_size * FLAGS.batch_size | |||
|
|||
pipe = HybridTrainPipe() | |||
pipe = create_dali_pipeline(batch_size=FLAGS.batch_size, | |||
num_threads=FLAGS.num_threads, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: indent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
train_loader = DALIClassificationIterator(pipe, reader_name="Reader", | ||
last_batch_policy=LastBatchPolicy.PARTIAL) | ||
|
||
if FLAGS.local_rank == 0: | ||
pipe = HybridValPipe() | ||
pipe = create_dali_pipeline(batch_size=FLAGS.batch_size, | ||
num_threads=FLAGS.num_threads, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: indent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
scaling=[0.3, 1.0], | ||
bbox_layout="xyXY", | ||
allow_no_crop=True, | ||
num_attempts=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you changed from 50 attempts to 1. Why is that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy-paste. Done
allow_no_crop=True, | ||
num_attempts=1) | ||
images = fn.image_decoder_slice( | ||
images, crop_begin, crop_size, device="cpu", output_type=types.RGB) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before there was device='mixed'
. Did you change it in purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
0.3, 1.0], | ||
bbox_layout="xyXY", | ||
allow_no_crop=True, | ||
num_attempts=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if the number of attempts being 1 was intentional in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy-paste. Done
crop_pos_x=fn.uniform(range=(0.0, 1.0)), | ||
crop_pos_y=fn.uniform(range=(0.0, 1.0))) | ||
|
||
images = fn.tanspose(images, perm=[3, 0, 1, 2]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
images = fn.tanspose(images, perm=[3, 0, 1, 2]) | |
images = fn.transpose(images, perm=[3, 0, 1, 2]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
6c138b8
to
6426f2d
Compare
!build |
CI MESSAGE: [1964638]: BUILD STARTED |
CI MESSAGE: [1964638]: BUILD PASSED |
eb28074
to
bf8d65d
Compare
!build |
CI MESSAGE: [1965358]: BUILD STARTED |
CI MESSAGE: [1965358]: BUILD PASSED |
CI MESSAGE: [1966526]: BUILD FAILED |
- move all use cases to the functional API - reworks SSD, RN50, super resolution and TSM examples Signed-off-by: Janusz Lisiecki <[email protected]>
Signed-off-by: Janusz Lisiecki <[email protected]>
Signed-off-by: Janusz Lisiecki <[email protected]>
Signed-off-by: Janusz Lisiecki <[email protected]>
bf8d65d
to
212118d
Compare
CI MESSAGE: [1966933]: BUILD STARTED |
CI MESSAGE: [1966933]: BUILD FAILED |
CI MESSAGE: [1966996]: BUILD STARTED |
CI MESSAGE: [1966996]: BUILD FAILED |
Signed-off-by: Janusz Lisiecki <[email protected]>
f95df8d
to
3fccda3
Compare
CI MESSAGE: [1967684]: BUILD STARTED |
CI MESSAGE: [1967762]: BUILD STARTED |
CI MESSAGE: [1967684]: BUILD FAILED |
CI MESSAGE: [1967762]: BUILD PASSED |
CI MESSAGE: [1967684]: BUILD PASSED |
Signed-off-by: Janusz Lisiecki [email protected]
Why we need this PR?
Pick one, remove the rest
What happened in this PR?
Fill relevant points, put NA otherwise. Replace anything inside []
reworks SSD, RN50, super resolution and TSM examples to use the functional API
use_cases part of the documentation
functional API usage
CI
documentation and examples have been updated
JIRA TASK: [NA]