mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-05 17:34:21 +00:00
Add model summary
This commit is contained in:
@@ -39,6 +39,8 @@ class Model {
|
||||
|
||||
bool validate();
|
||||
|
||||
void printSummary();
|
||||
|
||||
protected:
|
||||
Layers::Input* inputLayer;
|
||||
Layers::Output* outputLayer;
|
||||
|
||||
@@ -187,3 +187,11 @@ bool Model::validate() {
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
||||
void Model::printSummary() {
|
||||
std::cout << "Model summary:" << std::endl;
|
||||
for (const auto& layer : layers) {
|
||||
std::cout << "Layer: " << layer.first << ", input size: " << layer.second->getInputSize() << ", output size: "
|
||||
<< layer.second->getOutputSize() << std::endl;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user