| 499 | } |
| 500 | |
| 501 | core::TensorValue graph_bypass( |
| 502 | core::ModuleBuildContext & ctx, |
| 503 | const core::TensorValue & orig, |
| 504 | const core::TensorValue & x, |
| 505 | const Param & scale) { |
| 506 | auto scale_rep = graph_broadcast_channel_scale(ctx, scale.tensor, orig); |
| 507 | auto delta = graph_sub(ctx, x, orig); |
| 508 | return graph_add(ctx, orig, graph_mul(ctx, delta, scale_rep)); |
| 509 | } |
| 510 | |
| 511 | std::vector<float> precompute_relative_projection( |
| 512 | int64_t seq, |
no test coverage detected