| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 80e5e18 commit 67a7fc5
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -100,6 +100,10 @@ public static bool Equals(Shape shape, object target) | |||
| 100 | 100 | if (shape.ndim != shape2.Length) | |
| 101 | 101 | return false; | |
| 102 | 102 | return Enumerable.SequenceEqual(shape.dims, shape2); | |
| 103 | + case int[] shape3: | ||
| 104 | + if (shape.ndim != shape3.Length) | ||
| 105 | + return false; | ||
| 106 | + return Enumerable.SequenceEqual(shape.as_int_list(), shape3); | ||
| 103 | 107 | default: | |
| 104 | 108 | return false; | |
| 105 | 109 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -347,19 +347,21 @@ public Tensor conv2d_transpose(Tensor x, | |||
| 347 | 347 | string data_format = null, | |
| 348 | 348 | Shape dilation_rate = null) | |
| 349 | 349 | { | |
| 350 | + /* | ||
| 350 | 351 | var force_transpose = false; | |
| 351 | 352 | if (data_format == "channels_first" && !dilation_rate.Equals(new[] { 1, 1 })) | |
| 352 | 353 | force_transpose = true; | |
| 353 | - // x, tf_data_format = _preprocess_conv2d_input(x, data_format, force_transpose) | ||
| 354 | + x, tf_data_format = _preprocess_conv2d_input(x, data_format, force_transpose) | ||
| 355 | + */ | ||
| 354 | 356 | var tf_data_format = "NHWC"; | |
| 355 | 357 | padding = padding.ToUpper(); | |
| 356 | 358 | strides = new Shape(1, strides[0], strides[1], 1); | |
| 357 | - if (dilation_rate.Equals(new long[] { 1, 1 })) | ||
| 359 | + if (dilation_rate.Equals(new[] { 1, 1 })) | ||
| 358 | 360 | x = nn_impl.conv2d_transpose(x, kernel, output_shape, strides, | |
| 359 | 361 | padding: padding, | |
| 360 | 362 | data_format: tf_data_format); | |
| 361 | 363 | else | |
| 362 | - throw new NotImplementedException(""); | ||
| 364 | + throw new NotImplementedException("dilation_rate other than [1,1] is not yet supported"); | ||
| 363 | 365 | ||
| 364 | 366 | return x; | |
| 365 | 367 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments