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.multiprocessing as mp | |
from absl import app, flags | |
from torchvision.models import AlexNet | |
FLAGS = flags.FLAGS | |
flags.DEFINE_integer("num_processes", 2, "Number of subprocesses to use") | |
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
#include<tuple> | |
std::tuple<long long, long long, long long> _extendedEuclid(long long a, long long b, long long x, long long y, long long _x, long long _y) { | |
if (a % b == 0) { | |
return std::make_tuple(b, x, y); | |
} else { | |
long long q = a / b; | |
return _extendedEuclid(b, a % b, _x - q * x, _y - q * y, x, y); | |
} | |
} |