{"id":18077558,"url":"https://github.com/rentainhe/vision-mlp-oneflow","last_synced_at":"2025-09-02T23:43:41.754Z","repository":{"id":62587549,"uuid":"385169912","full_name":"rentainhe/vision-mlp-oneflow","owner":"rentainhe","description":"Vision MLP Models Based on OneFlow","archived":false,"fork":false,"pushed_at":"2021-08-25T03:30:46.000Z","size":21,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T05:11:15.622Z","etag":null,"topics":["mlp","vision"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rentainhe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-12T08:00:49.000Z","updated_at":"2021-08-31T02:08:25.000Z","dependencies_parsed_at":"2022-11-04T07:46:02.535Z","dependency_job_id":null,"html_url":"https://github.com/rentainhe/vision-mlp-oneflow","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rentainhe%2Fvision-mlp-oneflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rentainhe%2Fvision-mlp-oneflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rentainhe%2Fvision-mlp-oneflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rentainhe%2Fvision-mlp-oneflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rentainhe","download_url":"https://codeload.github.com/rentainhe/vision-mlp-oneflow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248480485,"owners_count":21110935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mlp","vision"],"created_at":"2024-10-31T11:45:33.566Z","updated_at":"2025-04-12T10:11:58.510Z","avatar_url":"https://github.com/rentainhe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vision-mlp-oneflow\nVision MLP Models Based on OneFlow\n\n## TODO LIST\n- [x] [Mlp-Mixer]()\n- [x] [ResMLP]()\n- [x] [gMLP]()\n- [ ] [S2-MLP]()\n- [x] [Vision-Permutator]()\n\n## 复现过程中遇到的问题\n- `tensor.chunk()`方法没有和`torch.tensor.chunk()`对齐, 在输入的dim参数为负数的时候未作判断, 并且整体功能还变成了repeat操作\n- 缺少`tensor.floor_()`方法, 只能用`tensor = tensor.floor()`替代\n- 缺少`tensor.erfinv()`方法及其inplace版本, 无法复现`trunc_norm_`\n- 缺少`tensor.new_empty()`方法\n- `flow.shape`返回的是`oneflow._oneflow_internal.Size` 无法和 `tuple`相加, 按以下方法使用会报错:\n```python\n# oneflow里报错\nx = flow.tensor(np.random.randn(1, 16, 512), dtype=flow.float32)\nx.shape + (4, )\nx.size() + (4, )\n\u003e\u003e\u003eTypeError: unsupported operand type(s) for +: 'oneflow._oneflow_internal.Size' and 'tuple'\n\n# torch里不报错\nx = torch.randn(1, 16, 512)\nx.shape + (4, )\nx.size() + (4, )\n\u003e\u003e\u003e torch.Size([1, 16, 512, 4])\n```\n- `tensor.gather()`未具体判定输入的dim为负数的情况","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frentainhe%2Fvision-mlp-oneflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frentainhe%2Fvision-mlp-oneflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frentainhe%2Fvision-mlp-oneflow/lists"}