mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-06 01:34:22 +00:00
Add model summary
This commit is contained in:
@@ -39,6 +39,8 @@ class Model {
|
|||||||
|
|
||||||
bool validate();
|
bool validate();
|
||||||
|
|
||||||
|
void printSummary();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Layers::Input* inputLayer;
|
Layers::Input* inputLayer;
|
||||||
Layers::Output* outputLayer;
|
Layers::Output* outputLayer;
|
||||||
|
|||||||
@@ -187,3 +187,11 @@ bool Model::validate() {
|
|||||||
|
|
||||||
return valid;
|
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