Skip to content

Commit

Permalink
Fix TF example
Browse files Browse the repository at this point in the history
Signed-off-by: ptredak <[email protected]>
  • Loading branch information
ptrendx authored and JanuszL committed Aug 2, 2018
1 parent fffc020 commit 0551a39
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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())"
Expand Down

0 comments on commit 0551a39

Please sign in to comment.