(cfg)
| 1 | import torch |
| 2 | def build_flowformer(cfg): |
| 3 | name = cfg.transformer |
| 4 | if name == 'latentcostformer': |
| 5 | from .LatentCostFormer.transformer import FlowFormer |
| 6 | else: |
| 7 | raise ValueError(f"FlowFormer = {name} is not a valid architecture!") |
| 8 | |
| 9 | return FlowFormer(cfg[name]) |
no test coverage detected