python_code stringlengths 0 679k | repo_name stringlengths 9 41 | file_path stringlengths 6 149 |
|---|---|---|
import argparse
import os
import random
import shutil
import time
import warnings
import aistore
from aistore.client import Bck, Client
from aistore.client.transform import WDTransform
import webdataset as wds
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import tor... | aistore-master | docs/examples/etl-imagenet-wd/pytorch_wd.py |
import argparse
import os
import random
import shutil
import time
import warnings
import aistore
from aistore.client import Bck
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
import torchvi... | aistore-master | docs/examples/etl-imagenet-dataset/train_aistore.py |
import argparse
import os
import random
import shutil
import time
import warnings
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
import torchvision.transforms as transforms
import torchvisio... | aistore-master | docs/examples/etl-imagenet-dataset/train_pytorch.py |
import os
import io
import sys
from PIL import Image
from torchvision import transforms
import torch
from aistore.pytorch import AISDataset
from aistore.sdk import Client
from aistore.sdk.multiobj import ObjectRange
AISTORE_ENDPOINT = os.getenv("AIS_ENDPOINT", "http://192.168.49.2:8080")
client = Client(AISTORE_ENDPO... | aistore-master | docs/examples/transform-images-sdk/transform_sdk.py |
import matplotlib.pyplot as plt
import numpy as np
from torchvision import transforms
import webdataset as wds
# Utility that displays even number of images based on loader
# pylint: disable=unused-variable
def display_loader_images(data_loader, objects=2):
test_iter = iter(data_loader)
printed = 0
row ... | aistore-master | docs/assets/wd_aistore/utils.py |
import msgpack
import os
def unpack_msgpack(path):
with open(path, "rb") as f:
data = f.read()
files_dict = msgpack.unpackb(data, raw=False)
for name, content in files_dict.items():
fqn = os.path.join("/tmp/unpacked", name)
with open(fqn, "wb") as fh:
... | aistore-master | cmn/tests/python/unpack.py |
from setuptools import find_packages, setup
with open('README.md', 'r') as f:
long_description = f.read()
with open('VERSION', 'r') as f:
version = f.read().strip()
extras = {
'tfrecord': ['tensorflow >= 1.14.0,!=2.0.x,!=2.1.x,!=2.2.0,!=2.4.0'],
'mxnet': ['mxnet >= 1.6.0,!=1.8.0']
}
extras['all'] = ... | Imageinary-main | setup.py |
Imageinary-main | tests/__init__.py | |
Imageinary-main | tests/unit/__init__.py | |
# Copyright (c) 2020, NVIDIA CORPORATION. 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 applic... | Imageinary-main | tests/unit/test_units.py |
Imageinary-main | tests/functional/__init__.py | |
# Copyright (c) 2020, NVIDIA CORPORATION. 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 applic... | Imageinary-main | tests/functional/test_jpg_creation.py |
# Copyright (c) 2020, NVIDIA CORPORATION. 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 applic... | Imageinary-main | tests/functional/test_png_creation.py |
# Copyright (c) 2020, NVIDIA CORPORATION. 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 applic... | Imageinary-main | tests/functional/test_recordio.py |
# Copyright (c) 2020, NVIDIA CORPORATION. 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 applic... | Imageinary-main | tests/functional/test_tfrecord.py |
#!/usr/bin/env python
# Copyright (c) 2020, NVIDIA CORPORATION. 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
#
# Unl... | Imageinary-main | imagine/imagine.py |
from imagine.imagine import (create_images,
create_recordio,
create_tfrecords,
_main)
| Imageinary-main | imagine/__init__.py |
# Adapted from https://github.com/jik876/hifi-gan under the MIT license.
# LICENSE is in incl_licenses directory.
import os
import shutil
class AttrDict(dict):
def __init__(self, *args, **kwargs):
super(AttrDict, self).__init__(*args, **kwargs)
self.__dict__ = self
def build_env(config, confi... | BigVGAN-main | env.py |
# Copyright (c) 2022 NVIDIA CORPORATION.
# Licensed under the MIT license.
# Adapted from https://github.com/jik876/hifi-gan under the MIT license.
# LICENSE is in incl_licenses directory.
import torch
import torch.nn.functional as F
import torch.nn as nn
from torch.nn import Conv1d, ConvTranspose1d, Conv2d
fro... | BigVGAN-main | models.py |
# Implementation adapted from https://github.com/EdwardDixon/snake under the MIT license.
# LICENSE is in incl_licenses directory.
import torch
from torch import nn, sin, pow
from torch.nn import Parameter
class Snake(nn.Module):
'''
Implementation of a sine-based periodic activation function
Shape:
... | BigVGAN-main | activations.py |
# Adapted from https://github.com/jik876/hifi-gan under the MIT license.
# LICENSE is in incl_licenses directory.
import glob
import os
import matplotlib
import torch
from torch.nn.utils import weight_norm
matplotlib.use("Agg")
import matplotlib.pylab as plt
from meldataset import MAX_WAV_VALUE
from scipy.io.wavfile... | BigVGAN-main | utils.py |
# Adapted from https://github.com/jik876/hifi-gan under the MIT license.
# LICENSE is in incl_licenses directory.
from __future__ import absolute_import, division, print_function, unicode_literals
import glob
import os
import numpy as np
import argparse
import json
import torch
from scipy.io.wavfile import write
fr... | BigVGAN-main | inference_e2e.py |
# Copyright (c) 2022 NVIDIA CORPORATION.
# Licensed under the MIT license.
# Adapted from https://github.com/jik876/hifi-gan under the MIT license.
# LICENSE is in incl_licenses directory.
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
import itertools
import os
import time
impor... | BigVGAN-main | train.py |
# Adapted from https://github.com/jik876/hifi-gan under the MIT license.
# LICENSE is in incl_licenses directory.
from __future__ import absolute_import, division, print_function, unicode_literals
import glob
import os
import argparse
import json
import torch
from scipy.io.wavfile import write
from env import AttrD... | BigVGAN-main | inference.py |
# Copyright (c) 2022 NVIDIA CORPORATION.
# Licensed under the MIT license.
# Adapted from https://github.com/jik876/hifi-gan under the MIT license.
# LICENSE is in incl_licenses directory.
import math
import os
import random
import torch
import torch.utils.data
import numpy as np
from librosa.util import normali... | BigVGAN-main | meldataset.py |
# Adapted from https://github.com/junjun3518/alias-free-torch under the Apache License 2.0
# LICENSE is in incl_licenses directory.
import torch.nn as nn
from torch.nn import functional as F
from .filter import LowPassFilter1d
from .filter import kaiser_sinc_filter1d
class UpSample1d(nn.Module):
def __init__(s... | BigVGAN-main | alias_free_torch/resample.py |
# Adapted from https://github.com/junjun3518/alias-free-torch under the Apache License 2.0
# LICENSE is in incl_licenses directory.
from .filter import *
from .resample import *
from .act import * | BigVGAN-main | alias_free_torch/__init__.py |
# Adapted from https://github.com/junjun3518/alias-free-torch under the Apache License 2.0
# LICENSE is in incl_licenses directory.
import torch.nn as nn
from .resample import UpSample1d, DownSample1d
class Activation1d(nn.Module):
def __init__(self,
activation,
up_ratio: int ... | BigVGAN-main | alias_free_torch/act.py |
# Adapted from https://github.com/junjun3518/alias-free-torch under the Apache License 2.0
# LICENSE is in incl_licenses directory.
import torch
import torch.nn as nn
import torch.nn.functional as F
import math
if 'sinc' in dir(torch):
sinc = torch.sinc
else:
# This code is adopted from adefossez's julius.c... | BigVGAN-main | alias_free_torch/filter.py |
# Copyright (c) 2022 NVIDIA CORPORATION.
# Licensed under the MIT license.
import os, glob
def get_wav_and_text_filelist(data_root, data_type, subsample=1):
wav_list = sorted([path.replace(data_root, "")[1:] for path in glob.glob(os.path.join(data_root, data_type, "**/**/*.wav"))])
wav_list = wav_list[::su... | BigVGAN-main | parse_scripts/parse_libritts.py |
import os
import ctypes
import time
import sys
import argparse
import cv2
import numpy as np
from PIL import Image
import tensorrt as trt
import utils.inference as inference_utils # TRT/TF inference wrappers
import utils.model as model_utils # UFF conversion
import utils.boxes as boxes_utils # Drawing bounding boxes
... | object-detection-tensorrt-example-master | SSD_Model/detect_objects_webcam.py |
# COCO dataset utility functions
import numpy as np
COCO_CLASSES_LIST = [
'unlabeled',
'person',
'bicycle',
'car',
'motorcycle',
'airplane',
'bus',
'train',
'truck',
'boat',
'traffic light',
'fire hydrant',
'street sign',
'stop sign',
'parking meter',
'b... | object-detection-tensorrt-example-master | SSD_Model/utils/coco.py |
#!/usr/bin/env python3
#
# Copyright 1993-2019 NVIDIA Corporation. All rights reserved.
#
# NOTICE TO LICENSEE:
#
# This source code and/or documentation ("Licensed Deliverables") are
# subject to NVIDIA intellectual property rights under U.S. and
# international Copyright laws.
#
# These Licensed Deliverables contain... | object-detection-tensorrt-example-master | SSD_Model/utils/voc_evaluation.py |
# uff_ssd path management singleton class
import os
import sys
import tensorrt as trt
class Paths(object):
def __init__(self):
self._SAMPLE_ROOT = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
os.pardir
)
self._FLATTEN_CONCAT_PLUGIN_PATH = os.path.join(
... | object-detection-tensorrt-example-master | SSD_Model/utils/paths.py |
object-detection-tensorrt-example-master | SSD_Model/utils/__init__.py | |
# Utility functions for drawing bounding boxes on PIL images
import numpy as np
import PIL.ImageDraw as ImageDraw
import PIL.ImageFont as ImageFont
def draw_bounding_boxes_on_image(image,
boxes,
color=(255, 0, 0),
thick... | object-detection-tensorrt-example-master | SSD_Model/utils/boxes.py |
# Model download and UFF convertion utils
import os
import sys
import tarfile
import requests
import tensorflow as tf
import tensorrt as trt
import graphsurgeon as gs
import uff
from utils.paths import PATHS
# UFF conversion functionality
# This class contains converted (UFF) model metadata
class ModelData(object)... | object-detection-tensorrt-example-master | SSD_Model/utils/model.py |
import tensorrt as trt
import os
import pycuda.driver as cuda
import pycuda.autoinit
from PIL import Image
import numpy as np
# For reading size information from batches
import struct
IMG_H, IMG_W, IMG_CH = 300, 300, 3
class SSDEntropyCalibrator(trt.IInt8EntropyCalibrator2):
def __init__(self, data_dir, cache_f... | object-detection-tensorrt-example-master | SSD_Model/utils/calibrator.py |
# VOC mAP computation, based on https://github.com/amdegroot/ssd.pytorch
import os
import sys
import pickle
import numpy as np
if sys.version_info[0] == 2:
import xml.etree.cElementTree as ET
else:
import xml.etree.ElementTree as ET
import utils.voc as voc_utils
from utils.paths import PATHS
def parse_voc_a... | object-detection-tensorrt-example-master | SSD_Model/utils/mAP.py |
# Utility functions for building/saving/loading TensorRT Engine
import sys
import os
import cv2
import tensorrt as trt
import pycuda.driver as cuda
import numpy as np
from PIL import Image
from utils.model import ModelData
# ../../common.py
sys.path.insert(1,
os.path.join(
os.path.dirname(os.path.realpat... | object-detection-tensorrt-example-master | SSD_Model/utils/engine.py |
#
# Copyright 1993-2019 NVIDIA Corporation. All rights reserved.
#
# NOTICE TO LICENSEE:
#
# This source code and/or documentation ("Licensed Deliverables") are
# subject to NVIDIA intellectual property rights under U.S. and
# international Copyright laws.
#
# These Licensed Deliverables contained herein is PROPRIETAR... | object-detection-tensorrt-example-master | SSD_Model/utils/common.py |
# Utility functions for performing image inference
#
# Copyright 1993-2019 NVIDIA Corporation. All rights reserved.
#
# NOTICE TO LICENSEE:
#
# This source code and/or documentation ("Licensed Deliverables") are
# subject to NVIDIA intellectual property rights under U.S. and
# international Copyright laws.
#
# These L... | object-detection-tensorrt-example-master | SSD_Model/utils/inference.py |
# VOC dataset utility functions
import numpy as np
VOC_CLASSES_LIST = [
'aeroplane',
'bicycle',
'bird',
'boat',
'bottle',
'bus',
'car',
'cat',
'chair',
'cow',
'diningtable',
'dog',
'horse',
'motorbike',
'person',
'pottedplant',
'sheep',
'sofa',
... | object-detection-tensorrt-example-master | SSD_Model/utils/voc.py |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above ... | ngc-container-replicator-master | python/setup.py |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above ... | ngc-container-replicator-master | python/tests/test_nvidia_deepops.py |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice,... | ngc-container-replicator-master | python/tests/__init__.py |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice,... | ngc-container-replicator-master | python/nvidia_deepops/__init__.py |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice,... | ngc-container-replicator-master | python/nvidia_deepops/cli.py |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice,... | ngc-container-replicator-master | python/nvidia_deepops/utils.py |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice,... | ngc-container-replicator-master | python/nvidia_deepops/progress.py |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice,... | ngc-container-replicator-master | python/nvidia_deepops/docker/__init__.py |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice,... | ngc-container-replicator-master | python/nvidia_deepops/docker/registry/dockregistry.py |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice,... | ngc-container-replicator-master | python/nvidia_deepops/docker/registry/ngcregistry.py |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice,... | ngc-container-replicator-master | python/nvidia_deepops/docker/registry/dgxregistry.py |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice,... | ngc-container-replicator-master | python/nvidia_deepops/docker/registry/__init__.py |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice,... | ngc-container-replicator-master | python/nvidia_deepops/docker/registry/base.py |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice,... | ngc-container-replicator-master | python/nvidia_deepops/docker/client/__init__.py |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice,... | ngc-container-replicator-master | python/nvidia_deepops/docker/client/dockerpy.py |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice,... | ngc-container-replicator-master | python/nvidia_deepops/docker/client/dockercli.py |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice,... | ngc-container-replicator-master | python/nvidia_deepops/docker/client/base.py |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
requirements = [
'Click>=6.0',
# TODO: put package requirements here
]
setup_requirements = [
'pytest-runner',
# TODO(ryanolson): put setup requirements (distutils extensions, etc.) here... | ngc-container-replicator-master | replicator/setup.py |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import subprocess
import sys
import tempfile
"""Tests for `ngc_replicator` package."""
import pytest
from ngc_replicator import ngc_replicator
try:
from .secrets import ngcpassword, dgxpassword
HAS_SECRETS = True
except Exception:
HAS_SECRETS = Fal... | ngc-container-replicator-master | replicator/tests/test_ngc_replicator.py |
# -*- coding: utf-8 -*-
"""Unit test package for ngc_replicator."""
| ngc-container-replicator-master | replicator/tests/__init__.py |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: replicator.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _re... | ngc-container-replicator-master | replicator/ngc_replicator/replicator_pb2.py |
# -*- coding: utf-8 -*-
"""Top-level package for NGC Replicator."""
__author__ = """Ryan Olson"""
__email__ = 'rolson@nvidia.com'
__version__ = '0.4.0'
| ngc-container-replicator-master | replicator/ngc_replicator/__init__.py |
# -*- coding: utf-8 -*-
import collections
import json
import logging
import os
import pprint
import re
import time
from concurrent import futures
import click
#import grpc
import yaml
from nvidia_deepops import Progress, utils
from nvidia_deepops.docker import DockerClient, NGCRegistry, DGXRegistry
from . import r... | ngc-container-replicator-master | replicator/ngc_replicator/ngc_replicator.py |
# Magnum IO Developer Environment container recipe
Stage0 += comment('GENERATED FILE, DO NOT EDIT')
Stage0 += baseimage(image='nvcr.io/nvidia/cuda:11.4.0-devel-ubuntu20.04')
# GDS 1.0 is part of the CUDA base image
Stage0 += nsight_systems(cli=True, version='2021.2.1')
Stage0 += mlnx_ofed(version='5.3-1.0.0.1')
Stag... | MagnumIO-main | dev-env/magnum-io-hpccm.py |
# MIT License
#
# Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation ... | MagnumIO-main | gds/benchmarks/pytorch/deepCam-inference/driver/test_numpy_dali.py |
# MIT License
#
# Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation ... | MagnumIO-main | gds/benchmarks/pytorch/deepCam-inference/utils/parser.py |
# MIT License
#
# Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation ... | MagnumIO-main | gds/benchmarks/pytorch/deepCam-inference/utils/download_data.py |
# MIT License
#
# Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation ... | MagnumIO-main | gds/benchmarks/pytorch/deepCam-inference/utils/model_handler.py |
# MIT License
#
# Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation ... | MagnumIO-main | gds/benchmarks/pytorch/deepCam-inference/utils/losses.py |
# MIT License
#
# Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation ... | MagnumIO-main | gds/benchmarks/pytorch/deepCam-inference/utils/h52npy.py |
# MIT License
#
# Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation ... | MagnumIO-main | gds/benchmarks/pytorch/deepCam-inference/utils/visualizer.py |
# MIT License
#
# Copyright (c) 2018 Pyjcsx, 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including withou... | MagnumIO-main | gds/benchmarks/pytorch/deepCam-inference/architecture/deeplab_xception.py |
# MIT License
#
# Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation ... | MagnumIO-main | gds/benchmarks/pytorch/deepCam-inference/architecture/__init__.py |
# MIT License
#
# Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation ... | MagnumIO-main | gds/benchmarks/pytorch/deepCam-inference/data/cam_numpy_dali_dataset.py |
# Copyright (c) 2020, NVIDIA CORPORATION. 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 applic... | MagnumIO-main | gds/readers/pytorch-numpy/setup.py |
# Copyright (c) 2020, NVIDIA CORPORATION. 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 applic... | MagnumIO-main | gds/readers/pytorch-numpy/python/__init__.py |
# Copyright (c) 2020, NVIDIA CORPORATION. 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 applic... | MagnumIO-main | gds/readers/pytorch-numpy/python/example.py |
from cucim.clara.filesystem import CuFileDriver
import cucim.clara.filesystem as fs
import os
import cupy as cp
import torch
# Write a file with size 10 (in bytes)
with open("input.raw", "wb") as input_file:
input_file.write(
bytearray([101, 102, 103, 104, 105, 106, 107, 108, 109, 110]))
# Create a CuPy a... | MagnumIO-main | gds/readers/cucim-gds/test_gds.py |
#!/usr/bin/env python
import argparse
import math
import os
import sys
from nvbench_json import reader
import tabulate
# Parse version string into tuple, "x.y.z" -> (x, y, z)
def version_tuple(v):
return tuple(map(int, (v.split("."))))
tabulate_version = version_tuple(tabulate.__version__)
all_devices = []
... | nvbench-main | scripts/nvbench_walltime.py |
#!/usr/bin/env python
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import argparse
import os
import sys
from nvbench_json import reader
def parse_files():
help_text = "%(prog)s [nvbench.out.json | dir/] ..."
parser = argparse.ArgumentParser(prog='nvbench_histo... | nvbench-main | scripts/nvbench_histogram.py |
#!/usr/bin/env python
import argparse
import math
import os
import sys
from colorama import Fore
import tabulate
from nvbench_json import reader
# Parse version string into tuple, "x.y.z" -> (x, y, z)
def version_tuple(v):
return tuple(map(int, (v.split("."))))
tabulate_version = version_tuple(tabulate.__ver... | nvbench-main | scripts/nvbench_compare.py |
file_version = (1, 0, 0)
file_version_string = "{}.{}.{}".format(file_version[0],
file_version[1],
file_version[2])
def check_file_version(filename, root_node):
try:
version_node = root_node["meta"]["version"]["json"]
exc... | nvbench-main | scripts/nvbench_json/version.py |
from . import reader
from . import version
| nvbench-main | scripts/nvbench_json/__init__.py |
import json
from . import version
def read_file(filename):
with open(filename, "r") as f:
file_root = json.load(f)
version.check_file_version(filename, file_root)
return file_root
| nvbench-main | scripts/nvbench_json/reader.py |
# Copyright (c) 2023, NVIDIA CORPORATION & 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | modulus-sym-main | modulus/sym/key.py |
# Copyright (c) 2023, NVIDIA CORPORATION & 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | modulus-sym-main | modulus/sym/graph.py |
# Copyright (c) 2023, NVIDIA CORPORATION & 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | modulus-sym-main | modulus/sym/constants.py |
# Copyright (c) 2023, NVIDIA CORPORATION & 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | modulus-sym-main | modulus/sym/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION & 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | modulus-sym-main | modulus/sym/trainer.py |
# Copyright (c) 2023, NVIDIA CORPORATION & 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | modulus-sym-main | modulus/sym/node.py |
# Copyright (c) 2023, NVIDIA CORPORATION & 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | modulus-sym-main | modulus/sym/manager.py |
# Copyright (c) 2023, NVIDIA CORPORATION & 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | modulus-sym-main | modulus/sym/loss/aggregator.py |
# Copyright (c) 2023, NVIDIA CORPORATION & 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | modulus-sym-main | modulus/sym/loss/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION & 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | modulus-sym-main | modulus/sym/loss/loss.py |
# Copyright (c) 2023, NVIDIA CORPORATION & 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | modulus-sym-main | modulus/sym/distributed/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION & 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | modulus-sym-main | modulus/sym/distributed/helpers.py |
# Copyright (c) 2023, NVIDIA CORPORATION & 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | modulus-sym-main | modulus/sym/distributed/manager.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.