🧠 D: DEFINE — Problem & Opportunity
What is the problem, limitation, or opportunity? Why does this matter for SKaiNET?
Currently, the flatten() layer in NeuralNetworkDslImpl and StageImpl lacks dynamic shape inference. Instead, it relies on a hardcoded fallback (lastDimension = 1568) meant for a specific MNIST test case. This causes severe ArrayIndexOutOfBoundsException errors when users build custom architectures (e.g., a 64-channel CNN), as the framework miscalculates the input size for subsequent dense layers.
🔍 A: ASSESS — Feasibility & Impact
Provide an evaluation of the proposal. Address the following:
✔️ Feasibility
Straightforward but requires updating all spatial layers (Conv, Pool) in the DSL to calculate and update their output shapes mathematically before passing them to the next layer.
✔️ Expected Impact
Critical fix: Unlocks the ability to build and run custom CNN architectures without hardcoded shape collisions.
✔️ Risks / Constraints
Need to ensure shape calculation formulas (handling stride, padding, dilation) exactly match the tensor operations.
✔️ Dependencies
Core sk.ainet.lang.nn.dsl module.
📚 R: RESEARCH — What Must Be Understood First?
Document research tasks or open questions that must be answered before implementation:
Research Tasks
🛠️ C: CONTRIBUTE — Implementation Plan
Break down actionable steps required to deliver this feature:
Development Tasks
Acceptance Criteria
💬 Additional Notes
- Bug Lotations: sk.ainet.lang.nn.dsl.NetworkBuilder 1077, 1431
🧠 D: DEFINE — Problem & Opportunity
What is the problem, limitation, or opportunity? Why does this matter for SKaiNET?
Currently, the flatten() layer in NeuralNetworkDslImpl and StageImpl lacks dynamic shape inference. Instead, it relies on a hardcoded fallback (lastDimension = 1568) meant for a specific MNIST test case. This causes severe ArrayIndexOutOfBoundsException errors when users build custom architectures (e.g., a 64-channel CNN), as the framework miscalculates the input size for subsequent dense layers.
🔍 A: ASSESS — Feasibility & Impact
Provide an evaluation of the proposal. Address the following:
✔️ Feasibility
Straightforward but requires updating all spatial layers (Conv, Pool) in the DSL to calculate and update their output shapes mathematically before passing them to the next layer.
✔️ Expected Impact
Critical fix: Unlocks the ability to build and run custom CNN architectures without hardcoded shape collisions.
✔️ Risks / Constraints
Need to ensure shape calculation formulas (handling stride, padding, dilation) exactly match the tensor operations.
✔️ Dependencies
Core sk.ainet.lang.nn.dsl module.
📚 R: RESEARCH — What Must Be Understood First?
Document research tasks or open questions that must be answered before implementation:
Research Tasks
🛠️ C: CONTRIBUTE — Implementation Plan
Break down actionable steps required to deliver this feature:
Development Tasks
Acceptance Criteria
💬 Additional Notes