Add resnet20#25
Open
stamcenter wants to merge 17 commits into
Open
Conversation
…sions-restructure restructure the submissions folder
code-perspective
requested changes
Jun 22, 2026
code-perspective
left a comment
Contributor
There was a problem hiding this comment.
Nice! I was able to run this.
Can you rebase against main? Please only keep the cifar-10 and resnet20 models in this PR.
For reference, I got the measurement files (roughly takes 2 hours to run with the cifar-10 dataset load time).
{
"model_name": "resnet20",
"dataset_name": "cifar10",
"Timing": {
"Test dataset generation": "28.5534s",
"Key Generation": "167.453s",
"Encrypted model preprocessing": "0.0102s",
"Input generation": "6.0968s",
"Input preprocessing": "0.0073s",
"Input encryption": "1.4808s",
"Encrypted computation": "5256.1713s",
"Result decryption": "1.0469s",
"Result postprocessing": "0.0072s",
"Total": "5460.8268s"
},
"Bandwidth": {
"Public and evaluation keys": "50.4G",
"Encrypted input": "28.0M",
"Encrypted results": "8.0M"
},
"Server Reported": {}
}
Comment on lines
+501
to
+506
| std::sort(rotation_positions.begin(), rotation_positions.end()); | ||
| auto new_end = std::remove(rotation_positions.begin(), rotation_positions.end(), 0); | ||
| new_end = std::unique(rotation_positions.begin(), rotation_positions.end()); | ||
| unique(rotation_positions.begin(), rotation_positions.end()); | ||
| rotation_positions.erase(new_end, rotation_positions.end()); | ||
| std::sort(rotation_positions.begin(), rotation_positions.end()); |
Contributor
There was a problem hiding this comment.
In C++20 standard libraries, std::unique is marked [[nodiscard]], which triggers compiler errors when the return value is ignored. Additionally, std::unique and std::remove only reorder elements without actually resizing the underlying vector.
Let's clean this up using standard erase-remove and erase-unique idioms
std::sort(rotation_positions.begin(), rotation_positions.end());
rotation_positions.erase(std::unique(rotation_positions.begin(), rotation_positions.end()), rotation_positions.end());
rotation_positions.erase(std::remove(rotation_positions.begin(), rotation_positions.end(), 0), rotation_positions.end());
code-perspective
requested changes
Jun 22, 2026
Comment on lines
+8
to
+10
| int main(){ | ||
| return 0; | ||
| } No newline at end of file |
Contributor
There was a problem hiding this comment.
The code to pack the weights can be added in this file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding the second pull request which contains the resnet-20 model as the reference for cifar10. It also include a modification to the harness that allow it to set mlp as default model for mnist and resnet20 as default model for cifar10.