From 0551a39f5975173fa4298579e51c10c9074229e8 Mon Sep 17 00:00:00 2001 From: ptredak Date: Mon, 30 Jul 2018 16:04:21 -0700 Subject: [PATCH] Fix TF example Signed-off-by: ptredak --- .../tensorflow/tensorflow-resnet50-various-readers.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/examples/tensorflow/tensorflow-resnet50-various-readers.ipynb b/docs/examples/tensorflow/tensorflow-resnet50-various-readers.ipynb index 4ed4ca12048..3af205d573c 100644 --- a/docs/examples/tensorflow/tensorflow-resnet50-various-readers.ipynb +++ b/docs/examples/tensorflow/tensorflow-resnet50-various-readers.ipynb @@ -95,8 +95,7 @@ " super(CommonPipeline, self).__init__(batch_size, num_threads, device_id)\n", "\n", " self.decode = ops.nvJPEGDecoder(device = \"mixed\", output_type = types.RGB)\n", - " self.resize = ops.Resize(device = \"gpu\", random_resize = True,\n", - " resize_a = 256, resize_b = 480,\n", + " self.resize = ops.Resize(device = \"gpu\",\n", " image_type = types.RGB,\n", " interp_type = types.INTERP_LINEAR)\n", " self.cmn = ops.CropMirrorNormalize(device = \"gpu\",\n", @@ -106,10 +105,11 @@ " mean = [128., 128., 128.],\n", " std = [1., 1., 1.])\n", " self.uniform = ops.Uniform(range = (0.0, 1.0))\n", + " self.resize_rng = ops.Uniform(range = (256, 480))\n", "\n", " def base_define_graph(self, inputs, labels):\n", " images = self.decode(inputs)\n", - " images = self.resize(images)\n", + " images = self.resize(images, resize_shorter = self.resize_rng())\n", " output = self.cmn(images, crop_pos_x = self.uniform(),\n", " crop_pos_y = self.uniform())\n", " return (output, labels.gpu())"