Browse Source

fix build

pull/603/head
carb0n 5 years ago
parent
commit
e46d07c4a7
4 changed files with 27 additions and 10 deletions
  1. +6
    -0
      src/TensorFlowNET.Core/Operations/gen_image_ops.cs
  2. +4
    -4
      src/TensorFlowNET.Core/Operations/gen_math_ops.cs
  3. +12
    -1
      src/TensorFlowNET.Core/Operations/gen_ops.cs
  4. +5
    -5
      src/TensorFlowNET.Core/Operations/image_ops_impl.cs

+ 6
- 0
src/TensorFlowNET.Core/Operations/gen_image_ops.cs View File

@@ -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)


+ 4
- 4
src/TensorFlowNET.Core/Operations/gen_math_ops.cs View File

@@ -1086,9 +1086,9 @@ namespace Tensorflow
public static Tensor pow<Tx, Ty>(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];
}
}
}
}

+ 12
- 1
src/TensorFlowNET.Core/Operations/gen_ops.cs View File

@@ -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("");
}

/// <summary>
/// PNG-encode an image.
/// </summary>
@@ -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");
}

/// <summary>
/// Outputs a <c>Summary</c> protocol buffer with scalar values.
/// </summary>


+ 5
- 5
src/TensorFlowNET.Core/Operations/image_ops_impl.cs View File

@@ -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);
});
}



Loading…
Cancel
Save