diff --git a/src/TensorFlowNET.Core/Operations/gen_image_ops.cs b/src/TensorFlowNET.Core/Operations/gen_image_ops.cs index 0775f736..5b5e3ad4 100644 --- a/src/TensorFlowNET.Core/Operations/gen_image_ops.cs +++ b/src/TensorFlowNET.Core/Operations/gen_image_ops.cs @@ -21,6 +21,12 @@ namespace Tensorflow { public class gen_image_ops { + public static (Tensor, Tensor, Tensor, Tensor) combined_non_max_suppression(Tensor boxes, Tensor scores, Tensor max_output_size_per_class, Tensor max_total_size, + Tensor iou_threshold, Tensor score_threshold, bool pad_per_class, bool clip_boxes) + { + throw new NotImplementedException("combined_non_max_suppression"); + } + public static Tensor convert_image_dtype(Tensor image, TF_DataType dtype, bool saturate = false, string name= null) { if (dtype == image.dtype) diff --git a/src/TensorFlowNET.Core/Operations/gen_math_ops.cs b/src/TensorFlowNET.Core/Operations/gen_math_ops.cs index f844f2ca..1c27cb1d 100644 --- a/src/TensorFlowNET.Core/Operations/gen_math_ops.cs +++ b/src/TensorFlowNET.Core/Operations/gen_math_ops.cs @@ -1086,9 +1086,9 @@ namespace Tensorflow public static Tensor pow(Tx x, Ty y, string name = null) { - if (tf.context.executing_eagerly()) + if (tf.Context.executing_eagerly()) { - var results = tf.Runner.TFE_FastPathExecute(tf.context, tf.context.device_name, + var results = tf.Runner.TFE_FastPathExecute(tf.Context, tf.Context.DeviceName, "Pow", name, null, x, y); @@ -1096,7 +1096,7 @@ namespace Tensorflow return results[0]; } - var _op = tf._op_def_lib._apply_op_helper("Pow", name, args: new { x, y }); + var _op = tf.OpDefLib._apply_op_helper("Pow", name, args: new { x, y }); return _op.outputs[0]; } @@ -1214,4 +1214,4 @@ namespace Tensorflow return _op.outputs[0]; } } -} +} \ No newline at end of file diff --git a/src/TensorFlowNET.Core/Operations/gen_ops.cs b/src/TensorFlowNET.Core/Operations/gen_ops.cs index 98e61957..a2935b59 100644 --- a/src/TensorFlowNET.Core/Operations/gen_ops.cs +++ b/src/TensorFlowNET.Core/Operations/gen_ops.cs @@ -1,4 +1,5 @@ -using System.Linq; +using System; +using System.Linq; using System.Collections.Generic; using static Tensorflow.Binding; @@ -9881,6 +9882,11 @@ namespace Tensorflow.Operations return op.output; } + public static Tensor encode_jpeg_variable_quality(Tensor image, Tensor quality) + { + throw new NotImplementedException(""); + } + /// /// PNG-encode an image. /// @@ -28061,6 +28067,11 @@ namespace Tensorflow.Operations return op; } + public static Tensor scale_and_translate (Tensor images_t, Tensor new_size, Tensor[] scale, Tensor zeroes, string kernel_type, bool antialias) + { + throw new NotImplementedException("scale_and_translate"); + } + /// /// Outputs a Summary protocol buffer with scalar values. /// diff --git a/src/TensorFlowNET.Core/Operations/image_ops_impl.cs b/src/TensorFlowNET.Core/Operations/image_ops_impl.cs index 42795dbc..dc3c0985 100644 --- a/src/TensorFlowNET.Core/Operations/image_ops_impl.cs +++ b/src/TensorFlowNET.Core/Operations/image_ops_impl.cs @@ -337,7 +337,7 @@ or rank = 4. Had rank = {0}", rank)); object hd, bbox_h_start; if ((bool)h[1]) { - hd = math_ops.cast(h[0], dtypes.float64); + hd = math_ops.cast((IVariableV1)h[0], dtypes.float64); bbox_h_start = math_ops.cast(((int)hd - (int)hd * central_fraction) / 2, dtypes.int32); } else { @@ -348,7 +348,7 @@ or rank = 4. Had rank = {0}", rank)); object wd, bbox_w_start; if ((bool)w[1]) { - wd = math_ops.cast((RefVariable)w[0], dtypes.float64); + wd = math_ops.cast((IVariableV1)w[0], dtypes.float64); bbox_w_start = math_ops.cast(((int)wd - (int)wd * central_fraction) / 2, dtypes.int32); } else { @@ -1743,7 +1743,7 @@ new_height, new_width"); public static Tensor crop_and_resize(Tensor image, Tensor boxes, Tensor box_ind, Tensor crop_size, string method, float extrapolation_value, string name) { - var _op = tf._op_def_lib._apply_op_helper("CropAndResize", name: name, args: new + var _op = tf.OpDefLib._apply_op_helper("CropAndResize", name: name, args: new { image, boxes, @@ -1780,8 +1780,8 @@ new_height, new_width"); Tensor score_threshold_tensor = ops.convert_to_tensor( score_threshold, dtype: dtypes.float32, name: "score_threshold"); return gen_image_ops.combined_non_max_suppression( - boxes, scores, max_output_size_per_class, max_total_size, iou_threshold, - score_threshold, pad_per_class, clip_boxes); + boxes, scores, max_output_size_per_class, max_total_size, iou_threshold_tensor, + score_threshold_tensor, pad_per_class, clip_boxes); }); }