python_code
stringlengths
0
4.04M
repo_name
stringlengths
7
58
file_path
stringlengths
5
147
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/parser/inference/targets/target_grammar.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/parser/inference/targets/generate_spider_grammars.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/parser/data/tokenization_utils.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/parser/data/data_constants.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/parser/data/write_examples.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/parser/data/example_converter.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/parser/data/forest_serialization.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/parser/data/parsing_utils.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/qcfg/qcfg_rule.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/qcfg/qcfg_file.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/qcfg/qcfg_parser.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/qcfg/qcfg_parser_test.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/qcfg/compute_recall.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/induction/induction_utils.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/induction/split_utils.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/induction/rule_utils.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/induction/codelength_utils.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/induction/exact_match_utils.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/induction/induce_rules.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # Copyright (c) Meta Platforms, Inc. and 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 # ...
CompGenRep_MLRC2022-main
baseline_replication/TMCD/model/induction/derivation_utils.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """ Training script for permute MNIST experiment. """ from __future__ import print_function import argparse import os import ...
agem-main
fc_permute_mnist.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """ Training script for split AWA experiment. """ from __future__ import print_function import argparse import os import sys ...
agem-main
conv_split_awa.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """ Training script for split CUB experiment. """ from __future__ import print_function import argparse import os import sys ...
agem-main
conv_split_cub.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """ Training script for split CIFAR 100 experiment. """ from __future__ import print_function import argparse import os impor...
agem-main
conv_split_cifar.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """ Training script for split AWA experiment with hybrid learning. """ from __future__ import print_function import argparse ...
agem-main
conv_split_awa_hybrid.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """ Training script for split CUB experiment with zero shot transfer. """ from __future__ import print_function import argpar...
agem-main
conv_split_cub_hybrid.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import math import tensorflow as tf import numpy as np def vgg_conv_layer(x, kernel_size, out_channels, stride, var_list, pad...
agem-main
utils/vgg_utils.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from .data_utils import construct_permute_mnist, construct_split_mnist, construct_split_cifar, construct_split_cub, construct_...
agem-main
utils/__init__.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import math import tensorflow as tf import numpy as np def _conv(x, kernel_size, out_channels, stride, var_list, pad="SAME", ...
agem-main
utils/resnet_utils.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """ Define utility functions for manipulating datasets """ import os import numpy as np import sys from copy import deepcopy ...
agem-main
utils/data_utils.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """ Define some utility functions """ import numpy as np import tensorflow as tf def clone_variable_list(variable_list): ...
agem-main
utils/utils.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """ Define some utility functions """ import numpy as np import matplotlib matplotlib.use('agg') import matplotlib.colors as ...
agem-main
utils/vis_utils.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from .model import Model
agem-main
model/__init__.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """ Model defintion """ import tensorflow as tf import numpy as np import mat...
agem-main
model/model.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import os from typing import List import argparse import numpy as np import random import torch import torch.cuda import ...
atlas-main
finetune_qa.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import os import time from collections import defaultdict import numpy as np import torch import torch.cuda import loggi...
atlas-main
train.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import os import time from collections import defaultdict import numpy as np import torch import torch.cuda import torch...
atlas-main
evaluate.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import argparse import json import os SUBCATEGORIES = { "humanities": [ "high_school_european_history", ...
atlas-main
evaluation_scripts/evaluate_mmlu_predictions.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import os import json from pathlib import Path import argparse import shutil import tarfile from download_tools import m...
atlas-main
preprocessing/prepare_qa.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import argparse import json import os from pathlib import Path from download_tools import maybe_download_file URLS = { ...
atlas-main
preprocessing/prepare_templama.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import argparse from download_tools import get_download_path, get_s3_path, maybe_download_file BASE_URL = "https://dl.f...
atlas-main
preprocessing/download_index.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import os import wget BASE_URL = "https://dl.fbaipublicfiles.com/atlas" def maybe_download_file(source, target): ...
atlas-main
preprocessing/download_tools.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import os import json from pathlib import Path import argparse from download_tools import maybe_download_file fever_64s...
atlas-main
preprocessing/prepare_fever.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import argparse from download_tools import get_download_path, get_s3_path, maybe_download_file BASE_URL = "https://dl.f...
atlas-main
preprocessing/download_model.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import argparse import csv import json import os import random import tarfile from pathlib import Path from download_too...
atlas-main
preprocessing/prepare_mmlu.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import argparse from download_tools import get_download_path, get_s3_path, maybe_download_file AVAILABLE_CORPORA = { ...
atlas-main
preprocessing/download_corpus.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import argparse import logging from pathlib import Path logger = logging.getLogger(__name__) class Options: def __...
atlas-main
src/options.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import logging import math import os import pickle from typing import Optional, Set, Tuple, Union, Any import faiss import...
atlas-main
src/index.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import datetime import os import signal import socket import subprocess import sys from logging import getLogger import ...
atlas-main
src/slurm.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import json import logging import math import sys from collections import defaultdict from pathlib import Path from typin...
atlas-main
src/util.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import copy import torch from src.modeling_bert import BertModel EMBEDDINGS_DIM: int = 768 class Contriever(BertMode...
atlas-main
src/retrievers.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import logging import string from collections import Counter from typing import Callable import numpy as np import regex...
atlas-main
src/evaluation.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import argparse import json import logging from src import dist_utils from src.index import DistributedFAISSIndex, Distr...
atlas-main
src/index_io.py
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import errno import logging import os from pathlib import Path from typing import Dict, List, Tuple, Union import torch im...
atlas-main
src/model_io.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import torch from torch.optim import adamw as _adamw AdamW = _adamw.AdamW adamw = _adamw.F.adamw class AdamWFP32Copy(A...
atlas-main
src/AdamWFP32Copy.py
# coding=utf-8 # Copyright 2018 Mesh TensorFlow authors, T5 Authors and HuggingFace Inc. team. # # 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...
atlas-main
src/modeling_t5.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, 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 cop...
atlas-main
src/modeling_bert.py
# coding=utf-8 # Copyright 2018 Mesh TensorFlow authors, T5 Authors and HuggingFace Inc. team. # # 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...
atlas-main
src/fid.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import copy import logging import math import time from functools import reduce from typing import List, Optional, Union ...
atlas-main
src/atlas.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import datetime import os import subprocess from logging import getLogger import torch logger = getLogger() def init_d...
atlas-main
src/torchrun_utils.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import torch import torch.distributed as dist from src import slurm class Gather(torch.autograd.Function): @static...
atlas-main
src/dist_utils.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import copy import itertools import string import torch from transformers.tokenization_utils_base import PreTrainedToken...
atlas-main
src/tasks/multiple_choice.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from src.evaluation import exact_match_score from src.tasks.base import BaseTask class Task(BaseTask): metrics = ["...
atlas-main
src/tasks/fever.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import random from transformers.tokenization_utils_base import PreTrainedTokenizerBase from src.evaluation import exact...
atlas-main
src/tasks/mlm.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from . import base, fever, kilt, lm, mlm, multiple_choice, qa, section AVAILABLE_TASKS = {m.__name__.split(".")[-1]: m f...
atlas-main
src/tasks/__init__.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import logging from src.evaluation import exact_match_score, f1_score, rouge_score from src.options import Options from ...
atlas-main
src/tasks/section.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import random from typing import List from src.evaluation import exact_match_score, f1_score, normalize_answer from src....
atlas-main
src/tasks/kilt.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import logging import random import re from src.evaluation import exact_match_score, f1_score, rouge_score from src.opti...
atlas-main
src/tasks/lm.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import json import logging import random from collections import defaultdict from src.evaluation import exact_match_scor...
atlas-main
src/tasks/base.py
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import random from src.evaluation import exact_match_score, f1_score, normalize_answer from src.options import Options f...
atlas-main
src/tasks/qa.py
#!/usr/bin/python # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division from __future...
deepfloat-main
bitstream/build_xml.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import argparse import os import shutil import time import glob import subprocess import sys import ma...
deepfloat-main
py/run_fpga_resnet.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import argparse import os import shutil import time import glob import subprocess import sys import ma...
deepfloat-main
py/examine_resnet.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import argparse import os import shutil import time import glob import subprocess import sys import ma...
deepfloat-main
py/fpga.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import torch import math from torch.utils.cpp_extension import CppExtension, BuildExtension def inspe...
deepfloat-main
py/fpga_resnet.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import argparse import os import shutil import time import glob import subprocess import sys import ma...
deepfloat-main
py/validate.py
#!/usr/bin/python3 # Simple Python Fixed-Point Module (SPFPM) # (C)Copyright 2006-2018, RW Penney # This file is (C)Copyright 2006-2018, RW Penney # and is released under the Python-2.4.2 license # (see http://www.python.org/psf/license), # it therefore comes with NO WARRANTY, and NO CLAIMS OF FITNESS FOR ANY PURPOSE...
deepfloat-main
rtl/log/luts/FixedPoint.py
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import FixedPoint import math import argparse import io parser = argparse.ArgumentParser( descript...
deepfloat-main
rtl/log/luts/gen_tables.py
AutoCTR-main
utils/__init__.py
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import logging import numpy as np import...
AutoCTR-main
utils/viz_utils.py
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import os import sys sys.path.append('ge...
AutoCTR-main
utils/search_utils.py
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import sys sys.path.append('gen-py') imp...
AutoCTR-main
utils/data.py
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import logging from copy import deepcopy ...
AutoCTR-main
models/nas_modules.py
AutoCTR-main
models/__init__.py
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import sys sys.path.append('gen-py') imp...
AutoCTR-main
models/builder.py
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import logging import torch import torch...
AutoCTR-main
models/utils.py
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import logging from copy import deepcopy ...
AutoCTR-main
models/base_net.py
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import logging import math import numpy ...
AutoCTR-main
nasrec/evolutionary_controller.py
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import logging from copy import deepcopy ...
AutoCTR-main
nasrec/base_searcher.py
AutoCTR-main
nasrec/__init__.py
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import logging import torch from config...
AutoCTR-main
nasrec/builder.py
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import logging import numpy as np from ...
AutoCTR-main
nasrec/random_controller.py
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import logging import numpy as np import...
AutoCTR-main
nasrec/utils.py
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import logging from copy import deepcopy ...
AutoCTR-main
nasrec/blocks.py
# # Autogenerated by Thrift # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @generated #
AutoCTR-main
gen-py/__init__.py
# # Autogenerated by Thrift # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @generated # from __future__ import absolute_import import six from thrift.util.Recursive import fix_spec from thrift.Thrift import * from thrift.protocol.TProtocol import TProtocolException import block_config.ttypes...
AutoCTR-main
gen-py/config/constants.py
# # Autogenerated by Thrift # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @generated # __all__ = ['ttypes', 'constants']
AutoCTR-main
gen-py/config/__init__.py
# # Autogenerated by Thrift # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @generated # from __future__ import absolute_import import six from thrift.util.Recursive import fix_spec from thrift.Thrift import * from thrift.protocol.TProtocol import TProtocolException import block_config.ttypes...
AutoCTR-main
gen-py/config/ttypes.py
# # Autogenerated by Thrift # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @generated # from __future__ import absolute_import import six from thrift.util.Recursive import fix_spec from thrift.Thrift import * from thrift.protocol.TProtocol import TProtocolException from .ttypes import *
AutoCTR-main
gen-py/block_config/constants.py
# # Autogenerated by Thrift # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @generated # __all__ = ['ttypes', 'constants']
AutoCTR-main
gen-py/block_config/__init__.py