repo
stringlengths
1
99
file
stringlengths
13
215
code
stringlengths
12
59.2M
file_length
int64
12
59.2M
avg_line_length
float64
3.82
1.48M
max_line_length
int64
12
2.51M
extension_type
stringclasses
1 value
ray
ray-master/release/lightning_tests/workloads/test_tuner.py
import os import time import json from pytorch_lightning.loggers.csv_logs import CSVLogger import ray import ray.tune as tune from ray.air.config import CheckpointConfig, ScalingConfig from ray.train.lightning import LightningTrainer, LightningConfigBuilder from ray.tune.schedulers import ASHAScheduler from lightning...
2,621
26.893617
84
py
rainbow-iqn-apex
rainbow-iqn-apex-master/rainbowiqn/compute_loss_iqn.py
""" Copyright 2018 The Dopamine Authors. All rights reserved. Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "Licen...
18,269
49.891365
98
py
rainbow-iqn-apex
rainbow-iqn-apex-master/rainbowiqn/launch_learner.py
import logging import os import time from datetime import datetime from multiprocessing import Process, Queue import numpy as np import redis import torch import rainbowiqn.constants as cst from rainbowiqn.learner import Learner from rainbowiqn.args import return_args from rainbowiqn.env import Env from rainbowiqn.re...
7,728
34.292237
99
py
rainbow-iqn-apex
rainbow-iqn-apex-master/rainbowiqn/actor.py
import random import io import math import numpy as np import torch import rainbowiqn.constants as cst from rainbowiqn.agent import Agent class Actor(Agent): """This class just handle actor specific methods""" # Acts based on single state (no batch) def act(self, state_buffer): state = torch.fro...
5,041
39.336
99
py
rainbow-iqn-apex
rainbow-iqn-apex-master/rainbowiqn/args.py
import argparse import os import random import torch def return_args(): parser = argparse.ArgumentParser(description="Rainbow-IQN") parser.add_argument("--seed", type=int, default=123, help="Random seed") parser.add_argument("--disable-cuda", action="store_true", help="Disable CUDA") parser.add_argum...
14,117
33.773399
99
py
rainbow-iqn-apex
rainbow-iqn-apex-master/rainbowiqn/learner.py
import io import torch import rainbowiqn.constants as cst from rainbowiqn.agent import Agent class Learner(Agent): """This class just handle learner specific methods""" def __init__(self, args, action_space, redis_servor): super().__init__(args, action_space, redis_servor) def learn(self, mem_r...
1,169
30.621622
83
py
rainbow-iqn-apex
rainbow-iqn-apex-master/rainbowiqn/utils.py
import csv import os from datetime import datetime import plotly import torch from plotly.graph_objs import Scatter from plotly.graph_objs.scatter import Line import rainbowiqn.constants as cst # Simple ISO 8601 timestamped logger def log(s): print("[" + str(datetime.now().strftime("%Y-%m-%dT%H:%M:%S")) + "] " ...
6,369
34
99
py
rainbow-iqn-apex
rainbow-iqn-apex-master/rainbowiqn/model.py
import math import torch from torch import nn from torch.nn import functional as F # Factorised NoisyLinear layer with bias class NoisyLinear(nn.Module): def __init__(self, in_features, out_features, std_init, disable_cuda=False): super().__init__() self.disable_cuda = disable_cuda self.i...
6,487
38.803681
99
py
rainbow-iqn-apex
rainbow-iqn-apex-master/rainbowiqn/redis_memory.py
import random import time from collections import namedtuple import numpy as np import redlock import torch import rainbowiqn.constants as cst Transition = namedtuple("Transition", ("timestep", "state", "action", "reward", "nonterminal")) blank_trans = Transition(0, np.zeros((84, 84), dtype=np.uint8), None, 0, False...
25,244
42.980836
103
py
rainbow-iqn-apex
rainbow-iqn-apex-master/rainbowiqn/agent.py
import os import torch from torch import optim import rainbowiqn.compute_loss_iqn as compute_loss_iqn from rainbowiqn.model import DQN class Agent: """This class handle both actor and learner because most of their methods are shared""" def __init__(self, args, action_space, redis_servor): self.acti...
7,339
42.952096
99
py
rainbow-iqn-apex
rainbow-iqn-apex-master/rainbowiqn/test_multiple_seed.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Nov 21 12:20:12 2018 @author: toromanoff """ import random import time import numpy as np import torch from rainbowiqn.actor import Actor from rainbowiqn.args import return_args from rainbowiqn.env import Env # Test the input snapshot (args --model...
2,966
30.56383
93
py
rainbow-iqn-apex
rainbow-iqn-apex-master/rainbowiqn/launch_actor.py
import logging import random import time import numpy as np import redis from torch.multiprocessing import Process import rainbowiqn.constants as cst from rainbowiqn.actor import Actor from rainbowiqn.args import return_args from rainbowiqn.env import Env from rainbowiqn.redis_memory import ReplayRedisMemory from rai...
8,191
38.384615
99
py
rainbow-iqn-apex
rainbow-iqn-apex-master/rainbowiqn/env.py
import math from collections import deque import atari_py import cv2 # Note that importing cv2 before torch may cause segfaults? import numpy as np class Env: def __init__(self, args): self.device = args.device self.ale = atari_py.ALEInterface() self.ale.setInt("random_seed", args.seed) ...
4,988
38.595238
99
py
rsna-resnet10
rsna-resnet10-main/working/validation.py
import os import monai import numpy as np import pandas as pd import torch from sklearn.metrics import roc_auc_score from dataset import BrainRSNADataset data = pd.read_csv("../input/train.csv") targets = data.MGMT_value.values device = torch.device("cuda") model = monai.networks.nets.resnet10(spatial_dims=3, n_in...
1,981
31.491803
128
py
rsna-resnet10
rsna-resnet10-main/working/dataset.py
import glob import os import re import joblib import numpy as np import torch from torch.utils.data import Dataset from tqdm import tqdm import config import utils class BrainRSNADataset(Dataset): def __init__( self, data, transform=None, target="MGMT_value", mri_type="FLAIR", is_train=True, ds_type="fo...
3,481
32.480769
120
py
rsna-resnet10
rsna-resnet10-main/working/predict.py
import glob import os import random import re import albumentations as A import cv2 import monai import numpy as np import pandas as pd import pydicom import torch import torch.nn as nn import torch.optim as optim from albumentations.pytorch import ToTensorV2 from pydicom.pixel_data_handlers.util import apply_voi_lut ...
510
22.227273
58
py
rsna-resnet10
rsna-resnet10-main/working/train.py
import argparse import os import monai import numpy as np import pandas as pd import torch import torch.nn as nn import torch.optim as optim from sklearn.metrics import roc_auc_score from torch.optim import lr_scheduler from tqdm import tqdm import config from dataset import BrainRSNADataset parser = argparse.Argume...
4,548
31.963768
176
py
SAITS
SAITS-main/Simple_RNN_on_imputed_data.py
""" The simple RNN classification model for imputed dataset PhysioNet-2012. If you use code in this repository, please cite our paper as below. Many thanks. @article{DU2023SAITS, title = {{SAITS: Self-Attention-based Imputation for Time Series}}, journal = {Expert Systems with Applications}, volume = {219}, pages = {...
8,806
34.65587
186
py
SAITS
SAITS-main/run_models.py
""" The script for running (including training and testing) all models in this repo. If you use code in this repository, please cite our paper as below. Many thanks. @article{DU2023SAITS, title = {{SAITS: Self-Attention-based Imputation for Time Series}}, journal = {Expert Systems with Applications}, volume = {219}, ...
26,083
37.134503
143
py
SAITS
SAITS-main/modeling/utils.py
""" Utility functions are stored here. If you use code in this repository, please cite our paper as below. Many thanks. @article{DU2023SAITS, title = {{SAITS: Self-Attention-based Imputation for Time Series}}, journal = {Expert Systems with Applications}, volume = {219}, pages = {119619}, year = {2023}, issn = {0957-...
9,209
32.860294
186
py
SAITS
SAITS-main/modeling/unified_dataloader.py
""" The unified dataloader for all models' dataset loading. If you use code in this repository, please cite our paper as below. Many thanks. @article{DU2023SAITS, title = {{SAITS: Self-Attention-based Imputation for Time Series}}, journal = {Expert Systems with Applications}, volume = {219}, pages = {119619}, year = ...
15,712
39.812987
186
py
SAITS
SAITS-main/modeling/mrnn.py
""" Our implementation of MRNN model for time-series imputation. If you use code in this repository, please cite our paper as below. Many thanks. @article{DU2023SAITS, title = {{SAITS: Self-Attention-based Imputation for Time Series}}, journal = {Expert Systems with Applications}, volume = {219}, pages = {119619}, ye...
6,084
36.331288
186
py
SAITS
SAITS-main/modeling/layers.py
""" Layer modules for self-attention models (Transformer and SAITS). If you use code in this repository, please cite our paper as below. Many thanks. @article{DU2023SAITS, title = {{SAITS: Self-Attention-based Imputation for Time Series}}, journal = {Expert Systems with Applications}, volume = {219}, pages = {119619}...
6,193
32.846995
186
py
SAITS
SAITS-main/modeling/transformer.py
""" Transformer model for time-series imputation. If you use code in this repository, please cite our paper as below. Many thanks. @article{DU2023SAITS, title = {{SAITS: Self-Attention-based Imputation for Time Series}}, journal = {Expert Systems with Applications}, volume = {219}, pages = {119619}, year = {2023}, is...
5,024
34.638298
186
py
SAITS
SAITS-main/modeling/brits.py
""" Our implementation of BRITS model for time-series imputation. If you use code in this repository, please cite our paper as below. Many thanks. @article{DU2023SAITS, title = {{SAITS: Self-Attention-based Imputation for Time Series}}, journal = {Expert Systems with Applications}, volume = {219}, pages = {119619}, y...
9,538
35.132576
186
py
SAITS
SAITS-main/modeling/saits.py
""" SAITS model for time-series imputation. If you use code in this repository, please cite our paper as below. Many thanks. @article{DU2023SAITS, title = {{SAITS: Self-Attention-based Imputation for Time Series}}, journal = {Expert Systems with Applications}, volume = {219}, pages = {119619}, year = {2023}, issn = {...
8,512
36.835556
186
py
QMUPD
QMUPD-master/test.py
"""General-purpose test script for image-to-image translation. Once you have trained your model with train.py, you can use this script to test the model. It will load a saved model from --checkpoints_dir and save the results to --results_dir. It first creates model and dataset given the option. It will hard-code some...
4,263
59.056338
145
py
QMUPD
QMUPD-master/train.py
"""General-purpose training script for image-to-image translation. This script works for various models (with option '--model': e.g., pix2pix, cyclegan, colorization) and different datasets (with option '--dataset_mode': e.g., aligned, unaligned, single, colorization). You need to specify the dataset ('--dataroot'), e...
5,295
59.873563
181
py
QMUPD
QMUPD-master/options/base_options.py
import argparse import os from util import util import torch import models import data class BaseOptions(): """This class defines options used during both training and test time. It also implements several helper functions such as parsing, printing, and saving the options. It also gathers additional opti...
8,437
56.794521
235
py
QMUPD
QMUPD-master/models/base_model.py
import os import torch from collections import OrderedDict from abc import ABCMeta, abstractmethod from . import networks import pdb class BaseModel(): __metaclass__ = ABCMeta """This class is an abstract base class (ABC) for models. To create a subclass, you need to implement the following five functions...
11,142
43.931452
260
py
QMUPD
QMUPD-master/models/networks.py
#coding:utf-8 import torch import torch.nn as nn from torch.nn import init import functools from torch.optim import lr_scheduler import pdb ############################################################################### # Helper Functions ###############################################################################...
66,109
38.586826
193
py
QMUPD
QMUPD-master/models/pretrained_networks.py
from collections import namedtuple import torch from torchvision import models from IPython import embed class squeezenet(torch.nn.Module): def __init__(self, requires_grad=False, pretrained=True): super(squeezenet, self).__init__() pretrained_features = models.squeezenet1_1(pretrained=pretrained)....
6,559
35.043956
109
py
QMUPD
QMUPD-master/models/networks_basic.py
from __future__ import absolute_import import sys import torch import torch.nn as nn import torch.nn.init as init from torch.autograd import Variable import numpy as np from pdb import set_trace as st from skimage import color from IPython import embed from . import pretrained_networks as pn from util import util d...
7,514
38.973404
134
py
QMUPD
QMUPD-master/models/test_model.py
from .base_model import BaseModel from . import networks import torch import pdb class TestModel(BaseModel): """ This TesteModel can be used to generate CycleGAN results for only one direction. This model will automatically set '--dataset_mode single', which only loads the images from one collection. See ...
5,148
52.082474
160
py
QMUPD
QMUPD-master/models/dist_model.py
from __future__ import absolute_import import sys sys.path.append('..') sys.path.append('.') import numpy as np import torch from torch import nn from collections import OrderedDict from torch.autograd import Variable from .base_model import BaseModel from scipy.ndimage import zoom import skimage.transform from . im...
13,695
41.271605
281
py
QMUPD
QMUPD-master/models/cycle_gan_cls_model.py
import torch import itertools from util.image_pool import ImagePool from .base_model import BaseModel from . import networks import models.dist_model as dm # numpy==1.14.3 import torchvision.transforms as transforms import os from util.util import tensor2im, tensor2im2, save_image def truncate(fake_B,a=127.5):#[-1,1] ...
34,356
59.701413
360
py
QMUPD
QMUPD-master/util/image_pool.py
import random import torch class ImagePool(): """This class implements an image buffer that stores previously generated images. This buffer enables us to update discriminators using a history of generated images rather than the ones produced by the latest generators. """ def __init__(self, pool_...
2,226
39.490909
140
py
QMUPD
QMUPD-master/util/util.py
"""This module contains simple helper functions """ from __future__ import print_function import torch import numpy as np from PIL import Image import os import pdb from scipy.io import savemat def tensor2im(input_image, imtype=np.uint8): """"Converts a Tensor array into a numpy image array. Parameters: ...
4,625
33.522388
119
py
QMUPD
QMUPD-master/data/base_dataset.py
"""This module implements an abstract base class (ABC) 'BaseDataset' for datasets. It also includes common transformation functions (e.g., get_transform, __scale_width), which can be later used in subclasses. """ import random import numpy as np import torch.utils.data as data from PIL import Image import torchvision....
6,615
34.379679
141
py
QMUPD
QMUPD-master/data/image_folder.py
"""A modified image folder class We modify the official PyTorch image folder (https://github.com/pytorch/vision/blob/master/torchvision/datasets/folder.py) so that this class can load images from both current directory and its subdirectories. """ import torch.utils.data as data from PIL import Image import os import...
1,893
27.268657
122
py
QMUPD
QMUPD-master/data/__init__.py
"""This package includes all the modules related to data loading and preprocessing To add a custom dataset class called 'dummy', you need to add a file called 'dummy_dataset.py' and define a subclass 'DummyDataset' inherited from BaseDataset. You need to implement four functions: -- <__init__>: ...
3,554
36.819149
176
py
QMUPD
QMUPD-master/data/single_dataset.py
from data.base_dataset import BaseDataset, get_transform, get_params, get_transform_mask from data.image_folder import make_dataset from PIL import Image import torch import os, glob class SingleDataset(BaseDataset): """This dataset class can load a set of images specified by the path --dataroot /path/to/data. ...
3,147
41.540541
105
py
QMUPD
QMUPD-master/data/unaligned_mask_stylecls_dataset.py
import os.path from data.base_dataset import BaseDataset, get_params, get_transform, get_transform_mask from data.image_folder import make_dataset from PIL import Image import random import torch import torchvision.transforms as transforms import numpy as np class UnalignedMaskStyleClsDataset(BaseDataset): """ ...
7,723
47.275
126
py
b4msa
b4msa-master/docs/source/conf.py
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
5,407
29.902857
90
py
FLAGS-FL
FLAGS-FL-main/deprecated.py
def neighborhood_divergence(self, nodeset, cfl_model, div_metric = 'L2', div_mode ='cfl_div', normalize = False): div_dict = {node:None for node in self.neighborhood} total_div_dict = copy.deepcopy(div_dict) conv_div_dict = copy.deepcopy(div_dict) fc_div_dict = copy.deepcopy(div_dict) ...
4,049
48.390244
123
py
FLAGS-FL
FLAGS-FL-main/env_sysmodel.py
import numpy as np import random import networkx as nx import matplotlib.pyplot as plt import copy import heapq import pickle import sys, gc import torch import torchvision import torchvision.models as models import torch.optim as optim from torchvision import datasets, transforms from torch.utils.data import Dataset,...
15,051
45.313846
168
py
FLAGS-FL
FLAGS-FL-main/utils.py
import random import torch import pickle import os def constrained_sum(n, total): """Return a randomly chosen list of n positive integers summing to total. Each such list is equally likely to occur. """ divider = [] while 1 in divider or len(divider) == 0: dividers = sorted(random.sample(r...
5,189
48.428571
295
py
FLAGS-FL
FLAGS-FL-main/data_utils.py
import copy import numpy as np import torch import torchvision from torchvision import datasets, transforms from torch.utils.data import Dataset, DataLoader, TensorDataset, IterableDataset from DNN import * class DataSubset(Dataset): """ Takes the dataset, distribution list and node as arguments. """ ...
4,708
42.201835
141
py
FLAGS-FL
FLAGS-FL-main/data_dist.py
import copy import numpy as np import math import random from itertools import chain import torch import torchvision from torchvision import datasets, transforms def data_iid(dataset, num_classes, num_nodes): """ Sample I.I.D. client data for the selected dataset :param dataset: :param num_users: :...
3,917
36.314286
108
py
FLAGS-FL
FLAGS-FL-main/Main-Fed.py
import os os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"; # #The GPU id to use, usually either "0" or "1"; os.environ["CUDA_VISIBLE_DEVICES"]="2" import sys, argparse import pickle import time import gc from get_args import arg_parser from utils import dataset_approve, save_file, model_size from data_utils import * # Re...
11,612
49.056034
203
py
FLAGS-FL
FLAGS-FL-main/devices.py
from DNN import * import heapq import numpy as np from data_utils import DataSubset import copy, gc import torch import torchvision import torch.optim as optim from torchvision import datasets, transforms from torch.utils.data import Dataset, DataLoader, TensorDataset, IterableDataset class Nodes: """ Generat...
8,364
43.026316
190
py
FLAGS-FL
FLAGS-FL-main/DNN.py
import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm import networkx as nx import random import copy import heapq import sys, gc import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torchvision.models as models from utils import optimizer_to, schedu...
11,656
39.196552
154
py
byteps
byteps-master/setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Note: To use the 'upload' functionality of this file, you must: # $ pip install twine import io import os import sys import re import shutil from shutil import rmtree import textwrap import shlex import subprocess from setuptools import find_packages, setup, Command,...
43,211
36.838879
133
py
byteps
byteps-master/byteps/mxnet/compression.py
# Copyright 2019 Bytedance Inc. All Rights Reserved. # Copyright 2018 Uber Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.or...
5,470
32.157576
90
py
byteps
byteps-master/byteps/mxnet/__init__.py
# Copyright 2019 Bytedance Inc. or its affiliates. All Rights Reserved. # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License ...
15,017
40.601108
103
py
byteps
byteps-master/byteps/mxnet/ops.py
# Copyright 2019 Bytedance Inc. or its affiliates. All Rights Reserved. # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License ...
4,372
34.266129
152
py
byteps
byteps-master/byteps/torch/cross_barrier.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function from byteps.torch.compression import Compression from byteps.torch.ops import push_pull_async_inplace as byteps_push_pull from byteps.torch.ops import poll, synchronize from byteps.torch.ops import init, shutdo...
17,594
40.302817
116
py
byteps
byteps-master/byteps/torch/compression.py
# Copyright 2019 Bytedance Inc. All Rights Reserved. # Copyright 2018 Uber Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.or...
2,485
31.710526
90
py
byteps
byteps-master/byteps/torch/__init__.py
# Copyright 2019 Bytedance Inc. All Rights Reserved. # Copyright 2019 Uber Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.or...
19,967
41.75803
107
py
byteps
byteps-master/byteps/torch/ops.py
# Copyright 2019 ByteDance, Inc. All Rights Reserved. # Copyright 2019 Uber Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
9,763
40.198312
100
py
byteps
byteps-master/byteps/torch/parallel/distributed.py
import torch from torch.nn.modules import Module from byteps.torch.ops import push_pull_group_sync_inplace as byteps_push_pull_group from byteps.torch.ops import push_pull_async_inplace as byteps_push_pull from byteps.torch.ops import poll, synchronize, declare, byteps_torch_set_num_grads from byteps.torch.ops import s...
12,762
43.315972
94
py
byteps
byteps-master/byteps/_keras/__init__.py
# Copyright 2019 Bytedance Inc. or its affiliates. All Rights Reserved. # Copyright 2017 Uber Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # h...
5,479
43.918033
102
py
byteps
byteps-master/byteps/misc/imagenet18/__init__.py
# Copyright 2019 Bytedance Inc. All Rights Reserved. # Copyright 2019 Uber Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.or...
22,494
41.363465
124
py
byteps
byteps-master/byteps/keras/callbacks.py
# Copyright 2019 Bytedance Inc. or its affiliates. All Rights Reserved. # Copyright 2018 Uber Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # h...
7,090
49.29078
109
py
byteps
byteps-master/byteps/keras/__init__.py
# Copyright 2019 Bytedance Inc. or its affiliates. All Rights Reserved. # Copyright 2017 Uber Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # h...
5,619
44.322581
114
py
byteps
byteps-master/byteps/tensorflow/__init__.py
# Copyright 2019 Bytedance Inc. All Rights Reserved. # Copyright 2016 The TensorFlow Authors. All Rights Reserved. # Modifications copyright (C) 2019 Uber Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may o...
18,667
43.660287
95
py
byteps
byteps-master/byteps/tensorflow/keras/callbacks.py
# Copyright 2018 Uber Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
7,292
48.612245
109
py
byteps
byteps-master/byteps/tensorflow/keras/__init__.py
# Copyright 2017 Uber Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
5,850
43.325758
114
py
byteps
byteps-master/tests/meta_test.py
# Copyright 2020 Amazon Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
2,989
33.767442
80
py
byteps
byteps-master/tests/test_mxnet.py
# Copyright 2020 Amazon Technologies, Inc. All Rights Reserved. # Copyright 2019 ByteDance Technologies, Inc. All Rights Reserved. # Copyright 2018 Uber Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the L...
5,019
38.527559
97
py
byteps
byteps-master/tests/utils.py
import mxnet as mx import mxnet.ndarray as nd import numpy as np from numba import jit def fake_data(dtype="float32", batch_size=32, height=224, width=224, depth=3, num_classes=1000): image_list = [] label_list = [] for _ in range(8): image = mx.ndarray.random.normal(-1, 1, ...
1,537
28.018868
96
py
byteps
byteps-master/tests/test_tensorflow_keras.py
# Copyright 2018 Uber Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
3,717
34.75
80
py
byteps
byteps-master/tests/test_dithering.py
# Copyright 2020 Amazon Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
5,787
31.335196
136
py
byteps
byteps-master/tests/test_onebit.py
# Copyright 2020 Amazon Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
3,778
30.231405
80
py
byteps
byteps-master/tests/test_topk.py
# Copyright 2020 Amazon Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
3,718
29.991667
80
py
byteps
byteps-master/tests/test_randomk.py
# Copyright 2020 Amazon Technologies, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
4,164
31.286822
100
py
byteps
byteps-master/example/mxnet/train_cifar100_byteps_gc.py
# Copyright 2019 Bytedance Inc. or its affiliates. All Rights Reserved. # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License ...
12,981
39.823899
103
py
byteps
byteps-master/example/mxnet/train_gluon_mnist_byteps.py
# Copyright 2019 Bytedance Inc. or its affiliates. All Rights Reserved. # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License ...
5,952
34.646707
116
py
byteps
byteps-master/example/mxnet/train_gluon_mnist_byteps_gc.py
# Copyright 2019 Bytedance Inc. or its affiliates. All Rights Reserved. # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License ...
7,876
34.481982
79
py
byteps
byteps-master/example/mxnet/train_imagenet_byteps.py
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "L...
2,218
32.119403
92
py
byteps
byteps-master/example/mxnet/train_gluon_imagenet_byteps_gc.py
import argparse import logging import math import os import subprocess import time import gluoncv as gcv import mxnet as mx import numpy as np from gluoncv.data import imagenet from gluoncv.model_zoo import get_model from gluoncv.utils import LRScheduler, LRSequential, makedirs from mxnet import autograd as ag from mx...
23,900
42.377495
119
py
byteps
byteps-master/example/mxnet/symbols/inception-resnet-v2.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
6,943
42.672956
117
py
byteps
byteps-master/example/mxnet/symbols/resnet.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
9,630
47.888325
147
py
byteps
byteps-master/example/mxnet/symbols/mobilenetv2.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
7,343
32.534247
119
py
byteps
byteps-master/example/mxnet/symbols/vgg.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
3,634
46.207792
154
py
byteps
byteps-master/example/mxnet/symbols/inception-v3.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
10,858
54.974227
152
py
byteps
byteps-master/example/mxnet/symbols/mlp.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
1,434
42.484848
84
py
byteps
byteps-master/example/mxnet/symbols/googlenet.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
4,170
56.136986
141
py
byteps
byteps-master/example/mxnet/symbols/resnetv1.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
10,040
48.955224
147
py
byteps
byteps-master/example/mxnet/symbols/resnext.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
9,928
46.056872
159
py
byteps
byteps-master/example/mxnet/symbols/inception-v4.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
8,706
39.310185
152
py
byteps
byteps-master/example/mxnet/symbols/lenet.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
2,957
44.507692
97
py
byteps
byteps-master/example/mxnet/symbols/mobilenet.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
8,457
57.331034
174
py
byteps
byteps-master/example/mxnet/symbols/resnet-v1.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
10,040
48.955224
147
py
byteps
byteps-master/example/mxnet/symbols/inception-bn.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
7,598
51.406897
141
py
byteps
byteps-master/example/mxnet/symbols/alexnet.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
3,218
45.652174
181
py
byteps
byteps-master/example/mxnet/common/fit.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
14,826
42.737463
132
py
byteps
byteps-master/example/mxnet/common/find_mxnet.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
995
38.84
63
py
byteps
byteps-master/example/mxnet/common/data.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
10,469
49.57971
103
py
byteps
byteps-master/example/mxnet/common/fit_byteps.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
13,661
40.274924
132
py