python_code stringlengths 0 1.02M | repo_name stringlengths 9 48 | file_path stringlengths 5 114 |
|---|---|---|
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/eval_gan_lib.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/main.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/eval_utils.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/image_similarity.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/fid_score_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/prd_score.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/prd_score_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/fractal_dimension.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/__init__.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/ms_ssim_score.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/jacobian_conditioning.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/fractal_dimension_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/gilbo.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/jacobian_conditioning_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/eval_task.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/inception_score.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/kid_score.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/accuracy.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/fid_score.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/metrics/ms_ssim_score_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/architectures_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/arch_ops_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/sndcgan.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/resnet_stl.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/resnet_biggan.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/resnet_norm_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/infogan.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/resnet5.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/resnet_init_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/resnet_cifar.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/abstract_arch.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/__init__.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/resnet_ops.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/resnet_biggan_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/dcgan.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/arch_ops.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/resnet30.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/arch_ops_tpu_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/resnet_biggan_deep.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/architectures/resnet_biggan_deep_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/tpu/tpu_ops.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/tpu/tpu_random.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/tpu/tpu_ops_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/tpu/__init__.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/tpu/tpu_summaries.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/tpu/tpu_random_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/modular_gan.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/modular_gan_conditional_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/abstract_gan.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/__init__.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/clgan_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/penalty_lib.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/consts.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/s3gan.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/ops.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/ssgan_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/s3gan_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/utils.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/modular_gan_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/modular_gan_tpu_test.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/loss_lib.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/ssgan.py |
# coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 applicable ... | compare_gan-master | compare_gan/gans/clgan.py |
# Welcome to the PyTorch setup.py.
#
# Environment variables you are probably interested in:
#
# DEBUG
# build with -O0 and -g (debug symbols)
#
# REL_WITH_DEB_INFO
# build with optimizations and -g (debug symbols)
#
# MAX_JOBS
# maximum number of compile jobs we should use to compile your code
#
# ... | pytorch-master | setup.py |
#!/usr/bin/env python3
import json
from pathlib import Path
def main() -> None:
folder = Path(".vscode")
recommended = json.loads((folder / "settings_recommended.json").read_text())
path = folder / "settings.json"
try:
current = json.loads(path.read_text())
except Exception:
curre... | pytorch-master | tools/vscode_settings.py |
#!/usr/bin/env python3
import argparse
import re
import sys
from pathlib import Path
from typing import Any, Dict, Optional
import yaml
from typing_extensions import TypedDict
Step = Dict[str, Any]
class Script(TypedDict):
extension: str
script: str
def extract(step: Step) -> Optional[Script]:
run = ... | pytorch-master | tools/extract_scripts.py |
"""Tool to fix the nvcc's dependecy file output
Usage: python nvcc_fix_deps.py nvcc [nvcc args]...
This wraps nvcc to ensure that the dependency file created by nvcc with the
-MD flag always uses absolute paths. nvcc sometimes outputs relative paths,
which ninja interprets as an unresolved dependency, so it triggers ... | pytorch-master | tools/nvcc_fix_deps.py |
import argparse
import os
import os.path
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--input-file")
parser.add_argument("--output-file")
parser.add_argument("--install_dir")
parser.add_argument("--replace", action="append", nargs=2)
options = parser.parse... | pytorch-master | tools/substitute.py |
#!/usr/bin/env python3
import argparse
import array
import glob
import os
import re
import sys
import subprocess
from torchgen.code_template import CodeTemplate
H_NAME = "spv.h"
CPP_NAME = "spv.cpp"
DEFAULT_ENV = {"precision": "highp", "format": "rgba32f"}
def getName(filePath):
return os.path.basename(filePath)... | pytorch-master | tools/gen_vulkan_spv.py |
pytorch-master | tools/__init__.py | |
#!/usr/bin/env python3
import argparse
import os
from typing import Any, List, Union
try:
from junitparser import ( # type: ignore[import]
Error,
Failure,
JUnitXml,
TestCase,
TestSuite,
)
except ImportError:
raise ImportError(
"junitparser not found, please... | pytorch-master | tools/render_junit.py |
import argparse
import sys
from os.path import abspath, dirname
# By appending pytorch_root to sys.path, this module can import other torch
# modules even when run as a standalone script. i.e., it's okay either you
# do `python build_libtorch.py` or `python -m tools.build_libtorch`.
pytorch_root = dirname(dirname(absp... | pytorch-master | tools/build_libtorch.py |
"""This script updates the file torch/_masked/_docs.py that contains
the generated doc-strings for various masked operations. The update
should be triggered whenever a new masked operation is introduced to
torch._masked package. Running the script requires that torch package
is functional.
"""
import os
def main() -... | pytorch-master | tools/update_masked_docs.py |
import argparse
import os
import re
import subprocess
from pathlib import Path
from typing import Optional, Union
from setuptools import distutils # type: ignore[import]
UNKNOWN = "Unknown"
RELEASE_PATTERN = re.compile(r"/v[0-9]+(\.[0-9]+)*(-rc[0-9]+)?/")
def get_sha(pytorch_root: Union[str, Path]) -> str:
tr... | pytorch-master | tools/generate_torch_version.py |
import argparse
import gzip
import os
import sys
from urllib.error import URLError
from urllib.request import urlretrieve
MIRRORS = [
"http://yann.lecun.com/exdb/mnist/",
"https://ossci-datasets.s3.amazonaws.com/mnist/",
]
RESOURCES = [
"train-images-idx3-ubyte.gz",
"train-labels-idx1-ubyte.gz",
"... | pytorch-master | tools/download_mnist.py |
import os
import platform
import shutil
from glob import glob
from typing import Dict, Optional
from setuptools import distutils # type: ignore[import]
from .setup_helpers.cmake import CMake, USE_NINJA
from .setup_helpers.env import check_negative_env_flag, IS_64BIT, IS_WINDOWS
def _overlay_windows_vcvars(env: Di... | pytorch-master | tools/build_pytorch_libs.py |
#!/usr/bin/env python3
# Much of the logging code here was forked from https://github.com/ezyang/ghstack
# Copyright (c) Edward Z. Yang <ezyang@mit.edu>
"""Checks out the nightly development version of PyTorch and installs pre-built
binaries into the repo.
You can use this script to check out a new nightly branch with... | pytorch-master | tools/nightly.py |
import textwrap
from typing import Any
import gdb # type: ignore[import]
class DisableBreakpoints:
"""
Context-manager to temporarily disable all gdb breakpoints, useful if
there is a risk to hit one during the evaluation of one of our custom
commands
"""
def __enter__(self) -> None:
... | pytorch-master | tools/gdb/pytorch-gdb.py |
import re
import sys
QUOTE_INCLUDE_RE = re.compile(r'^#include "(.*)"')
ANGLE_INCLUDE_RE = re.compile(r"^#include <(.*)>")
# By default iwyu will pick the C include, but we prefer the C++ headers
STD_C_HEADER_MAP = {
"<assert.h>": "<cassert>",
"<complex.h>": "<ccomplex>",
"<ctype.h>": "<cctype>",
"<er... | pytorch-master | tools/iwyu/fixup.py |
import itertools
import re
import shlex
import unittest
from typing import List, Optional
from tools.stats import test_history
from typing_extensions import TypedDict
class Example(TypedDict):
cmd: str
args: List[str]
lines: List[str]
def parse_block(block: List[str]) -> Optional[Example]:
if block... | pytorch-master | tools/test/test_test_history.py |
import random
import unittest
from typing import Dict, List, Tuple
from tools.testing.test_selections import calculate_shards
class TestCalculateShards(unittest.TestCase):
tests: List[str] = [
"super_long_test",
"long_test1",
"long_test2",
"normal_test1",
"normal_test2",
... | pytorch-master | tools/test/test_test_selections.py |
import unittest
from torchgen.utils import NamespaceHelper
class TestNamespaceHelper(unittest.TestCase):
def test_create_from_namespaced_tuple(self) -> None:
helper = NamespaceHelper.from_namespaced_entity("aten::add")
self.assertEqual(helper.entity_name, "add")
self.assertEqual(helper.ge... | pytorch-master | tools/test/test_utils.py |
# -*- coding: utf-8 -*-
import unittest
from typing import Dict, List
from tools.stats import print_test_stats
from tools.stats.s3_stat_parser import (
Commit,
Report,
ReportMetaMeta,
Status,
Version1Case,
Version1Report,
Version2Case,
Version2Report,
)
def fakehash(char: str) -> str:... | pytorch-master | tools/test/test_stats.py |
#!/usr/bin/env python3
# Copyright 2004-present Facebook. All Rights Reserved.
import unittest
from gen_operators_yaml import make_filter_from_options, verify_all_specified_present
class GenOperatorsYAMLTest(unittest.TestCase):
def setUp(self):
pass
def test_filter_creation(self):
filter_fu... | pytorch-master | tools/test/gen_operators_yaml_test.py |
# Owner(s): ["module: codegen"]
import os
import tempfile
import unittest
import expecttest
from torchgen.gen import _GLOBAL_PARSE_NATIVE_YAML_CACHE # noqa: F401
from torchgen.gen_backend_stubs import run
path = os.path.dirname(os.path.realpath(__file__))
gen_backend_stubs_path = os.path.join(path, "../torchgen/ge... | pytorch-master | tools/test/test_gen_backend_stubs.py |
from __future__ import absolute_import, division, print_function, unicode_literals
import unittest
from torchgen.selective_build.operator import *
from torchgen.model import Location, NativeFunction
from torchgen.selective_build.selector import (
combine_selective_builders,
SelectiveBuilder,
)
class TestSel... | pytorch-master | tools/test/test_selective_build.py |
import os
import unittest
from tools.stats.upload_test_stats import get_tests, summarize_test_cases
IN_CI = os.environ.get("CI")
class TestUploadTestStats(unittest.TestCase):
@unittest.skipIf(
IN_CI,
"don't run in CI as this does a lot of network calls and uses up GH API rate limit",
)
d... | pytorch-master | tools/test/test_upload_test_stats.py |
# Owner(s): ["module: codegen"]
import textwrap
import unittest
from typing import cast
import expecttest
import torchgen.dest as dest
import torchgen.gen as gen
import yaml
from torchgen.gen import LineLoader, parse_native_yaml_struct
from torchgen.model import CustomClassType, DispatchKey, NativeFunctionsGroup, Ty... | pytorch-master | tools/test/test_codegen_model.py |
import os
import unittest
from typing import List
from unittest.mock import patch
from tools.stats.import_test_stats import get_disabled_issues
class TestGetDisabledIssues(unittest.TestCase):
def run_assert_disabled_issues(
self, pr_body: str, commit_messages: str, expected: List[str]
) -> None:
... | pytorch-master | tools/test/test_import_test_stats.py |
import contextlib
import os
import typing
import unittest
import unittest.mock
from typing import Iterator, Optional, Sequence
import tools.setup_helpers.cmake
import tools.setup_helpers.env # noqa: F401 unused but resolves circular import
T = typing.TypeVar("T")
class TestCMake(unittest.TestCase):
@unittest... | pytorch-master | tools/test/test_cmake.py |
#!/usr/bin/env python3
# Copyright 2004-present Facebook. All Rights Reserved.
import unittest
from unittest.mock import MagicMock
from gen_oplist import throw_if_any_op_includes_overloads
class GenOplistTest(unittest.TestCase):
def setUp(self):
pass
def test_throw_if_any_op_includes_overloads(self... | pytorch-master | tools/test/gen_oplist_test.py |
import dataclasses
import typing
import unittest
from collections import defaultdict
from typing import Dict, List
import torchgen.model
import yaml
from tools.autograd import gen_autograd_functions, load_derivatives
from torchgen.gen import (
get_native_function_declarations,
get_native_function_schema_regi... | pytorch-master | tools/test/test_codegen.py |
#!/usr/bin/env python3
"""Updates the default value of opset_version.
The current policy is that the default should be set to the
latest released version as of 18 months ago.
Usage:
Run with no arguments.
"""
import datetime
import os
import pathlib
import re
import subprocess
import sys
from subprocess import DEVN... | pytorch-master | tools/onnx/update_default_opset_version.py |
#!/usr/bin/env python3
import argparse
import asyncio
import collections
import csv
import hashlib
import itertools
import os
import pathlib
import re
import shlex
import shutil
import subprocess
import sys
import time
from typing import Awaitable, cast, DefaultDict, Dict, List, Match, Optional, Set
from typing_exten... | pytorch-master | tools/fast_nvcc/fast_nvcc.py |
pytorch-master | tools/linter/__init__.py | |
import argparse
import concurrent.futures
import json
import logging
import os
import re
import subprocess
import time
from enum import Enum
from typing import List, NamedTuple, Optional, Pattern
LINTER_CODE = "ACTIONLINT"
class LintSeverity(str, Enum):
ERROR = "error"
WARNING = "warning"
ADVICE = "advi... | pytorch-master | tools/linter/adapters/actionlint_linter.py |
"""
Generic linter that greps for a pattern and optionally suggests replacements.
"""
import argparse
import json
import logging
import os
import subprocess
import sys
import time
from enum import Enum
from typing import Any, List, NamedTuple, Optional
IS_WINDOWS: bool = os.name == "nt"
def eprint(*args: Any, **kw... | pytorch-master | tools/linter/adapters/grep_linter.py |
import argparse
import concurrent.futures
import json
import logging
import os
import re
import subprocess
import time
from enum import Enum
from typing import List, NamedTuple, Optional, Pattern
LINTER_CODE = "CMAKE"
class LintSeverity(str, Enum):
ERROR = "error"
WARNING = "warning"
ADVICE = "advice"
... | pytorch-master | tools/linter/adapters/cmake_linter.py |
"""Checks for consistency of jobs between different GitHub workflows.
Any job with a specific `sync-tag` must match all other jobs with the same `sync-tag`.
"""
import argparse
import itertools
import json
from collections import defaultdict
from enum import Enum
from pathlib import Path
from typing import Any, Dict, ... | pytorch-master | tools/linter/adapters/workflow_consistency_linter.py |
import argparse
import concurrent.futures
import json
import logging
import os
import subprocess
import sys
import time
from enum import Enum
from typing import Any, BinaryIO, List, NamedTuple, Optional
IS_WINDOWS: bool = os.name == "nt"
def eprint(*args: Any, **kwargs: Any) -> None:
print(*args, file=sys.stder... | pytorch-master | tools/linter/adapters/black_linter.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.