{"id":13717195,"url":"https://github.com/dmarnerides/pydlt","last_synced_at":"2026-01-04T11:10:47.370Z","repository":{"id":41207565,"uuid":"119216982","full_name":"dmarnerides/pydlt","owner":"dmarnerides","description":"PyTorch based Deep Learning Toolbox","archived":false,"fork":false,"pushed_at":"2018-07-27T11:39:46.000Z","size":2055,"stargazers_count":204,"open_issues_count":0,"forks_count":15,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-14T05:33:55.587Z","etag":null,"topics":["computer-vision","deep-learning","pytorch","toolbox"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause-clear","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmarnerides.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":"2018-01-28T01:16:03.000Z","updated_at":"2024-01-04T16:20:19.000Z","dependencies_parsed_at":"2022-08-26T04:51:09.853Z","dependency_job_id":null,"html_url":"https://github.com/dmarnerides/pydlt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarnerides%2Fpydlt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarnerides%2Fpydlt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarnerides%2Fpydlt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmarnerides%2Fpydlt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmarnerides","download_url":"https://codeload.github.com/dmarnerides/pydlt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252833376,"owners_count":21811173,"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":["computer-vision","deep-learning","pytorch","toolbox"],"created_at":"2024-08-03T00:01:19.141Z","updated_at":"2026-01-04T11:10:47.323Z","avatar_url":"https://github.com/dmarnerides.png","language":"Python","funding_links":[],"categories":["Python","Pytorch \u0026 related libraries","Pytorch \u0026 related libraries｜Pytorch \u0026 相关库"],"sub_categories":["Other libraries:","Other libraries｜其他库:"],"readme":"[![Documentation Status](https://readthedocs.org/projects/pydlt/badge/?version=latest)](http://pydlt.readthedocs.io/en/latest/?badge=latest)\n[![Build Status](https://travis-ci.org/dmarnerides/pydlt.svg?branch=master)](https://travis-ci.org/dmarnerides/pydlt)\n\n# PyTorch Deep Learning Toolbox\n\nPyDLT is a set of tools aimed to make experimenting with [PyTorch](http://pytorch.org/)\neasier (than it already is).\n\n[Full Documentation here.](http://pydlt.readthedocs.io/).\n\n## Features\n\n- **Trainers** (currently supporting *Vanilla*, *VanillaGAN*, *WGAN-GP*, *BEGAN*, *FisherGAN*)\n\n```python\ntrainer = dlt.train.VanillaGANTrainer(generator, discriminator, g_optim, d_optim)\nfor batch, (prediction, losses) in trainer(data_loader):\n    # Training happens in the iterator and relevant results are returned for each step\n```\n- Built in configurable **parser** with arguments.\n\n```python\nopt = dlt.config.parse() # Has built in options (can add extra)\nprint('Some Settings: ', opt.experiment_name, opt.batch_size, opt.lr)\n```\n\n- **Configuration files** support and parser compatible functions.\n\n```bash\n$ python main.py @settings.cfg\nSome Settings:  config_test 32 0.0001\n```\n\n- **HDR imaging** support (.hdr, .exr, and .pfm formats)\n\n```python\nimg = dlt.hdr.imread('test.pfm')\ndlt.hdr.imwrite('test.exr', img)\n```\n\n- **Checkpointing** of (torch serializable) objects; Network state dicts supported.\n\n```python\ndata_chkp = Checkpointer('data')\ndata_chkp.save(np.array([1,2,3]))\na = data_chkp.load()\n```\n\n- **Image operations** and easy conversions between multiple library views (torch, cv, plt)\n\n```python\nimg = cv2.imread('image.jpg') # Height x Width x Channels - BGR\ndlt.viz.imshow(img, view='cv')  # Height x Width x Channels - RGB\ntensor_with_torch_view = cv2torch(img) # Channels x Height x Width - RGB\n```\n\n- Easy **visualization** (and make_grid supporting Arrays, Tensors, Variables and lists)\n\n```python\nfor batch, (prediction, loss) in trainer(loader):\n    grid = dlt.util.make_grid([ batch[0], batch[1], prediction], size(3, opt.batch_size))\n    dlt.viz.imshow(grid, pause=0.01, title='Training Progress')\n```\n\n- Parameter and input/outputs/gradients **layer visualization**.\n\n```python\nnet = nn.Sequential(nn.Linear(10, 10))\ndlt.viz.modules.forward_hook(net, [nn.Linear], tag='layer_outputs', histogram=False)\nnet(Variable(torch.Tensor(3,10)))\n```\n\n- CSV **Logger**.\n\n```python\nlog = dlt.util.Logger('losses', ['train_loss', 'val_loss'])\nlog({'train_loss': 10, 'val_loss':20})\n```\n\n- Command line tool for easy **plotting** of CSV files (with live updating).\n\n```bash\n$ dlt-plot --file losses.csv train_loss val_loss --refresh 5 --loglog True --tail 100\n```\n\n- A minimal **Progress bar** (with global on/off switch).\n\n```python\nfrom dlt.util import barit\nbarit.silent = False # Default is False\nfor batch in barit(loader, start='Loading'):\n    pass\n```\n\n## Installation\n\nMake sure you have [PyTorch](http://pytorch.org/) installed. OpenCV is also required:\n\n```bash    \nconda install -c menpo opencv\n```\n\n### conda install (recommended):\n\n```bash\nconda install -c demetris pydlt\n```\n\n### From source:\n\n```bash\ngit clone https://github.com/dmarnerides/pydlt.git\ncd pydlt\npython setup.py install\n```\n\n## About\n\nI created this toolbox while learning Python and PyTorch, after working with\n(Lua) Torch, to help speed up experiment prototyping.\n\nIf you notice something is wrong or missing please do a pull request or\nopen up an issue.\n\n\n## Contact\n\nDemetris Marnerides: dmarnerides@gmail.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmarnerides%2Fpydlt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmarnerides%2Fpydlt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmarnerides%2Fpydlt/lists"}