Skip to content

Commit dcd06e7

Browse files
hcurOceania2018
authored andcommitted
fix something else
1 parent f8da3b9 commit dcd06e7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/TensorFlowNET.Core/Operations/image_ops_impl.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ Tensor _rot270() {
269269
new [] {math_ops.equal(k, 2), _rot180()},
270270
new [] {math_ops.equal(k, 3), _rot270()}};
271271

272+
// ! control_flow_ops doesn't have an implementation for case yet !
272273
// var result = control_flow_ops.case(cases, default: () => image, exclusive: true, name: name_scope);
273274
// result.set_shape(new [] {null, null, image.shape.dims[2]})
274275
// return result
@@ -336,7 +337,7 @@ object[] _get_dim(Tensor tensor, int idx) {
336337
object hd, bbox_h_start;
337338
if ((bool)h[1])
338339
{
339-
hd = math_ops.cast(h[0] as RefVariable, dtypes.float64);
340+
hd = math_ops.cast(h[0], dtypes.float64);
340341
bbox_h_start = math_ops.cast(((int)hd - (int)hd * central_fraction) / 2, dtypes.int32);
341342
} else
342343
{
@@ -347,7 +348,7 @@ object[] _get_dim(Tensor tensor, int idx) {
347348
object wd, bbox_w_start;
348349
if ((bool)w[1])
349350
{
350-
wd = math_ops.cast(w[0] as RefVariable, dtypes.float64);
351+
wd = math_ops.cast((RefVariable)w[0], dtypes.float64);
351352
bbox_w_start = math_ops.cast(((int)wd - (int)wd * central_fraction) / 2, dtypes.int32);
352353
} else
353354
{

0 commit comments

Comments
 (0)