| 116 | }; |
| 117 | |
| 118 | const core::ModuleSchema kNearestUpsample2dSchema = { |
| 119 | "NearestUpsample2d", |
| 120 | "tensor.layout", |
| 121 | kSingleInput, |
| 122 | 1, |
| 123 | kSingleOutput, |
| 124 | 1, |
| 125 | "Upsamples the last two logical axes of a 4-D tensor with nearest-neighbor interpolation.", |
| 126 | }; |
| 127 | |
| 128 | const core::ModuleSchema kMaskingSchema = { |
| 129 | "Masking", |
| 130 | "tensor.layout", |
| 131 | kInputMaskInputs, |
| 132 | 2, |
| 133 | kSingleOutput, |
| 134 | 1, |
| 135 | "Applies a frame mask to zero out inactive time steps.", |
| 136 | }; |
| 137 | |
| 138 | core::TensorShape permute_shape(const core::TensorShape & input_shape, const TransposeConfig & config) { |
| 139 | if (config.rank != input_shape.rank) { |
| 140 | throw std::runtime_error("Transpose config rank does not match input rank"); |
| 141 | } |