Building-ML-Pipelines / building-machine-learning-pipelines

Code repository for the O'Reilly publication "Building Machine Learning Pipelines" by Hannes Hapke & Catherine Nelson
MIT License
583 stars 250 forks source link

Add working example of image transformation #46

Closed wardVD closed 2 years ago

wardVD commented 3 years ago

Add image TFRecords + IPython notebook to illustrate how to transform images with Transform component.

wardVD commented 3 years ago

Hi @wardVD Thank you for your PR. Do you mind adding an additional cell after the transform step, reading the transformed_examples and displaying one image to show that they are b/w and 300x300? I had to call the map_fn with the output of a lambda call as shown in the Issue. Would be great to confirm that the batch isn't flattened when you call tf.reshape(..., shape=[]). Thank you!

I didn't see a difference in either way. I've included both ways, one is commented out. They give me the same result.

hanneshapke commented 2 years ago

Hi @wardVD, Wow, I didn't think Github would close the PR when I renamed the master branch. Sorry about that! Could you please reopen the PR if possible. I am very sorry about the mistake.