Created
April 21, 2018 22:19
-
-
Save sbugrov/57681b9ed32e4b3c3f9f11ff88399f0b to your computer and use it in GitHub Desktop.
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
vector <float> relu(const vector <float>& z){ | |
int size = z.size(); | |
vector <float> output; | |
for( int i = 0; i < size; ++i ) { | |
if (z[i] < 0){ | |
output.push_back(0.0); | |
} | |
else output.push_back(z[i]); | |
} | |
return output; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment