This file contains 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
def pad(x:torch.Tensor, shape:torch.Size, mode='right with zero'): | |
p = [0]*len(shape)*2 | |
for i, s in enumerate(shape): | |
p[2*(len(shape)-1-i)+1] = s - x.size(i) | |
return torch.nn.functional.pad(x, p) |
This file contains 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
#!/bin/bash | |
#SBATCH -J MyModel | |
#SBATCH -n 1 # Number of cores | |
#SBATCH -t 1-00:00 # Runtime in D-HH:MM | |
#SBATCH -o JOB%j.out # File to which STDOUT will be written | |
#SBATCH -e JOB%j.out # File to which STDERR will be written | |
#SBATCH --mail-type=BEGIN | |
#SBATCH [email protected] | |
secs_to_human(){ |
This file contains 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
if not A_IsAdmin ;running by administrator | |
{ | |
Run *RunAs "%A_ScriptFullPath%" | |
ExitApp | |
} |