{ "info": { "author": "Mikhail Romanov", "author_email": "romanov.michael.v@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "\n# Scorch: utilities for network training with PyTorch\n\nThis package is a set of codes that may be reused quite often\nfor different networks trainings.\n\n## Prerequisites\n\nYou will need Python 3 to use this package.\n\nYou will need the following packages installed:\n\n* pytorch\n* numpy\n* scikit-image\n* scikit-learn\n\nTo use the notebooks for testing the model and the dataset you\nwill need Jupyter Notebook or JupyterLab installed.\n\n## Usage\n\nHere is the minimal command to run to train the model specified in MODEL_FILE with a\ndataset specified in DATASET_FILE, the data is located in the DATASET_PATH.\n\n```\npython train.py --model MODEL_FILE --dataset DATASET_FILE --dataset-path DATASET_PATH\n```\n\nHere is a list of parameters of the script (it will be soon updated):\n\n```\n -b BATCH_SIZE, --batch-size BATCH_SIZE\n Batch size to train or validate your model\n -w WORKERS, --workers WORKERS\n Number of workers in a dataloader\n --pretraining Pretraining mode\n -lr LEARNING_RATE, --learning-rate LEARNING_RATE\n Learning rate\n -d DUMP_PERIOD, --dump-period DUMP_PERIOD\n Dump period\n -e EPOCHS, --epochs EPOCHS\n Number of epochs to perform\n -c CHECKPOINT, --checkpoint CHECKPOINT\n Checkpoint to load from\n --use-cuda Use cuda for training\n --validate-on-train Flag showing that you want to perform validation on training dataset \n along with the validation on the validation set\n\n --model MODEL File with a model specification\n --dataset DATASET File with a dataset sepcification\n --max-train-iterations MAX_TRAIN_ITERATIONS\n Maximum training iterations\n --max-valid-iterations MAX_VALID_ITERATIONS\n Maximum validation iterations\n -dp DATASET_PATH, --dataset-path DATASET_PATH\n Path to the dataset\n -v VERBOSITY, --verbosity VERBOSITY\n -1 for no output, 0 for epoch output, positive number\n is printout frequency during the training\n -cp CHECKPOINT_PREFIX, --checkpoint-prefix CHECKPOINT_PREFIX\n Prefix to the checkpoint name\n\n```\n\n## Model module syntax\n\nThe syntax for the model file is the following:\n\n```python\nclass Network(torch.nn.Module):\n def __init__(self):\n super(Network, self).__init__()\n pass\n\n def forward(self, input):\n return [output1, output2]\n\n def __call__(self, input):\n return self.forward(input)\n\nclass Socket:\n def __init__(self, model):\n self.model = model\n\n def criterion(self, pred, target):\n pass\n\n def metrics(self, pred, target):\n pass\n```\n\nThe requirements are as follows:\n* Network should have (obviously) the constructor\n* Network should have forward function which:\n * Takes as input a **list** of inputs.\n * Outputs a **list** of outputs.\n* There should be also the ```__call__``` function specified that is a proxy for the forward function.\n* There should be a ```Socket``` class defined in order to specify how to handle the model, it should contain:\n * ```criterion``` method that takes as inputs a **list** of tensors with predictions and a **list** of tensors with targets. The output should be a number.\n * ```metrics``` method that specifies the metrics which are of the interest for your experiment. It should take as inputs a list of tensors with predictions and a list of tensors with targets and return a list of metrics which.\n\nThe reason there are lists everywhere is the following: the network may have more than one input and more than one output. We have to deal with this fact smart enough to reuse the code. Thus, the best way to do things is to pass the values of interests in lists.\n\n## Dataset module syntax\n\nHere is a syntax for the Dataset module:\n\n```python\nclass DataSetIndex():\n def __init__(self, path):\n pass\n\nclass DataSet():\n def __init__(self, ds_index, mode='train'):\n self.ds_index = ds_index\n\n def __len__(self):\n if self.mode == 'test':\n pass\n\n elif self.mode == 'valid':\n pass\n\n else:\n pass\n\n\n def __getitem__(self, index):\n img = None\n target = None\n\n if self.mode == 'test':\n pass\n\n elif self.mode == 'valid':\n pass\n\n else:\n pass\n\n return [img1, img2], [target1, target2]\n```\n\nThe dataset script should have at least the class DataSet which should have the following specified:\n\n* ```__init__```, the constructor that defines all three parts of the dataset. The mode of the dataset should be defined here.\n* ```__len__``` function that returns the length of the dataset\n* ```__getitem__``` function that returns a list of input tensors and a list of target tensors\n\nAlthough it is enough to have only the DataSet specified, it is recommended to specify also the DataSetIndex class that contains the information about the dataset's data. It is recommended to share one instance of the DataSetIndex between all the instances of the DataSet with different modes to avoid doubling or tripling the memory used to store this index and also to avoid collecting the dataset index several times.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/RomanovMikeV/scorch", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pytorch-scorch", "package_url": "https://pypi.org/project/pytorch-scorch/", "platform": "", "project_url": "https://pypi.org/project/pytorch-scorch/", "project_urls": { "Homepage": "https://github.com/RomanovMikeV/scorch" }, "release_url": "https://pypi.org/project/pytorch-scorch/0.0.7/", "requires_dist": null, "requires_python": "", "summary": "A set of scripts to make the Neural Network training with pytorch faster", "version": "0.0.7" }, "last_serial": 4094847, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9b44f1d41aec5995a50d94b24afcae59", "sha256": "e22ef2ce9ce15e7ff6286a63aff8a033da4625a41cdaddd5e62bb5522e4f477c" }, "downloads": -1, "filename": "pytorch_scorch-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "9b44f1d41aec5995a50d94b24afcae59", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3149, "upload_time": "2018-07-22T12:29:57", "url": "https://files.pythonhosted.org/packages/32/09/467248307e4f1e3d3b6a15581daf04b0b35b728a39b42bcbffb76ff464a5/pytorch_scorch-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0f21c9de1bef9b1341d91e550f97ceb3", "sha256": "fd0ad1b73ce157be9cad10f52faf9bde181c72ea7093726fe6030c040aae3ccd" }, "downloads": -1, "filename": "pytorch-scorch-0.0.1.tar.gz", "has_sig": false, "md5_digest": "0f21c9de1bef9b1341d91e550f97ceb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3378, "upload_time": "2018-07-22T12:29:58", "url": "https://files.pythonhosted.org/packages/ee/33/0dcd7916a7ff0002567da8ba386ee27fd1cb385d32e760042fce55b98036/pytorch-scorch-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "568a2816ff3061931fc17b48f9e2f563", "sha256": "c59b564322c742d8e59dc7e170a0b605b5480bcdbd368e03314876b3e0bde79c" }, "downloads": -1, "filename": "pytorch_scorch-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "568a2816ff3061931fc17b48f9e2f563", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3413, "upload_time": "2018-07-22T19:29:01", "url": "https://files.pythonhosted.org/packages/e0/fb/3f562e726004e2408dea9ad1cc40bf072ce4ed04b7509bb6320b3699c863/pytorch_scorch-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a7b688b5371fd3ab7d63af9c5bf35f4a", "sha256": "abdd4049bdc87fcb0bd3d09faa2c13bcbecc6ab637ee118ae4547a68518d9322" }, "downloads": -1, "filename": "pytorch-scorch-0.0.2.tar.gz", "has_sig": false, "md5_digest": "a7b688b5371fd3ab7d63af9c5bf35f4a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3474, "upload_time": "2018-07-22T19:29:03", "url": "https://files.pythonhosted.org/packages/fe/9e/346a5f1b8639154767888a0d98cc04fcd8c1a88c60c787b29d1f484f7cf2/pytorch-scorch-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "171ed356ff4552be6fbf0ae94ec18b89", "sha256": "334ebcd6c1466a729a954e1f43b219d7ae503bf12497b451e0561fdd1e1a9dc5" }, "downloads": -1, "filename": "pytorch_scorch-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "171ed356ff4552be6fbf0ae94ec18b89", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17677, "upload_time": "2018-07-22T21:45:30", "url": "https://files.pythonhosted.org/packages/b8/19/f5ce0355daa9bb604c36ea93d57b796f11165e0341eaf841eb33f0677582/pytorch_scorch-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9e840927890453305709f5f3c5b3597c", "sha256": "033d27c042af27cf1d7f14d282cecab65e11322be04bcaa192066a14275cb8f9" }, "downloads": -1, "filename": "pytorch-scorch-0.0.3.tar.gz", "has_sig": false, "md5_digest": "9e840927890453305709f5f3c5b3597c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18534, "upload_time": "2018-07-22T21:45:32", "url": "https://files.pythonhosted.org/packages/ba/77/f24e7713c4b91add0c414c4be98fa4888712ab8e345d1692517843fded47/pytorch-scorch-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "e5950d23599dc964bb2f2e924d63f268", "sha256": "fe4707af5bec022aefad66ab15d54c4b022b1917f015cabbe337048f61e465ea" }, "downloads": -1, "filename": "pytorch_scorch-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "e5950d23599dc964bb2f2e924d63f268", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17683, "upload_time": "2018-07-22T21:59:27", "url": "https://files.pythonhosted.org/packages/da/53/3e5bdbc0e1cd66eac7efa1465b3522870f9595d40689e0183df4125a01ee/pytorch_scorch-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "73e8e78a3692289501dd6995091b6aee", "sha256": "7628e760704b9f5bd21643000f4d0c70572522add4ab83b25838eaabe23d2c81" }, "downloads": -1, "filename": "pytorch-scorch-0.0.4.tar.gz", "has_sig": false, "md5_digest": "73e8e78a3692289501dd6995091b6aee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18539, "upload_time": "2018-07-22T21:59:30", "url": "https://files.pythonhosted.org/packages/90/2a/f9ff074f7ee9ae5e270f949b05667d48c0a32a5d0bfd73d76c1c7ddd804b/pytorch-scorch-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "1c5dac2d2604d279ab337252ca034524", "sha256": "07f8477e0f4715bb95253319fa676e1796bdad85e1a30cfe716920ef4d69547b" }, "downloads": -1, "filename": "pytorch_scorch-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "1c5dac2d2604d279ab337252ca034524", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17686, "upload_time": "2018-07-23T21:05:25", "url": "https://files.pythonhosted.org/packages/60/bd/cc94e0ffb4c275ff05ab690d13e51bea7addef12d045ef3eba9a33061c8c/pytorch_scorch-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a1d745ed10bc006a2ee2ae0c7424e360", "sha256": "3ce7726e926c631de1c60612090dca3530df35d0e3adfc711ec8f6c0e2d7e704" }, "downloads": -1, "filename": "pytorch-scorch-0.0.5.tar.gz", "has_sig": false, "md5_digest": "a1d745ed10bc006a2ee2ae0c7424e360", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18548, "upload_time": "2018-07-23T21:05:27", "url": "https://files.pythonhosted.org/packages/31/66/95e1aa7dad151bf8a159b8bfc0bca535dfc202a59a8af8838c3c9f479e9d/pytorch-scorch-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "c2a01553d99fdd8c3cb2622579b66e36", "sha256": "3aae4ab7ee22178424e062e79862ab625d76d1786bf3d9ca4eff03d841db0732" }, "downloads": -1, "filename": "pytorch_scorch-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "c2a01553d99fdd8c3cb2622579b66e36", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17691, "upload_time": "2018-07-23T21:13:04", "url": "https://files.pythonhosted.org/packages/f2/38/902f767fce73414ebda51c28b90ea94dc96711d05b5010b26e504b5c4d2f/pytorch_scorch-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ff9473d1111d045b00d3628819f41a75", "sha256": "f8791d718f854fb3010de3bcef308b4b7d577272d969d796c5c91868494c4b1b" }, "downloads": -1, "filename": "pytorch-scorch-0.0.6.tar.gz", "has_sig": false, "md5_digest": "ff9473d1111d045b00d3628819f41a75", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18553, "upload_time": "2018-07-23T21:13:06", "url": "https://files.pythonhosted.org/packages/b6/28/afb64554fb17bbc9377b8139bcebd0c94140b1bc98f7bfb92d134afa0ec1/pytorch-scorch-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "07e998a6fd7fdba54475ac7f50ad0c26", "sha256": "6a2136a9302a4a19d7ab9be5528e283b7610490f3371c31ec3ab09dd6e316646" }, "downloads": -1, "filename": "pytorch_scorch-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "07e998a6fd7fdba54475ac7f50ad0c26", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17693, "upload_time": "2018-07-23T21:22:16", "url": "https://files.pythonhosted.org/packages/ab/b9/42250110fdecb7c6d54ba4f89a44830b101e3dd6383d17b71fea30cd1023/pytorch_scorch-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "50af32c02f9d933b6a18f022bff7758d", "sha256": "a6591ee73f875f87418f097845f5d8bdab08549d89ff220e1624febdbbacf765" }, "downloads": -1, "filename": "pytorch-scorch-0.0.7.tar.gz", "has_sig": false, "md5_digest": "50af32c02f9d933b6a18f022bff7758d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18546, "upload_time": "2018-07-23T21:22:20", "url": "https://files.pythonhosted.org/packages/a0/4d/93d239f83df6a76c6e06bc850b0e5b9c62b92b7acec1d48a05a4071da150/pytorch-scorch-0.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "07e998a6fd7fdba54475ac7f50ad0c26", "sha256": "6a2136a9302a4a19d7ab9be5528e283b7610490f3371c31ec3ab09dd6e316646" }, "downloads": -1, "filename": "pytorch_scorch-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "07e998a6fd7fdba54475ac7f50ad0c26", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17693, "upload_time": "2018-07-23T21:22:16", "url": "https://files.pythonhosted.org/packages/ab/b9/42250110fdecb7c6d54ba4f89a44830b101e3dd6383d17b71fea30cd1023/pytorch_scorch-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "50af32c02f9d933b6a18f022bff7758d", "sha256": "a6591ee73f875f87418f097845f5d8bdab08549d89ff220e1624febdbbacf765" }, "downloads": -1, "filename": "pytorch-scorch-0.0.7.tar.gz", "has_sig": false, "md5_digest": "50af32c02f9d933b6a18f022bff7758d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18546, "upload_time": "2018-07-23T21:22:20", "url": "https://files.pythonhosted.org/packages/a0/4d/93d239f83df6a76c6e06bc850b0e5b9c62b92b7acec1d48a05a4071da150/pytorch-scorch-0.0.7.tar.gz" } ] }