{"id":18859883,"url":"https://github.com/shahardekel/mnist-classifier","last_synced_at":"2026-02-08T17:30:17.516Z","repository":{"id":192379511,"uuid":"325510065","full_name":"shahardekel/MNIST-Classifier","owner":"shahardekel","description":"MNIST Classifier on Python- using only Torch Tensor manipulations","archived":false,"fork":false,"pushed_at":"2020-12-30T09:48:26.000Z","size":249,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-30T20:15:53.192Z","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/shahardekel.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}},"created_at":"2020-12-30T09:34:17.000Z","updated_at":"2020-12-30T09:48:28.000Z","dependencies_parsed_at":"2023-09-04T15:07:49.940Z","dependency_job_id":null,"html_url":"https://github.com/shahardekel/MNIST-Classifier","commit_stats":null,"previous_names":["shahardekel/mnist-classifier"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahardekel%2FMNIST-Classifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahardekel%2FMNIST-Classifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahardekel%2FMNIST-Classifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahardekel%2FMNIST-Classifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shahardekel","download_url":"https://codeload.github.com/shahardekel/MNIST-Classifier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239800488,"owners_count":19699127,"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-08T04:19:35.437Z","updated_at":"2026-02-08T17:30:15.446Z","avatar_url":"https://github.com/shahardekel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MNIST-Classifier\nMNIST Classifier on Python- using only Torch Tensor manipulations.\nNOT allowed to use:\n○ Auto-differentiation - backward()\n○ Built-in loss functions\n○ Built-in activations\n○ Built-in optimization\n○ Built-in layers (torch.nn)\n\nObtained at least 75% accuracy on the test set (got 92%).\n\nInside the train file is the MNIST training process.\nWe got an input of 784 (28 pixels * 28 pixels), the training worked best for us with 1 hidden layer in size 64,\nbatch size of 100, learning rate = 1 and with 50 epochs.\n\nWe first set up a net with weights and biases (according to the size of the hidden layer).\nWe started the forward process where we used sigmoid on the hidden layer and softmax on the result.\n\nNext, we performed the backward process, using the gradients we calculated in the theoretical part and the predicted\nvalues from the forward phase.\nIn the backward process we tried to learn with learning rate = 0.001, then with 0.01 and in the end we got\nthe best result with learning rate = 1.\nTo know the percentage of accuracy on the net, we performed a loop that goes through each epoch\n(at first we tried sizes 10, 30 and in the end we got the best result with a size of 50).\nFor each epoch we calculated whether we were right in our prediction.\n\nIn the evaluate file we performed the same process, on the test set.\n\nAt the end we printed the average accuracy on the test set and two graphs describing the accuracy\nof the sets in relation to the time (the epochs).\n\nHyperparameters: \ninput_size = 784 \nhidden_size = 64 \nnum_classes = 10 \nnum_epochs = 50 \nbatch_size = 100 \nlearning_rate = 1\n\nFiles Description:\n1. train.py - The MNIST training process\n2. model.pkl - The trained network with trained weights\n3. eval.py - A file with a function called \"evaluate()\". The function load the MNIST test-set, load our trained network, and return the average accuracy over the test-set.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahardekel%2Fmnist-classifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshahardekel%2Fmnist-classifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahardekel%2Fmnist-classifier/lists"}