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
| model.zero_grad() # Reset gradients tensors | |
| for i, (inputs, labels) in enumerate(training_set): | |
| predictions = model(inputs) # Forward pass | |
| loss = loss_function(predictions, labels) # Compute loss function | |
| loss = loss / accumulation_steps # Normalize our loss (if averaged) | |
| loss.backward() # Backward pass | |
| if (i+1) % accumulation_steps == 0: # Wait for several backward steps | |
| optimizer.step() # Now we can do an optimizer step | |
| model.zero_grad() # Reset gradients tensors | |
| if (i+1) % evaluation_steps == 0: # Evaluate the model when we... |
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
| n02119789 1 kit_fox | |
| n02100735 2 English_setter | |
| n02110185 3 Siberian_husky | |
| n02096294 4 Australian_terrier | |
| n02102040 5 English_springer | |
| n02066245 6 grey_whale | |
| n02509815 7 lesser_panda | |
| n02124075 8 Egyptian_cat | |
| n02417914 9 ibex | |
| n02123394 10 Persian_cat |
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
| update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20 | |
| update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10 | |
| update-alternatives --config ld | |
| ld --version | |
| GNU gold | |
| export CPP=cpp-5 gcc-5 g++-5 | |
| env CXXFLAGS='-march=native -flto -fuse-linker-plugin' cmake .. -DCMAKE_BUILD_TYPE=Release |
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
| avconv -i inbound.mp4 -vsync 1 -r 0.1 -an -y 'outbound-folder/video-clip-%4d.jpg' |
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
| #include <algorithm> | |
| #include <vector> | |
| #include <iostream> | |
| int | |
| main(int argc, char* argv[]) | |
| { | |
| using namespace std; | |
| vector<double> v1 = {1.1,2.2,3.3}; |
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
| function getURLParameter(name) { | |
| return decodeURIComponent( | |
| (RegExp('[?|&]'+name + '=' + '(.+?)(&|$)').exec(location.search)||[null,null])[1] | |
| ); | |
| } | |
| function setURLParameter(name,value){ | |
| var search; | |
| if(getURLParameter(name)){ | |
| search =location.search.replace(new RegExp('([?|&]'+name + '=)' + '(.+?)(&|$)'),"$1"+encodeURIComponent(value)+"$3"); | |
| }else if(location.search.length){ |