| @@ -54,8 +54,22 @@ namespace Tensorflow | |||||
| /// <param name="contents"></param> | /// <param name="contents"></param> | ||||
| /// <param name="name"></param> | /// <param name="name"></param> | ||||
| /// <returns></returns> | /// <returns></returns> | ||||
| public static Tensor is_jpeg(Tensor contents, string name = null) | |||||
| public Tensor is_jpeg(Tensor contents, string name = null) | |||||
| => image_ops_impl.is_jpeg(contents, name: name); | => image_ops_impl.is_jpeg(contents, name: name); | ||||
| /// <summary> | |||||
| /// Resize `images` to `size` using nearest neighbor interpolation. | |||||
| /// </summary> | |||||
| /// <param name="images"></param> | |||||
| /// <param name="size"></param> | |||||
| /// <param name="align_corners"></param> | |||||
| /// <param name="name"></param> | |||||
| /// <param name="half_pixel_centers"></param> | |||||
| /// <returns></returns> | |||||
| public Tensor resize_nearest_neighbor<Tsize>(Tensor images, Tsize size, bool align_corners = false, | |||||
| string name = null, bool half_pixel_centers = false) | |||||
| => image_ops_impl.resize_nearest_neighbor(images, size, align_corners: align_corners, | |||||
| name: name, half_pixel_centers: half_pixel_centers); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -169,5 +169,19 @@ namespace Tensorflow | |||||
| return _op.outputs[0]; | return _op.outputs[0]; | ||||
| } | } | ||||
| } | } | ||||
| public static Tensor resize_nearest_neighbor<Tsize>(Tensor images, Tsize size, bool align_corners = false, | |||||
| bool half_pixel_centers = false, string name = null) | |||||
| { | |||||
| var op = _op_def_lib._apply_op_helper("ResizeNearestNeighbor", name: name, args: new | |||||
| { | |||||
| images, | |||||
| size, | |||||
| align_corners, | |||||
| half_pixel_centers | |||||
| }); | |||||
| return op.output; | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| @@ -128,5 +128,22 @@ namespace Tensorflow | |||||
| throw new NotImplementedException(""); | throw new NotImplementedException(""); | ||||
| } | } | ||||
| /// <summary> | |||||
| /// Resize `images` to `size` using nearest neighbor interpolation. | |||||
| /// </summary> | |||||
| /// <param name="images"></param> | |||||
| /// <param name="size"></param> | |||||
| /// <param name="align_corners"></param> | |||||
| /// <param name="name"></param> | |||||
| /// <param name="half_pixel_centers"></param> | |||||
| /// <returns></returns> | |||||
| public static Tensor resize_nearest_neighbor<Tsize>(Tensor images, Tsize size, bool align_corners = false, | |||||
| string name = null, bool half_pixel_centers = false) | |||||
| => gen_image_ops.resize_nearest_neighbor(images: images, | |||||
| size: size, | |||||
| align_corners: align_corners, | |||||
| half_pixel_centers: half_pixel_centers, | |||||
| name: name); | |||||
| } | } | ||||
| } | } | ||||
| @@ -26,7 +26,7 @@ Docs: https://tensorflownet.readthedocs.io</Description> | |||||
| 5. Overload session.run(), make syntax simpler. | 5. Overload session.run(), make syntax simpler. | ||||
| 6. Add Local Response Normalization. | 6. Add Local Response Normalization. | ||||
| 7. Add tf.image related APIs. | 7. Add tf.image related APIs. | ||||
| 8. Add tf.random_normal, tf.constant, tf.pad, tf.shape. | |||||
| 8. Add tf.random_normal, tf.constant, tf.pad, tf.shape, tf.image.resize_nearest_neighbor. | |||||
| 9. MultiThread is safe.</PackageReleaseNotes> | 9. MultiThread is safe.</PackageReleaseNotes> | ||||
| <LangVersion>7.3</LangVersion> | <LangVersion>7.3</LangVersion> | ||||
| <FileVersion>0.11.2.0</FileVersion> | <FileVersion>0.11.2.0</FileVersion> | ||||