Add SqueezeNet Fire Module #585
Open
syed-nazmus-sakib wants to merge 2 commits intoOpen-Deep-ML:mainfrom
Open
Conversation
moe18
reviewed
Mar 5, 2026
Collaborator
moe18
left a comment
There was a problem hiding this comment.
looks good, had a few ideas for the test cases
| @@ -0,0 +1,5 @@ | |||
| { | |||
| "input": "imput_tensor: (H=32, W=32, C_in=3)\nSqueeze 1x1: s1x1=16 filters\nExpand 1x1: e1x1=64 filters\nExpand 3x3: e3x3=64 filters", | |||
Collaborator
There was a problem hiding this comment.
should be input_tensor (small spelling issue)
| { | ||
| "test": "import numpy as np\n# Middle pixel full sum\n# Same setup as above, check middle pixel (1,1)\n# 9 neighbors are 1s -> Sum = 9\ninput = np.ones((3, 3, 1))\ns_w = np.ones((1, 1, 1, 1))\ns_b = np.zeros(1)\ne1_w = np.zeros((1, 1, 1, 1))\ne1_b = np.zeros(1)\ne3_w = np.ones((3, 3, 1, 1))\ne3_b = np.zeros(1)\nres = fire_module_forward(input, s_w, s_b, e1_w, e1_b, e3_w, e3_b)\nprint(res[1, 1, 1])", | ||
| "expected_output": "9.0" | ||
| } |
Collaborator
There was a problem hiding this comment.
add a test for Non-Zero Bias
| }, | ||
| { | ||
| "test": "import numpy as np\n# Middle pixel full sum\n# Same setup as above, check middle pixel (1,1)\n# 9 neighbors are 1s -> Sum = 9\ninput = np.ones((3, 3, 1))\ns_w = np.ones((1, 1, 1, 1))\ns_b = np.zeros(1)\ne1_w = np.zeros((1, 1, 1, 1))\ne1_b = np.zeros(1)\ne3_w = np.ones((3, 3, 1, 1))\ne3_b = np.zeros(1)\nres = fire_module_forward(input, s_w, s_b, e1_w, e1_b, e3_w, e3_b)\nprint(res[1, 1, 1])", | ||
| "expected_output": "9.0" |
Collaborator
There was a problem hiding this comment.
ReLU Is Never Actually Tested in any of the test cases
Author
There was a problem hiding this comment.
Thanks for the review! I've pushed the updates. imput_tensor is now input_tensor, and I've added non-zero bias and ReLU edge-case tests to test.json 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.
Description
This PR implements Problem 190: SqueezeNet Fire Module, which teaches how to use 1x1 convolutions ("squeeze" layer) to reduce dimensionality before applying expensive 3x3 convolutions ("expand" layer).
Changes
questions/190_implement-squeezenet-fire-module/with all required files.meta.json,description.md,learn.md,starter_code.py,solution.py,example.json, andtests.json.utils/build_bundle.pyfix for Windows encoding to ensure this branch passes CI independently.utils/validate_questions.py.Checklist