| 165 | } |
| 166 | |
| 167 | core::TensorValue broadcast_scalar( |
| 168 | core::ModuleBuildContext & ctx, |
| 169 | const core::TensorValue & value, |
| 170 | const core::TensorValue & like) { |
| 171 | core::validate_shape(value, core::TensorShape::from_dims({1}), "Stable Audio SAME scalar"); |
| 172 | core::TensorShape shape = {}; |
| 173 | shape.rank = like.shape.rank; |
| 174 | for (size_t i = 0; i < shape.rank; ++i) { |
| 175 | shape.dims[i] = 1; |
| 176 | } |
| 177 | auto reshaped = core::reshape_tensor(ctx, value, shape); |
| 178 | return modules::RepeatModule({like.shape}).build(ctx, reshaped); |
| 179 | } |
| 180 | |
| 181 | core::TensorValue dynamic_tanh_norm( |
| 182 | core::ModuleBuildContext & ctx, |
no test coverage detected