{"id":19382847,"url":"https://github.com/locuslab/monotonedbm","last_synced_at":"2025-02-24T17:14:52.659Z","repository":{"id":181028195,"uuid":"625018598","full_name":"locuslab/MonotoneDBM","owner":"locuslab","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-07T21:33:43.000Z","size":10,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-07T06:47:28.561Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/locuslab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-07T21:07:41.000Z","updated_at":"2023-09-07T18:12:35.000Z","dependencies_parsed_at":"2023-07-21T15:30:57.023Z","dependency_job_id":null,"html_url":"https://github.com/locuslab/MonotoneDBM","commit_stats":null,"previous_names":["locuslab/monotonedbm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locuslab%2FMonotoneDBM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locuslab%2FMonotoneDBM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locuslab%2FMonotoneDBM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locuslab%2FMonotoneDBM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/locuslab","download_url":"https://codeload.github.com/locuslab/MonotoneDBM/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240521052,"owners_count":19814694,"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":[],"created_at":"2024-11-10T09:23:32.736Z","updated_at":"2025-02-24T17:14:52.639Z","avatar_url":"https://github.com/locuslab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This folder includes the code for our monotone mean-field DEQ implementation.\n\n-- Required package: torch, numpy, matplotlib, tqdm\n\n-- Structure of the code: \n\t-- proxsoftmax.py includes the implementation for our prox_f^alpha for alpha between 0 and 1. Notice that one cannot set alpha=1 here.\n\t-- multitier_conv.py includes the multi-tier structure of the DEQ, in the form of convolutions (notice that even dense linear layers can be re-written as convolutions)\n\t\tThe most important arguments are \n\n\t\tsizes = [(num_classes, 28, 28, 1),\n         (40, 14, 14, 10,),\n         (80, 7, 7, 20),\n         (10, 1)]\n\n\t\tkernels = np.array([[3, 0, 0, 0],\n\t\t                    [3, 3, 0, 0],\n\t\t                    [3, 3, 3, 0],\n\t\t                    [0, 0, 1, 1]])\n\n\t\tHere 'sizes' specifies the (input_channel, input_height, input_width, input_groups) for convolutions, or (input_size, input_groups) for linear layers. 'kernels' specifies the connection and kernel sizes.\n\n\t-- deq_model.py includes the implementation for the forward-backward splitting. The most high-level class is 'ConvDeqCrf', which will be our model. \n\t-- util.py includes utility functions like data preparation.\n\t-- train_and_eval.py includes training and evaluation. \n\t-- main.py. The main entrance for running this code. One can directly run 'python -i main.py'. The variable 'num_classes' indicates the number of bins we use for discretizing the input intensity. For example, if num_classes=2 and the input \tintensity of MNIST image pixel at position (0,0) is x, then the binned output will be 0 if x\u003c0.5, and 1 otherwise.\n\t\tMON_DEFAULTS = {\n\t\t    'alpha': 0.125,\n\t\t    'tol': 1e-2,\n\t\t    'max_iter': 50\n\t\t}\n\t\tspecifies the arguments for the forward-backward splitting. 'alpha' is the alpha used in damped iteration and prox_f^alpha, 'tol' is the relative tolerance at which we stop the splitting, and 'max_iter' is the maximum number of (anderson) iterations.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocuslab%2Fmonotonedbm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocuslab%2Fmonotonedbm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocuslab%2Fmonotonedbm/lists"}