The code is adapted from https://github.com/Anthony-Tatowicz/docker-ethminer.
Make sure you have 1) Docker and 2) Nvidia runtime installed then you are good to go.
๐ Morning 202 commits โโโโโโโโโโโโโโโโโโโโโ 30.7% | |
๐ Daytime 251 commits โโโโโโโโโโโโโโโโโโโโโ 38.1% | |
๐ Evening 96 commits โโโโโโโโโโโโโโโโโโโโโ 14.6% | |
๐ Night 109 commits โโโโโโโโโโโโโโโโโโโโโ 16.6% |
The code is adapted from https://github.com/Anthony-Tatowicz/docker-ethminer.
Make sure you have 1) Docker and 2) Nvidia runtime installed then you are good to go.
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
from torchaudio.functional import lfilter as torch_lfilter | |
from torch.autograd import Function, gradcheck | |
class lfilter(Function): | |
@staticmethod |
import numpy as np | |
import networkx as nx | |
from scipy.spatial import Delaunay | |
def W(x): | |
return (x + np.pi) % (2 * np.pi) - np.pi | |
def mcf_sparse(x, y, psi, capacity=None): | |
points = np.vstack((x, y)).T | |
num_points = points.shape[0] |
import numpy as np | |
import networkx as nx | |
def W(x): | |
return (x + np.pi) % (2 * np.pi) - np.pi | |
def mcf(x: np.ndarray, capacity=None): | |
assert x.ndim == 2, "Input x should be a 2d array!" | |
# construct index for each node |