{"id":19603903,"url":"https://github.com/divelab/vgg","last_synced_at":"2026-02-09T14:35:58.019Z","repository":{"id":77868689,"uuid":"102142771","full_name":"divelab/vgg","owner":"divelab","description":"Implementation of VGG","archived":false,"fork":false,"pushed_at":"2018-08-30T17:41:10.000Z","size":23243,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-03T17:54:59.593Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/divelab.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-01T18:40:09.000Z","updated_at":"2024-05-22T20:10:12.000Z","dependencies_parsed_at":"2023-03-25T01:05:52.710Z","dependency_job_id":null,"html_url":"https://github.com/divelab/vgg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/divelab/vgg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divelab%2Fvgg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divelab%2Fvgg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divelab%2Fvgg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divelab%2Fvgg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divelab","download_url":"https://codeload.github.com/divelab/vgg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divelab%2Fvgg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29269036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T13:47:44.167Z","status":"ssl_error","status_checked_at":"2026-02-09T13:47:43.721Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11T09:33:34.587Z","updated_at":"2026-02-09T14:35:58.005Z","avatar_url":"https://github.com/divelab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VGG Networks\n\nThis is the first tutorial project for new students in our DIVE lab. The whole project includes two parts. If you finish this one earlier, you can ask for the second one.\n\nCreated by [Hongyang Gao](http://eecs.wsu.edu/~hgao/), [Lei Cai](http://www.eecs.wsu.edu/~lcai/), [Zhengyang Wang](http://www.eecs.wsu.edu/~zwang6/) and [Shuiwang Ji](http://www.eecs.wsu.edu/~sji/) at Texas A\u0026M University.\n\n## Introduction\n\nThe project aims to help you learn basic convolutional neural networks and study how to use our servers for implementing them. It is based on a real-world dataset named CIFAR-10, which includes images with 10-class labels. You will use CNNs to do image classification task. This repository includes tensorflow code of the VGG networks along with data processing utils.\n\nYou are supposed to complete all the requirements and do a presentation by the end of September. In the presentation, you should demonstrate your learning process and will be questioned about your understanding by others.\n\nDuring the project, you should at least study the first half of the popular [CS231n](http://cs231n.stanford.edu/) course on your own.\n\nIt is not an easy project for starters. Feel free to ask any of us for help. Good luck!\n\n## Project requirements\n\n1. Setup your account on the servers. Each of you will use one GPU on the DIVE1 server for this project.\n\n- Build your own Python environment with tensorflow(GPU) and other packages installed according to the system requirement. Since you do not have the admin access to the server, this step is necessary. I suggest you build your environment under the tempspace folders so later you can directly use it on the other two servers.\n\n- Download this repository to your folder on the server. If you are familiar with Github, you can use the git commands. But this is not mandatory.\n\n2. Download the CIFAR-10 dataset. As only the training subset and the validation subset are available, you should use the validation subset as the testing set. For development/validation, divide the training set into a new training set and a validation set. The testing set is used only in testing and must not be used in any step of training. You will always report the performance on the testing set.\n\n- To develop a good habit, organize all your folders with appropriate names.\n\n- The data link is provided in cifar_util.py. You can try the code in cifar_util.py or download manually.\n\n- As the code will read h5 files as input, you should pre-process the dataset into h5 files. The h5 files in the dataset folder are just samples for testing the code. You must do this step by yourself. Refer to the code in cifar_util.py as an example.\n\n- (Optional) The h5 files will be directly fed into the neural networks. You can explore data augmentation and normalization when you generate the h5 files. These techniques will help improve the performance of the models.\n\n3. Run the VGG networks.\n\n- Read all the code and make sure that you understand it thoroughly. You will be asked questions about every detail in your presentation.\n\n- Read the next section for how to configure the network. Note that the default setting is not fully correct. For example, the valid_data should not be the same as test_data.\n\n- Run the code, change hyperparameters for training and testing and report your results. Use tensorboard for development. \n\n- Run testing/prediction. The higher the testing accuracy is, the better!\n\n4. (Optional) Explore other convolutional neural networks for this image classification task.\n\n- Try the famous ResNet and report the performance. You can find code for ResNet online. But be prepared for questions about every piece of code that you use.\n\n5. Presentation. You are not required to write a report.\n\n- Show how you do every step.\n\n- Report your results.\n\n- Q\u0026A.\n\n## System requirement\n\n#### Programming language\nPython 3.5+\n\n#### Python Packages\ntensorflow (CPU) or tensorflow-gpu (GPU), numpy, h5py\n\n## Configure the network\n\nAll network hyperparameters are configured in main.py.\n\n#### Training\n\nmax_step: how many iterations or steps to train\n\ntest_interval: how many steps to perform a mini validation\n\nsave_interval: how many steps to save the model\n\nsummary_interval: how many steps to save the summary\n\nlearning_rate: learning rate of model\n\n#### Data\n\ndata_dir: data directory\n\ntrain_data: h5 file for training\n\nvalid_data: h5 file for validation\n\ntest_data: h5 file for testing\n\nbatch: batch size\n\nchannel: input image channel number\n\nheight, width: height and width of input image\n\n#### Debug\n\nlogdir: where to store log\n\nmodeldir: where to store saved models\n\nsampledir: where to store predicted samples, please add a / at the end for convenience\n\nmodel_name: the name prefix of saved models\n\nreload_step: where to return training\n\ntest_step: which step to test or predict\n\nrandom_seed: random seed for tensorflow\n\n#### Network architecture\n\nnetwork_depth: how deep of the network including the bottom layer\n\nclass_num: how many classes. Usually number of classes plus one for background\n\nstart_channel_num: the number of channel for the first conv layer\n\n\n## Training and Testing\n\n#### Start training\n\nAfter configuring the network, we can start to train. Run\n```\npython main.py\n```\nThe training of a VGG for classification will start.\n\n#### Training process visualization\n\nWe employ tensorboard to visualize the training process.\n\n```\ntensorboard --logdir=logdir/ --port=6066\n```\n\nThe classification results including training and validation accuracies, and the prediction outputs are all available in tensorboard.\n\n#### Testing and prediction\n\nSelect a good point to test your model based on validation or other measures.\n\nFill the test_step in main.py with the checkpoint you want to test, run\n\n```\npython main.py --action=test\n```\n\nThe final output includes accuracy and loss.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivelab%2Fvgg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivelab%2Fvgg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivelab%2Fvgg/lists"}