| 600 | } |
| 601 | |
| 602 | core::TensorValue graph_feed_forward( |
| 603 | core::ModuleBuildContext & ctx, |
| 604 | const core::TensorValue & x, |
| 605 | const std::unordered_map<std::string, Param> & params, |
| 606 | const std::string & prefix, |
| 607 | const std::string & which, |
| 608 | int64_t hidden) { |
| 609 | const std::string base = prefix + "." + which; |
| 610 | auto y = graph_linear(ctx, x, params, base + ".in_proj", hidden); |
| 611 | y = graph_swoosh_l(ctx, y); |
| 612 | return graph_linear(ctx, y, params, base + ".out_proj", kDense); |
| 613 | } |
| 614 | |
| 615 | core::TensorValue graph_nonlin_attention( |
| 616 | core::ModuleBuildContext & ctx, |
no test coverage detected