| 60 | } |
| 61 | |
| 62 | MergeBlockImpl::MergeBlockImpl(std::string policy){ |
| 63 | if(policy!=policies[0] && policy!=policies[1]){ |
| 64 | std::cout<< "`merge_policy` must be one of: ['add', 'cat'], got "+policy; |
| 65 | } |
| 66 | _policy = policy; |
| 67 | } |
| 68 | |
| 69 | torch::Tensor MergeBlockImpl::forward(std::vector<torch::Tensor> x){ |
| 70 | if(_policy=="add") return sumTensor(x); |
nothing calls this directly
no outgoing calls
no test coverage detected