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
// Parses the debug json message from the DSD and publishes the currently active action | |
import { Input } from "./types"; | |
// Define message | |
type Output = { | |
name: string; | |
}; | |
interface DSDDebugDataElement { |
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
# Based on https://discuss.pytorch.org/t/check-gradient-flow-in-network/15063/10 | |
def plot_grad_flow(named_parameters): | |
'''Plots the gradients flowing through different layers in the net during training. | |
Can be used for checking for possible gradient vanishing / exploding problems. | |
Usage: Plug this function in Trainer class after loss.backwards() as | |
"plot_grad_flow(self.model.named_parameters())" to visualize the gradient flow''' | |
ave_grads = [] | |
max_grads= [] |
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
# Get the process id of nginx | |
NGINX_PID=$(pgrep -o 'nginx') | |
echo Nginx server PID: $NGINX_PID | |
# Get the memory parts that are used by nginx. | |
# That make gdb dump commands with it and dump the corresponding memory into files | |
cat /proc/$NGINX_PID/maps \ | |
| awk ' | |
$6 !~ "^/" {split ($1,address,"-"); | |
print "dump memory mem_" address[1] " 0x" address[1] " 0x" address[2] ;} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.