|
6 | 6 |
|
7 | 7 | namespace Tensorflow.Keras.Layers { |
8 | 8 | public partial class LayersApi { |
9 | | - /// <summary> |
10 | | - /// Zero-padding layer for 2D input (e.g. picture). |
11 | | - /// </summary> |
12 | | - /// <param name="padding"></param> |
13 | | - /// <returns></returns> |
14 | | - public ILayer ZeroPadding2D ( NDArray padding ) |
| 9 | + |
| 10 | + /// <summary> |
| 11 | + /// Upsampling layer for 1D inputs. Repeats each temporal step `size` times along the time axis. |
| 12 | + /// </summary> |
| 13 | + /// <param name="size"></param> |
| 14 | + /// <returns></returns> |
| 15 | + public ILayer UpSampling1D(int size) |
| 16 | + => new UpSampling1D(new UpSampling1DArgs |
| 17 | + { |
| 18 | + Size = size |
| 19 | + }); |
| 20 | + |
| 21 | + /// <summary> |
| 22 | + /// Zero-padding layer for 2D input (e.g. picture). |
| 23 | + /// </summary> |
| 24 | + /// <param name="padding"></param> |
| 25 | + /// <returns></returns> |
| 26 | + public ILayer ZeroPadding2D ( NDArray padding ) |
15 | 27 | => new ZeroPadding2D(new ZeroPadding2DArgs { |
16 | 28 | Padding = padding |
17 | 29 | }); |
18 | 30 |
|
19 | | - /// <summary> |
20 | | - /// Upsampling layer for 2D inputs.<br/> |
21 | | - /// Repeats the rows and columns of the data by size[0] and size[1] respectively. |
22 | | - /// </summary> |
23 | | - /// <param name="size"></param> |
24 | | - /// <param name="data_format"></param> |
25 | | - /// <param name="interpolation"></param> |
26 | | - /// <returns></returns> |
27 | | - public ILayer UpSampling2D ( Shape size = null, |
28 | | - string data_format = null, |
29 | | - string interpolation = "nearest" ) |
30 | | - => new UpSampling2D(new UpSampling2DArgs { |
31 | | - Size = size ?? (2, 2) |
32 | | - }); |
| 31 | + /// <summary> |
| 32 | + /// Upsampling layer for 2D inputs.<br/> |
| 33 | + /// Repeats the rows and columns of the data by size[0] and size[1] respectively. |
| 34 | + /// </summary> |
| 35 | + /// <param name="size"></param> |
| 36 | + /// <param name="data_format"></param> |
| 37 | + /// <param name="interpolation"></param> |
| 38 | + /// <returns></returns> |
| 39 | + public ILayer UpSampling2D(Shape size, string data_format, string interpolation) |
| 40 | + => new UpSampling2D(new UpSampling2DArgs |
| 41 | + { |
| 42 | + Size = size, |
| 43 | + DataFormat = data_format, |
| 44 | + Interpolation = interpolation |
| 45 | + }); |
33 | 46 |
|
34 | | - /// <summary> |
35 | | - /// Permutes the dimensions of the input according to a given pattern. |
36 | | - /// </summary> |
37 | | - public ILayer Permute ( int[] dims ) |
| 47 | + /// <summary> |
| 48 | + /// Permutes the dimensions of the input according to a given pattern. |
| 49 | + /// </summary> |
| 50 | + public ILayer Permute ( int[] dims ) |
38 | 51 | => new Permute(new PermuteArgs { |
39 | 52 | dims = dims |
40 | 53 | }); |
|
0 commit comments