Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes (api + norms) #288

Merged
merged 2 commits into from
May 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/apis/eddl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ namespace eddl {
int h=parent->output->shape[2];

if (name.empty()) { name = "GlobalMaxPool1D"; } // Set default name
return MaxPool1D(parent, {h},{1}, name);
return MaxPool1D(parent, {h}, {1}, "none", name);
}

layer GlobalMaxPool2D(layer parent, string name){
Expand Down
6 changes: 3 additions & 3 deletions src/layers/normalization/layer_norm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ int LNorm::total_layers = 0;

LNorm::LNorm(Layer *parent, float epsilon, string name, int dev, int mem) : LinLayer(name, dev, mem) {

vector<int> axis;
if (parent->output->ndim == 2) axis.push_back(1);
else if (parent->output->ndim == 4) {axis.push_back(1);axis.push_back(2);axis.push_back(3);}
vector<int> axis; // To store the axis to reduce (starting from the next dimension of the batch)
if (parent->output->ndim == 2) axis.push_back(0);
else if (parent->output->ndim == 4) {axis.push_back(0);axis.push_back(1);axis.push_back(2);}
else msg("LNorm only works over 2D or 4D tensors", "LNorm");

if(name.empty()) this->name = "norm" + to_string(++total_layers);
Expand Down
6 changes: 3 additions & 3 deletions src/layers/normalization/layer_normmax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ int LNormMax::total_layers = 0;

LNormMax::LNormMax(Layer *parent, float epsilon, string name, int dev, int mem) : LinLayer(name, dev, mem) {

vector<int> axis;
if (parent->output->ndim == 2) axis.push_back(1);
else if (parent->output->ndim == 4) {axis.push_back(1);axis.push_back(2);axis.push_back(3);}
vector<int> axis; // To store the axis to reduce (starting from the next dimension of the batch)
if (parent->output->ndim == 2) axis.push_back(0);
else if (parent->output->ndim == 4) {axis.push_back(0);axis.push_back(1);axis.push_back(2);}
else msg("LNormMax only works over 2D or 4D tensors", "LNormMax");

if(name.empty()) this->name = "normmax" + to_string(++total_layers);
Expand Down
6 changes: 3 additions & 3 deletions src/layers/normalization/layer_normminmax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ int LNormMinMax::total_layers = 0;

LNormMinMax::LNormMinMax(Layer *parent, float epsilon, string name, int dev, int mem) : LinLayer(name, dev, mem) {

vector<int> axis;
if (parent->output->ndim == 2) axis.push_back(1);
else if (parent->output->ndim == 4) {axis.push_back(1);axis.push_back(2);axis.push_back(3);}
vector<int> axis; // To store the axis to reduce (starting from the next dimension of the batch)
if (parent->output->ndim == 2) axis.push_back(0);
else if (parent->output->ndim == 4) {axis.push_back(0);axis.push_back(1);axis.push_back(2);}
else msg("LNormMinMax only works over 2D or 4D tensors", "LNormMinMax");

if(name.empty()) this->name = "normminmax" + to_string(++total_layers);
Expand Down