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
import random | |
import os | |
import numpy as np | |
import time | |
import torch | |
import torch.nn as nn | |
from apex import amp | |
def set_seed(seed: int): | |
"""Set all seeds to make results reproducible (deterministic mode). |
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
<!--You must include this JavaScript file --> | |
<script src="https://assets.crowd.aws/crowd-html-elements.js"></script> | |
<script type='text/javascript'> | |
document.getElementById('theImage').style.visibility='hidden' | |
</script> | |
<script type='text/javascript'> | |
function setImageVisible(id, visible) { | |
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
import torch | |
import torch.nn as nn | |
from torch import optim | |
import torch.utils.checkpoint as chk | |
import torch.nn.functional as F | |
import os | |
os.environ['CUDA_VISIBLE_DEVICES'] = '0,3' | |
import faulthandler |