repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
ZitongLu1996/PyCTRSA
[ "7b243930321c089e235c9fc1e771b6432d530819" ]
[ "test/t_normalrdmbased.py" ]
[ "# -*- coding: utf-8\n\n\"\"\"\n@File : t_normalrdmbased.py\n@Author : Zitong Lu\n@Contact : zitonglu1996@gmail.com\n@License : MIT License\n\"\"\"\n\nimport numpy as np\nimport unittest\nfrom pyctrsa.ctsimilarity.normalrdmbased import ctsimilarities_cal\n\nclass test_normalrdmbased(unittest...
[ [ "numpy.random.rand" ] ]
Pat-Laub/pyABC
[ "f23f0ff8d430a8ce0a0c8253b45e19add9121992" ]
[ "test/test_bytesstorage.py" ]
[ "import pytest\nfrom pyabc.storage.bytes_storage import to_bytes, from_bytes\nimport pandas as pd\nimport numpy as np\nimport scipy as sp\nfrom rpy2.robjects import r\nimport rpy2.robjects as robjects\nfrom rpy2.robjects import pandas2ri\n\n\n@pytest.fixture(params=[\"empty\", \"int\", \"float\", \"non_numeric_str\...
[ [ "scipy.randn", "pandas.DataFrame", "scipy.random.randint", "scipy.random.randn" ] ]
Pratere/stateoftheuniverse
[ "2ad341cb9f0a45b8a624ba23a2dc3224e03de455" ]
[ "stateoftheuniverse/widgets/constellations.py" ]
[ "\"\"\"\nGet a list of constellations that will be visible from a location on the \nearth as a given time.\n\"\"\"\n# -------------------------\n# Imports\n# ------------------------\nfrom astropy.utils.exceptions import AstropyDeprecationWarning\nimport warnings\n\nfrom datetime import datetime as dt\nfrom astropy...
[ [ "numpy.arange" ] ]
marjanin/tendon_stiffness
[ "b1dc379b09bbf9c044410a6bc51afbee0cba2e05" ]
[ "archive/transfer_learning_runresults2.py" ]
[ "\n# next is to add accel and see the difference\n# add stiffness too\nimport numpy as np\nfrom scipy import signal, stats\nfrom matplotlib import pyplot as plt\nfrom all_functions import *\nimport pickle\nfrom warnings import simplefilter\nsimplefilter(action='ignore', category=FutureWarning)\n\nexperiment_ID = \"...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.subplots" ] ]
marcjour303/PytML
[ "99d8b799dbfe1d9a82f0bcc3648aaeb147b7298f", "99d8b799dbfe1d9a82f0bcc3648aaeb147b7298f" ]
[ "Chapter09/extract_stats.py", "Chapter06/euclidean_score.py" ]
[ "import pandas as pd\nimport matplotlib.pyplot as plt\n\nfrom convert_to_timeseries import convert_data_to_timeseries\n\n# Input file containing data\ninput_file = 'data_timeseries.txt'\n\n# Load data\ndata1 = convert_data_to_timeseries(input_file, 2)\ndata2 = convert_data_to_timeseries(input_file, 3)\ndataframe = ...
[ [ "pandas.DataFrame", "matplotlib.pyplot.plot", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "numpy.square", "numpy.sum" ] ]
J-Fit/JFit
[ "85c67aaca0295a75714db2011e35222dabf50c38" ]
[ "JFit/physics/nu_oscillation/Prob_e2e.py" ]
[ "# -*- coding: utf-8 -*-\n''' pure nue -> nue\nauthor: Jinnan Zhang\nzhangjinnan@ihep.ac.cn\ndate: 2021.03.08\n'''\nimport numpy as np\n\ndef get_parser():\n import argparse\n parser = argparse.ArgumentParser(description=\"Check or show the oscillation pattern.\")\n parser.add_argument(\n \"--cME\",...
[ [ "numpy.sin", "numpy.zeros", "matplotlib.backends.backend_pdf.PdfPages", "matplotlib.pyplot.subplots", "numpy.multiply", "matplotlib.pyplot.style.use", "numpy.sqrt", "numpy.linspace" ] ]
esceptico/squeezer
[ "98bc4c7923c6aa3b12ac81444d79392826fc34c6" ]
[ "squeezer/onnx/export.py" ]
[ "from logging import getLogger\nfrom typing import Dict, List, Optional, Tuple, Union\n\nimport torch\nfrom torch import nn\nfrom torch.onnx import export\n\nlogger = getLogger(__name__)\n\n\ndef export_to_onnx(\n model: nn.Module,\n dummy_input: [Union[Tuple], torch.Tensor],\n file,\n opset_version: in...
[ [ "torch.onnx.export" ] ]
clayfish/maze
[ "03bad22426d90225eca71d20f16e2da590a22aa2" ]
[ "Python/Version 5.1 (English Real-Time search)/maze51.py" ]
[ "from tkinter import *\nfrom tkinter import font\nfrom tkinter import messagebox\nfrom functools import partial\nfrom operator import attrgetter\nimport webbrowser\nimport numpy\nimport random\nimport math\nimport os\n\n\"\"\"\n@author Nikos Kanargias\nE-mail: nkana@tee.gr\n@version 5.1\n\nThe software solves and v...
[ [ "numpy.array" ] ]
MLforHealth/ClinicalDG
[ "2de4a8e155231f07d80036504a6f49b50004654e" ]
[ "clinicaldg/eicu/data.py" ]
[ "import pandas as pd\npd.options.mode.chained_assignment = None\nimport numpy as np\nfrom clinicaldg.eicu.data_extraction.data_extraction_mortality import data_extraction_mortality\nimport clinicaldg.eicu.Constants as Constants\nfrom sklearn.preprocessing import StandardScaler, LabelEncoder\nfrom torch.utils.data i...
[ [ "torch.utils.data.ConcatDataset", "numpy.concatenate", "sklearn.preprocessing.LabelEncoder", "pandas.merge", "sklearn.preprocessing.StandardScaler", "pandas.DataFrame", "pandas.MultiIndex.from_product", "pandas.read_csv", "numpy.unique" ] ]
dblenkus/performance
[ "bae6105812c2f2414d0c10ddd465bf589503f61a" ]
[ "src/lactolyse/analyses/lactate_threshold.py" ]
[ "\"\"\"Lactate threshold analysis.\"\"\"\nimport logging\n\nimport numpy as np\n\nfrom .base import BaseAnalysis\nfrom .utils import FittedPolynomial\n\nlogger = logging.getLogger(__name__)\n\n\nclass LactateThresholdAnalyses(BaseAnalysis):\n \"\"\"Lactate threshold analysis.\"\"\"\n\n name = 'lactate_thresho...
[ [ "numpy.roots", "numpy.isreal", "numpy.logical_and", "numpy.poly1d" ] ]
nabeeltariq2/res-repo
[ "faa4277b537e1075fa38d79c1a9fa31b0fd8c3af" ]
[ "recommender6_slopeone.py" ]
[ "# from __future__ import absolute_import, division, print_function, unicode_literals\n\n# from surprise import evaluate, print_perf, dump, Reader, Dataset\n#import algorithms from surprise\nfrom surprise import evaluate, print_perf, Reader, Dataset, accuracy\n\n# from surprise import KNNBasic, KNNWithMeans, KNNWit...
[ [ "numpy.random.seed", "pandas.DataFrame", "pandas.concat", "pandas.read_sql", "pandas.read_csv" ] ]
mehdikuchi/mne-python
[ "864426c4839bab05fd0d142ee20938c336c0b78e", "b8f5e5ce0da8acfeb7298c8eb1d26a75d5526eac" ]
[ "tutorials/misc/plot_ecog.py", "mne/viz/misc.py" ]
[ "\"\"\"\n.. _tut_working_with_ecog:\n\n======================\nWorking with ECoG data\n======================\n\nMNE supports working with more than just MEG and EEG data. Here we show some\nof the functions that can be used to facilitate working with\nelectrocorticography (ECoG) data.\n\"\"\"\n# Authors: Eric Lars...
[ [ "numpy.concatenate", "matplotlib.animation.FuncAnimation", "numpy.percentile", "matplotlib.pyplot.subplots", "pandas.read_csv", "numpy.vstack" ], [ "numpy.dot", "matplotlib.pyplot.xlim", "scipy.linalg.svd", "numpy.min", "numpy.where", "matplotlib.pyplot.gcf", ...
vishalbelsare/abcpy
[ "72d0d31ae3fa531b69ea3fef39c96af6628ee76f" ]
[ "tests/statisticslearning_tests.py" ]
[ "import unittest\n\nimport numpy as np\n\nfrom abcpy.backends import BackendDummy as Backend\nfrom abcpy.continuousmodels import Normal\nfrom abcpy.continuousmodels import Uniform\nfrom abcpy.statistics import Identity\nfrom abcpy.statisticslearning import Semiautomatic, SemiautomaticNN, TripletDistanceLearning, \\...
[ [ "numpy.array", "numpy.zeros", "numpy.ones", "numpy.shape", "numpy.allclose" ] ]
konovalovdmitry/catsnap
[ "d5f1d7c37dcee1ad3fee2cdc12a3b44b56f4c63f" ]
[ "kd_splicing/kd_splicing/helpers.py" ]
[ "import os\nimport uuid\nfrom collections import defaultdict\nfrom itertools import chain\nfrom typing import Dict, List, Mapping, Optional, Tuple\n\n\nimport pandas as pd\n\nfrom kd_common import excel, logutil, pathutil\nfrom kd_splicing import as_type, blast, database, features, ml, performance, pipeline\nfrom k...
[ [ "pandas.DataFrame" ] ]
HyunjiEllenPak/automl
[ "fedf04adf12c5fd11045ea06e2f5c11a5a5490c4" ]
[ "efficientdet/anchors.py" ]
[ "# Lint as: python3\n# Copyright 2020 Google Research. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n...
[ [ "tensorflow.compat.v1.transpose", "tensorflow.compat.v1.argsort", "numpy.minimum", "numpy.exp", "tensorflow.compat.v1.convert_to_tensor", "numpy.where", "numpy.concatenate", "tensorflow.compat.v1.unstack", "tensorflow.compat.v1.not_equal", "tensorflow.compat.v1.stack", ...
tynguyen/sound-spaces
[ "b196f3a36b4076752400cbf186e9cf2e160cc3c2", "b196f3a36b4076752400cbf186e9cf2e160cc3c2" ]
[ "ss_baselines/savi/ppo/slurm_utils.py", "utils/observations_conversion.py" ]
[ "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# All rights reserved.\n\n# This source code is licensed under the license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport os\nimport shlex\nimport signal\nimport subprocess\nimport threading\nfrom os im...
[ [ "torch.save", "torch.load" ], [ "numpy.concatenate" ] ]
stungkit/pytorch
[ "e5282c3cb8bf6ad8c5161f9d0cc271edb9abed25", "e5282c3cb8bf6ad8c5161f9d0cc271edb9abed25" ]
[ "torch/fx/passes/shape_prop.py", "torch/cpu/amp/autocast_mode.py" ]
[ "import torch\nimport torch.fx\nimport traceback\n\nfrom torch.fx.node import Node, map_aggregate\nfrom typing import Any, Tuple, NamedTuple, Optional, Dict\nfrom torch.fx._compatibility import compatibility\n\n\n@compatibility(is_backward_compatible=True)\nclass TensorMetadata(NamedTuple):\n # TensorMetadata is...
[ [ "torch.fx._compatibility.compatibility", "torch.fx.node.map_aggregate" ], [ "torch._jit_internal.is_scripting" ] ]
shere-khan/models
[ "ab1858370a204f793c9d609b05ff60e001d403e6" ]
[ "official/utils/misc/keras_utils.py" ]
[ "# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.compat.v1.ConfigProto", "tensorflow.config.optimizer.set_jit", "tensorflow.python.eager.profiler.stop", "tensorflow.python.eager.profiler.save", "tensorflow.Session", "tensorflow.keras.backend.set_session", "tensorflow.python.tf2.enabled", "tensorflow.compat.v1.enable_e...
MilesCranmer/numpy
[ "7a1ee13ee28083c484a42a657067570773bcddbe" ]
[ "numpy/lib/histograms.py" ]
[ "\"\"\"\nHistogram-related functions\n\"\"\"\nimport contextlib\nimport functools\nimport operator\nimport warnings\n\nimport numpy as np\nfrom numpy.core import overrides\n\n__all__ = ['histogram', 'histogramdd', 'histogram_bin_edges']\n\narray_function_dispatch = functools.partial(\n overrides.array_function_d...
[ [ "numpy.true_divide", "numpy.mean", "numpy.sort", "numpy.issubdtype", "numpy.dtype", "numpy.bincount", "numpy.histogram", "numpy.empty", "numpy.can_cast", "numpy.sqrt", "numpy.ndim", "numpy.isfinite", "numpy.atleast_2d", "numpy.zeros", "numpy.percentile",...
sspickle/genlatex
[ "d5fd86d4415c85c2f2933981e0e65f9df9f3cda5" ]
[ "example/tlo-EX-Data.py" ]
[ "\nimport random\nimport vpython as vp\nimport numpy as np\n\nfrom genlatex import latex_float, latex_vec\n\ndata = []\n\n\"\"\"\nnaming convention. \n\ntlo: this is the prefix to all the templates, and to the .tex outputs\n\ne.g., if you're working on TLO-3 and this is the third quiz you've\ngiven, you might say \...
[ [ "numpy.sqrt" ] ]
FNTwin/BayGPGO
[ "bad7e335d2fd19a93aeee0d591ea7da51c2c6d59", "2f89699648601d4499dcab285a1d7376f0e1ef4b" ]
[ "GPGO/dpd_opt_script.py", "Test/optimization_test.py" ]
[ "from GPGO.GaussianProcess.GP import GP, generate_grid\nfrom GPGO.GaussianProcess.Kernel.RBF import RBF\nfrom GPGO.BayesOpt import BayesianOptimization\nimport numpy as np\nimport os\nimport argparse\n\n\ndef get_right_coeffs(array):\n # truth_index=[2,3,6,7,9,15,16,19,20,21,24,25,30]\n truth_index = [2, 6, 7...
[ [ "numpy.array", "numpy.savetxt", "numpy.zeros", "numpy.loadtxt", "numpy.squeeze", "numpy.atleast_2d" ], [ "numpy.array", "numpy.sin", "numpy.random.seed", "numpy.exp", "numpy.mean", "numpy.std", "numpy.random.uniform", "numpy.loadtxt", "numpy.cos", ...
Leanneliansong1/inf1340-programmingfordatascience-fa21
[ "8944d019f64f9f25e7b10dafbca18250bf12e9ee" ]
[ "Tutorial code/Week 3_Pandas tutorial.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# In[1]:\n\n\nimport pandas as pd\n\n\n# In[3]:\n\n\ndf = pd.read_csv('merc.csv')\n\n\n# In[4]:\n\n\nprint(df.head(10))\n\n\n# In[47]:\n\n\nprint(df.head())\n\n\n# In[48]:\n\n\nprint(df.tail()) \n\n\n# In[49]:\n\n\nprint(df.info()) \n\n\n# In[50]:\n\n\n#refer to the row in...
[ [ "pandas.DataFrame", "pandas.read_csv" ] ]
Zakobian/WD_gas_disk_imaging
[ "b8bda209e541b442f44fdb6109de8f2f72ec38cf" ]
[ "interactive.py" ]
[ "import cv2\nimport numpy as np\nfrom plot_one import plot_me_one\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\nfrom scipy.integrate import simps\nM_sun=1.989*10**30;\nR_sun=696340*10**3;\n\nM=0.62*M_sun\nr_star=0.0151*R_sun\nG=6.67408*10**(-11);\n\n\n\n####\n####\n#### This code will create the sandb...
[ [ "matplotlib.pyplot.ion", "scipy.integrate.simps", "matplotlib.pyplot.xlabel", "numpy.load", "matplotlib.pyplot.figure", "numpy.loadtxt", "matplotlib.pyplot.pause", "matplotlib.pyplot.ylabel", "numpy.sqrt", "numpy.abs", "matplotlib.pyplot.show" ] ]
Lorraine333/joint-order-cbow
[ "ed22c7b037a8d016a8982c8341bc02edc5054fc3" ]
[ "src/plus_train.py" ]
[ "\"\"\"Licensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements. See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership. The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may...
[ [ "numpy.asarray", "tensorflow.Graph", "tensorflow.Session", "tensorflow.train.Saver", "tensorflow.variable_scope", "tensorflow.placeholder", "numpy.arange", "tensorflow.summary.merge_all", "tensorflow.summary.FileWriter", "tensorflow.app.run", "tensorflow.global_variable...
rbv83/DHNx
[ "edb5c9be17f74d7f200c1eb6a17000a26633bdc3" ]
[ "dhnx/plotting.py" ]
[ "# -*- coding: utf-8\n\n\"\"\"\nThis module is designed to hold functions for visualization.\n\nThis file is part of project dhnx (). It's copyrighted\nby the contributors recorded in the version control history of the file,\navailable from its original location:\n\nSPDX-License-Identifier: MIT\n\"\"\"\n\nimport lo...
[ [ "numpy.max", "numpy.array", "numpy.min", "matplotlib.pyplot.subplots", "numpy.linspace", "matplotlib.collections.LineCollection", "numpy.arctan2", "matplotlib.pyplot.gca" ] ]
shiyuchengTJU/CISA
[ "81c43d2ee2ba1224e307baf636f1c87bfddd2ffa" ]
[ "boundary/sampling/normal.py" ]
[ "\"\"\"\r\nNoise generation from Normal distributions.\r\n\"\"\"\r\n\r\nimport numpy as np\r\n\r\n\r\ndef sample_hypersphere(n_samples, sample_shape, radius, l_norm=2, mode='sphere', sample_gen=None, seed=None):\r\n \"\"\"\r\n Uniformly sample the surface of a hypersphere.\r\n Uniform picking: create a n-d...
[ [ "numpy.linalg.norm", "numpy.reshape", "numpy.random.seed", "numpy.prod", "numpy.random.uniform" ] ]
joshim5/fairscale
[ "1c2a6f6b46646866f3e86d628b8a4ca437f68215" ]
[ "tests/optim/test_oss.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\n# pylint: disable=missing-module-docstring\n# pylint: disable=missing-class-docstring\n# pylint: disable=missin...
[ [ "torch.nn.Linear", "torch.device", "torch.rand", "torch.optim.lr_scheduler.StepLR", "torch.distributed.init_process_group", "torch.optim.SGD", "torch.multiprocessing.spawn", "torch.nn.L1Loss", "torch.cuda.device_count", "torch.cuda.is_available", "torch.tensor", "to...
EmanueleGhelfi/ashpy
[ "6156b97c636c5b568c5a57c23b77d9ae28421bba" ]
[ "ashpy/losses/gan.py" ]
[ "# Copyright 2019 Zuru Tech HK Limited. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
[ [ "tensorflow.rank", "tensorflow.abs", "tensorflow.losses.BinaryCrossentropy", "tensorflow.expand_dims", "tensorflow.keras.losses.MeanSquaredError", "tensorflow.ones_like", "tensorflow.add_n", "tensorflow.constant", "tensorflow.zeros_like", "tensorflow.keras.losses.Categorica...
nryotaro/han
[ "ed78f6772f4bf6923d9a3f52dbcc8a55e757631b" ]
[ "han/vocabulary.py" ]
[ "\"\"\"Word embedding.\"\"\"\nimport typing as t\nimport torchtext.vocab as v\nimport torch\n\n\ndef build_vocabulary(\n sentences: t.Iterator[t.Iterator[str]],\n pad_symbol: str = \"<pad>\",\n unknown_symbol: str = \"<unk>\",\n) -> v.Vocab:\n \"\"\"Build vocabulary.\n\n Each element of `sentences` i...
[ [ "torch.Tensor", "torch.vstack" ] ]
mathieucaroff/metravision
[ "f0bbd4ed1d4b7c8d7a2de4c7a77c5dbe3714bf90" ]
[ "src/devint/counter.py" ]
[ "\"\"\"\nCode ajoutant les compteurs à la collection d'images.\n\"\"\"\n\n\nimport cv2\nimport numpy as np\n\n\ndef genFilledRegion(height=520, width=720, channelCount=None, dtype=np.uint8, fill_value=0):\n shape = [height, width]\n if channelCount is not None:\n shape.append(channelCount)\n return ...
[ [ "numpy.full" ] ]
rgschmitz1/BioDepot-workflow-builder
[ "4ee93abe2d79465755e82a145af3b6a6e1e79fd4", "4ee93abe2d79465755e82a145af3b6a6e1e79fd4", "4ee93abe2d79465755e82a145af3b6a6e1e79fd4" ]
[ "orange3/Orange/preprocess/setup.py", "orange3/Orange/preprocess/transformation.py", "orange3/Orange/widgets/data/owcreateclass.py" ]
[ "# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>\n# License: BSD Style.\nimport os\n\nimport numpy\n\n\ndef configuration(parent_package=\"\", top_path=None):\n from numpy.distutils.misc_util import Configuration\n\n libraries = []\n if os.name == \"posix\":\n libraries.append(\"m\")\n\n ...
[ [ "numpy.get_include", "numpy.distutils.misc_util.Configuration" ], [ "scipy.sparse.issparse", "numpy.isnan", "numpy.where" ], [ "numpy.equal", "numpy.array", "numpy.sum", "numpy.char.find", "numpy.char.lower", "numpy.any", "numpy.char.equal" ] ]
salarim/scene_vis
[ "8e146195599aaa7598137dd223e9ce2b9e0b25a3", "8e146195599aaa7598137dd223e9ce2b9e0b25a3" ]
[ "src/core/depth_map_utils.py", "demos/kitti_odometry/overlay_odom_point_clouds.py" ]
[ "import cv2\nimport numpy as np\nimport png\n\nfrom datasets.kitti.obj import calib_utils\n\n\ndef read_depth_map(depth_map_path):\n\n depth_image = cv2.imread(depth_map_path, cv2.IMREAD_ANYDEPTH)\n depth_map = depth_image / 256.0\n\n # Discard depths less than 10cm from the camera\n depth_map[depth_map...
[ [ "numpy.reshape", "numpy.asarray", "numpy.zeros", "numpy.round", "numpy.linspace" ], [ "numpy.round", "numpy.pad", "numpy.array", "numpy.reshape" ] ]
carlosep93/LANGSPEC
[ "8c8f55d999d79628a56f48d4e1a8918f8c426f72" ]
[ "fairseq/criterions/interlingua_loss.py" ]
[ "# Copyright (c) 2017-present, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the license found in the LICENSE file in\n# the root directory of this source tree. An additional grant of patent rights\n# can be found in the PATENTS file in the same directory.\n\nimport math\nimport to...
[ [ "torch.device", "torch.cuda.device_count" ] ]
aaronwtr/shap
[ "5a7b3740a6eccd772bcc3450dee3188487c18104" ]
[ "shap/explainers/_partition.py" ]
[ "import types\nimport copy\nimport inspect\nfrom ..utils import MaskedModel\nimport numpy as np\nimport warnings\nimport time\nfrom tqdm.auto import tqdm\nimport queue\nfrom ..utils import assert_import, record_import_error, safe_isinstance, make_masks, OpChain\nfrom .. import Explanation\nfrom .. import maskers\nf...
[ [ "numpy.array", "numpy.abs", "numpy.random.randn", "numpy.zeros" ] ]
BracketJohn/GPflow
[ "33178689c34d773a05532d50e3d4d97e7d5d6d60" ]
[ "doc/source/notebooks/intro_to_gpflow2.pct.py" ]
[ "# ---\n# jupyter:\n# jupytext:\n# formats: ipynb,.pct.py:percent\n# text_representation:\n# extension: .py\n# format_name: percent\n# format_version: '1.3'\n# jupytext_version: 1.3.3\n# kernelspec:\n# display_name: Python 3\n# language: python\n# name: python3\n# ---...
[ [ "tensorflow.data.Dataset.from_tensor_slices", "tensorflow.train.CheckpointManager", "tensorflow.GradientTape", "numpy.random.seed", "tensorflow.random.set_seed", "tensorflow.optimizers.Adam", "matplotlib.pyplot.plot", "tensorflow.Variable", "tensorflow.summary.create_file_write...
Divyanshu23/model-zoo
[ "2eea6df691d302e182bb1ff8ec5af3542de562ba" ]
[ "classification/Inception-V3_PyTorch/dataloader.py" ]
[ "import shutil\r\n\r\nimport torch\r\nimport torch.nn as nn\r\nfrom torch.utils.data import Dataset, DataLoader, random_split\r\nfrom torchvision import transforms, datasets\r\n\r\n\r\ndef load_cifar():\r\n\r\n transform = transforms.Compose([transforms.Resize((32, 32)),\r\n tr...
[ [ "torch.utils.data.random_split", "torch.utils.data.DataLoader" ] ]
trusthlt/dp-across-nlp-tasks
[ "ec3e03511420044cdb0bb1a3574925d354ff03f4", "ec3e03511420044cdb0bb1a3574925d354ff03f4" ]
[ "NLPCode/named_entity_recognition/utils.py", "NLPCode/sentiment_analysis/Transformers/train_eval_models.py" ]
[ "import time\nimport torch\nfrom queue import Queue\nimport numpy as np\nfrom sklearn.metrics import precision_recall_fscore_support\n\ndef get_acc_pre_rec_f1(y_true, y_pred):\n assert (len(y_true) == len(y_pred))\n\n # accuracy\n acc = 0\n for t, p in zip(y_true, y_pred):\n if t == p:\n ...
[ [ "sklearn.metrics.precision_recall_fscore_support" ], [ "torch.sigmoid", "torch.no_grad" ] ]
parallelworks/welding
[ "eb1fe04e9f1be1d374782f7476767dcf2197fe36" ]
[ "mexdex/pvutils.py" ]
[ "from paraview.simple import *\nimport sys\nimport data_IO\nimport os\nimport subprocess\nimport shutil\n\n# For saving plots as pngs\nimport matplotlib\n\nimport numpy as np\nimport warnings\n\ndef getParaviewVersion():\n \"\"\" Return paraview version as a double number: e.g. 5.4\"\"\"\n PVversionMajor = pa...
[ [ "matplotlib.use", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.grid", "matplotlib.pyplot.plot", "numpy.genfromtxt", "matplotlib.pyplot.savefig", "matplotlib.pyplot.yticks", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylabel" ] ]
pshiko/io
[ "a1793e6b41ed7a8db572249aba15a8e513a348a5" ]
[ "tensorflow_io/core/python/experimental/serialization_ops.py" ]
[ "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.nest.pack_sequence_as", "tensorflow.nest.flatten" ] ]
vinceHardy/learning
[ "2c207029e7c93807fe57b0a4ae098c8afe38a661" ]
[ "project/reports/global_warming/myutils.py" ]
[ "import pandas as pd\nimport os.path\nimport matplotlib.pyplot as plt\n\ndef makeTimeSeries(df):\n ts = pd.to_datetime(df.dt)\n df.index = ts\n return df.drop('dt', axis=1)\n\ndef differenciate(X):\n diff = list()\n for i in range(1, len(X)):\n value = X[i] - X[i - 1]\n diff.append(valu...
[ [ "pandas.to_datetime", "pandas.rolling_mean", "pandas.rolling_std", "pandas.DataFrame", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylabel", "pandas.Series", ...
pystudent1913/proyecto-reconocimiento-facial
[ "881fb2f724b43b93b224dd591e250e0f2f078764" ]
[ "recognize_video.py" ]
[ "# USAGE\n# python recognize_video.py --detector face_detection_model \\\n#\t--embedding-model openface_nn4.small2.v1.t7 \\\n#\t--recognizer output/recognizer.pickle \\\n#\t--le output/le.pickle\n\n# import the necessary packages\nfrom imutils.video import VideoStream\nfrom imutils.video import FPS\nimport numpy as...
[ [ "numpy.array", "numpy.argmax" ] ]
ana-kuznetsova/espnet
[ "263a9ba04b626fa46442d6679531ce98c7afa9df" ]
[ "espnet2/samplers/num_elements_batch_sampler.py" ]
[ "from typing import Iterator\nfrom typing import List\nfrom typing import Tuple\nfrom typing import Union\n\nimport numpy as np\nfrom typeguard import check_argument_types\n\nfrom espnet2.fileio.read_text import load_num_sequence_text\nfrom espnet2.samplers.abs_sampler import AbsSampler\n\n\nclass NumElementsBatchS...
[ [ "numpy.prod" ] ]
Datacket/Invado
[ "20ca439d9a3151fd97e85c87e6dc264152410aea" ]
[ "core.py" ]
[ "import json \nimport pandas as pd\nimport numpy as np\nimport pymysql\nimport pymysql.cursors as pycurse\nfrom datetime import datetime\nfrom model_animal_tracking import *\nimport tensorflow as tf\nfrom io import StringIO\nfrom datetime import timedelta\nfrom flask import Flask,jsonify,request\nfrom sklearn.prepr...
[ [ "numpy.square", "numpy.array", "pandas.DataFrame", "numpy.cos", "sklearn.preprocessing.OneHotEncoder" ] ]
ka5par/MIR
[ "ca8d9ee84435299f680b158d9c92c2b6e47682b3" ]
[ "pop_music_highlighter/lib.py" ]
[ "import os.path\n\nimport numpy as np\nimport librosa\nfrom pydub import AudioSegment\n\n\ndef chunk(incoming, n_chunk):\n input_length = incoming.shape[1]\n chunk_length = input_length // n_chunk\n outputs = []\n for i in range(incoming.shape[0]):\n for j in range(n_chunk):\n outputs....
[ [ "numpy.array", "numpy.sin", "numpy.log", "numpy.zeros", "numpy.tile", "numpy.power", "numpy.cos", "numpy.expand_dims" ] ]
benjaminysmith/covidcast-indicators
[ "b1474cd68a1497166fefe4beffd4d5ff867b9a61" ]
[ "quidel_covidtest/delphi_quidel_covidtest/pull.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"Simply downloads email attachments.\n\nUses this handy package: https://pypi.org/project/imap-tools/\n\"\"\"\nimport io\nfrom os.path import join\nimport os\nfrom datetime import datetime, timedelta\n\nimport pandas as pd\nimport numpy as np\n\nfrom imap_tools import MailBox, A, AND\...
[ [ "pandas.DataFrame", "pandas.read_excel", "numpy.sum", "pandas.Timedelta" ] ]
rohitsanj/doe
[ "d1fe3629dfe3fb789dfe42b072c2682581a9ae90" ]
[ "doex/rcbd.py" ]
[ "import numpy as np\n\nfrom .utils import p_value, create_anova_table, multiple_comparisons\n\n\nclass RandomizedCompleteBlockDesign:\n def __init__(self, data):\n self.data = np.array(data)\n\n n_treatments, n_blocks = self.data.shape\n\n if hasattr(self, \"num_missing\"):\n num_...
[ [ "numpy.square", "numpy.array", "numpy.isnan", "numpy.sum", "numpy.nansum", "numpy.sqrt" ] ]
anttisaukko/tensorflow-onnx
[ "1341bdf476df6023b75bc6b3c6e4cda00cc58a29" ]
[ "tf2onnx/rewriter/custom_rnn_rewriter.py" ]
[ "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT license.\n\n\"\"\"\ntf2onnx.rewriter.custom_rnn_rewriter - custom rnn support\n\"\"\"\n\nfrom __future__ import division\nfrom __future__ import print_function\nimport logging\nimport sys\nfrom onnx import helper, onnx_pb\nimport...
[ [ "numpy.array" ] ]
Suhasnama/datasets
[ "1259b2329825dfee02ab1925f41d00756d9e7bdc" ]
[ "tensorflow_datasets/image/cats_vs_dogs.py" ]
[ "# coding=utf-8\n# Copyright 2020 The TensorFlow Datasets Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ...
[ [ "tensorflow.compat.v2.compat.as_bytes" ] ]
ConnerZhao/FRES
[ "a6d82065eedf90ffaad91b242488e4aef844033d" ]
[ "srs/main.py" ]
[ "import tkinter \r\nfrom tkinter import *\r\nfrom tkinter import messagebox\r\nimport cv2\r\nimport numpy as np\r\nfrom keras.preprocessing import image\r\nimport warnings\r\nwarnings.filterwarnings(\"ignore\")\r\nfrom keras.preprocessing.image import load_img, img_to_array \r\nfrom keras.models import load_model\...
[ [ "numpy.argmax", "numpy.expand_dims" ] ]
adarshchbs/adda_sketch
[ "25f7adf3563d8e1edb8c431fb93876bbed4d4e76" ]
[ "pretrain.py" ]
[ "from torch import nn\nfrom torch import optim\nimport torch\n\nimport params\nfrom utils import make_variable, save_model\nfrom preprocess import preprocess_image\n\ndef train_src( source_encoder, source_classifier, data_loader, gpu_flag = False, gpu_name = 'cuda:0' ):\n\n # source_classifier.train()\n # sou...
[ [ "torch.tensor", "torch.nn.CrossEntropyLoss", "torch.max" ] ]
refactoring-ai/Machine-Learning
[ "908d35322a06a7b1709d83f731033a939a864c6b" ]
[ "ml/models/random_forest.py" ]
[ "from sklearn.ensemble import RandomForestClassifier\n\nfrom configs import CORE_COUNT, SEED\nfrom ml.models.base import SupervisedMLRefactoringModel\n\n\nclass RandomForestRefactoringModel(SupervisedMLRefactoringModel):\n def feature_reduction(self) -> bool:\n return False\n\n def params_to_tune(self)...
[ [ "sklearn.ensemble.RandomForestClassifier" ] ]
Moado/Robotics-ROS
[ "c5aca2dffa6c5c9376e1cda8624ed611ffb11ca0" ]
[ "Homework4/ars_motion_controller_pid/source/ars_motion_controller.py" ]
[ "#!/usr/bin/env python\n\nimport numpy as np\nfrom numpy import *\n\nimport os\n\n\n# ROS\n\nimport rospy\n\nimport tf_conversions as tf\n\n\n#\nimport ars_lib_helpers\n\n#\nimport ars_pid\n\n\n\n\nclass ArsMotionController:\n\n #######\n\n # References\n #\n flag_set_robot_pose_ref = False\n robot_posi_ref = ...
[ [ "numpy.zeros" ] ]
Gorilla-Lab-SCUT/SS-Conv
[ "47d21fdb8f8e02f677201d86295f6ef1c4d1f059" ]
[ "SS_Conv_lib/ss_conv/sp_ops/tensor.py" ]
[ "# Modified from https://github.com/traveller59/spconv/tree/v1.1\r\nimport numpy as np\r\nimport torch\r\n\r\n\r\ndef scatter_nd(indices, updates, shape):\r\n \"\"\"pytorch edition of tensorflow scatter_nd.\r\n this function don't contain except handle code. so use this carefully\r\n when indice repeats, d...
[ [ "torch.zeros", "numpy.prod", "torch.tensor" ] ]
PVSemk/ABAW2020TNT
[ "3cf667e0958f411b510c734755da5e30a091df11" ]
[ "face_alignment.py" ]
[ "\"\"\"\nCode from\n\"Two-Stream Aural-Visual Affect Analysis in the Wild\"\nFelix Kuhnke and Lars Rumberg and Joern Ostermann\nPlease see https://github.com/kuhnkeF/ABAW2020TNT\n\"\"\"\nimport cv2 as cv\nimport numpy as np\nimport os\n\ndef align_rescale_face(image, M):\n aligned = cv.warpAffine(image, M, (112,...
[ [ "numpy.rint" ] ]
Supreeth-Shetty/Projectathon---Simplified-AI
[ "3fc26a58a9370d119811ac4e864af977c21f6c40", "3fc26a58a9370d119811ac4e864af977c21f6c40", "3fc26a58a9370d119811ac4e864af977c21f6c40" ]
[ "src/routes/routes_training.py", "src/utils/common/prediction_helper.py", "src/routes/routes_eda.py" ]
[ "from flask import Blueprint, redirect, url_for, render_template, request, session\nfrom src.constants.model_params import Ridge_Params, Lasso_Params, ElasticNet_Params, RandomForestRegressor_Params, \\\n SVR_params, AdabootRegressor_Params, \\\n GradientBoostRegressor_Params\nfrom src.constants.model_params ...
[ [ "torch.nn.Linear", "torch.nn.SELU", "torch.nn.LeakyReLU", "numpy.mean", "torch.nn.SmoothL1Loss", "torch.nn.BCEWithLogitsLoss", "sklearn.metrics.r2_score", "pandas.read_csv", "sklearn.metrics.f1_score", "torch.nn.CrossEntropyLoss", "torch.nn.Softmax", "pandas.DataFra...
emotive-computing/mosaic_stress_2021
[ "be4e0f2e0f0455d97cf6c9b5fd6dac60872d94c7" ]
[ "tools/common-models/src/metrics/results.py" ]
[ "# -*- coding: utf-8 -*-\nimport abc\nfrom collections import defaultdict\nfrom math import sqrt\n\nimport numpy as np\nimport pandas as pd\nfrom scipy.stats import pearsonr\nfrom scipy.stats import spearmanr\nfrom sklearn.metrics import accuracy_score, r2_score, mean_squared_error, f1_score, recall_score, precisio...
[ [ "numpy.array", "sklearn.metrics.mean_squared_error", "numpy.asarray", "pandas.DataFrame", "scipy.stats.spearmanr", "scipy.stats.pearsonr", "sklearn.metrics.accuracy_score", "numpy.argmax", "sklearn.metrics.average_precision_score", "sklearn.metrics.r2_score", "sklearn.m...
awslabs/w-lda
[ "15eb320faac0570e858c689df6f2c61bcad3010e" ]
[ "examples/domains/wikitext103_wae.py" ]
[ "# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\").\n# You may not use this file except in compliance with the License.\n# A copy of the License is located at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# or ...
[ [ "scipy.sparse.load_npz", "numpy.random.shuffle", "numpy.arange", "scipy.sparse.csr_matrix", "scipy.sparse.save_npz" ] ]
kukaiN/modeling_in_python
[ "99641bc2be5887c5571fd494f5025efe8a0441bb" ]
[ "corona_model/start_here.py" ]
[ "import model_framework\nimport platform\nimport statfile\nimport copy\nimport fileRelated\nimport pandas as pd\nimport experiment as experiment\nimport main_config\nfrom pathlib import Path\n\ndef main():\n \"\"\"intialize and run the model, for indepth detail about the config or how to run the code, go to the ...
[ [ "pandas.DataFrame" ] ]
tadeoos/gpt-2
[ "32e29f1acca9ade9913b5d0d2b71384c31357eed" ]
[ "src/model.py" ]
[ "import numpy as np\nimport tensorflow as tf\nfrom tensorflow.contrib.training import HParams\n\ndef default_hparams():\n return HParams(\n n_vocab=0,\n n_ctx=1024,\n n_embd=768,\n n_head=12,\n n_layer=12,\n )\n\ndef shape_list(x):\n \"\"\"Deal with dynamic shape in tenso...
[ [ "tensorflow.exp", "tensorflow.constant_initializer", "tensorflow.matmul", "tensorflow.reshape", "tensorflow.stack", "tensorflow.cast", "tensorflow.random_normal_initializer", "tensorflow.shape", "tensorflow.concat", "tensorflow.transpose", "tensorflow.variable_scope", ...
fregu856/ebms_proposals
[ "e3e1cc35d5419ca61e25decb243a0b8bebd0d700" ]
[ "mdn_cell/mdn_train_K4_fullnet.py" ]
[ "# camera-ready\n\nfrom datasets import DatasetTrain # (this needs to be imported before torch, because cv2 needs to be imported before torch for some reason)\nfrom mdn_model_K4 import ToyNet\n\nimport torch\nimport torch.utils.data\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.nn.functional as ...
[ [ "matplotlib.use", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.title", "matplotlib.pyplot.close", "numpy.mean", "matplotlib.pyplot.figure", "torch.distributions.normal.Normal", "torch.utils.data.DataLoader", "matp...
kimukook/CLF-CBF-python
[ "28a46a4f9abf095e1f1b92e6cc056956caab5374" ]
[ "cbf_clf_qp.py" ]
[ "'''\n=====================================\nAuthor : Muhan Zhao\nDate : Feb. 16, 2020\nLocation: UC San Diego, La Jolla, CA\n=====================================\n'''\n\nimport numpy as np\nimport cvxpy as cp\n\n\nclass OptionsClass:\n \"\"\"\n Options Class\n \"\"\"\n\n def __init__(self):\n ...
[ [ "numpy.zeros", "numpy.copy", "numpy.ones", "numpy.eye", "numpy.hstack", "numpy.diag", "numpy.vstack", "numpy.atleast_2d" ] ]
JiazhengChai/synergy_DRL
[ "c08e78e5fe39d9d46213e1bf07b8dafc2195b05a" ]
[ "softlearning/algorithms/sac.py" ]
[ "from collections import OrderedDict\nfrom numbers import Number\n\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.python.training import training_util\n\nfrom .rl_algorithm import RLAlgorithm\n\n\ndef td_target(reward, discount, next_value):\n return reward + discount * next_value\n\n\nclass SAC(R...
[ [ "tensorflow.exp", "tensorflow.reduce_min", "tensorflow.zeros", "tensorflow.train.AdamOptimizer", "tensorflow.python.training.training_util.get_or_create_global_step", "tensorflow.group", "tensorflow.ones", "numpy.mean", "tensorflow.python.training.training_util._increment_globa...
sakshamarora1/Road-Fighter-AI
[ "9009240aee7af60605a1f878c0e969c35558c51c" ]
[ "Deep RL/agent.py" ]
[ "from dqn import DeepQNetwork, ReplayMemory, Transition\nimport torch\nimport numpy as np\n\n\nclass DQNAgent:\n def __init__(self, inputs, n_actions):\n self.brain = DeepQNetwork(inputs, 16, 16, outputNum=n_actions)\n self.target_brain = DeepQNetwork(inputs, 16, 16, outputNum=n_actions)\n s...
[ [ "torch.zeros", "numpy.random.choice", "torch.nn.MSELoss", "torch.no_grad", "numpy.exp", "torch.tensor", "numpy.random.random", "torch.argmax" ] ]
FedericoMontana/instrumentum
[ "0d07f6503c3c0fc980d349aeb6f47c960a4afe9c" ]
[ "src/instrumentum/model_tuning/old_wrapper_optuna.py" ]
[ "import logging\n\nimport optuna\nimport optuna.integration.lightgbm as lgb\nimport pandas as pd\nfrom catboost import CatBoostClassifier\nfrom lightgbm import LGBMClassifier\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.metrics import roc_au...
[ [ "sklearn.model_selection.cross_val_score", "sklearn.model_selection.RepeatedStratifiedKFold" ] ]
pradeep90/reddit-post-classifier
[ "081fd1cda50a0938d1b7f32c3919defbf27bea68" ]
[ "src/plotting.py" ]
[ "import datetime\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\n\nPLOT_NBC = False\nPLOT_LR = False\nPLOT_CNN = True\n\n# Learing curve for NBC\nif PLOT_NBC:\n\ttraining_fracs = [0.025, 0.05, 0.075, 0.1, 0.15, 0.2, 1.0]\n\ttraining_precision_at_5 = [1, 1, 1, 1, 1, 1]\n\ttesting_precisio...
[ [ "matplotlib.use", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.title", "matplotlib.pyplot.subplots", "matplotlib.pyplot.ylabel" ] ]
Crossmdl/Crossmdl
[ "49f245349cc32f750bc33ef891b2ee90f60317a6", "49f245349cc32f750bc33ef891b2ee90f60317a6" ]
[ "DropDtw-Code/train.py", "DropDtw-Code/models/nets.py" ]
[ "import os\nimport torch\nimport argparse\nimport random\nimport torch\nimport numpy as np\nimport pytorch_lightning as pl\nimport torchmetrics\nfrom copy import deepcopy, copy\nimport pickle as pkl\n\n\nfrom paths import PROJECT_PATH, WEIGHTS_PATH\nfrom models.nets import EmbeddingsMapping\nfrom models.losses imp...
[ [ "numpy.concatenate", "numpy.random.seed", "torch.manual_seed", "torch.cuda.is_available", "torch.load" ], [ "torch.nn.Linear", "torch.zeros", "torch.ones", "torch.nn.ReLU", "torch.nn.BatchNorm1d", "torch.zeros_like" ] ]
YuHe0108/cvmodule
[ "ea00a90fc9bbca5b2c7809791cbd1f7b0da526cd" ]
[ "HumeanPoseEstimate/loss.py" ]
[ "from tensorflow import keras\r\nimport tensorflow as tf\r\n\r\n\r\ndef joint_mse_loss(y_pred, y_true, true_weight):\r\n \"\"\"\r\n 损失函数想要表达的意思: 输出的特征图数量为关键点的数量,意味着输出的是每一个像素属于各个关键点的置信度\r\n \"\"\"\r\n batch_size = y_pred.shape[0]\r\n num_of_joints = y_pred.shape[-1] # 有多少个关键点\r\n y_pred = tf.resha...
[ [ "tensorflow.losses.MeanSquaredError", "tensorflow.reshape", "tensorflow.squeeze", "tensorflow.losses.mean_squared_error", "tensorflow.split", "tensorflow.reduce_mean" ] ]
IvanIFChen/Passiotic
[ "f6a035fad5c6a6372721e2f74f9abdc98d0ffe67", "f6a035fad5c6a6372721e2f74f9abdc98d0ffe67" ]
[ "plots/test 1 total count.py", "plots/test 2 total and unique count.py" ]
[ "import matplotlib.pyplot as plt\nimport json\nfrom dateutil import parser\nfrom pprint import pprint\nfrom collections import defaultdict\nfrom datetime import datetime, timedelta\n\n\ndef load_from_file(filename):\n data = defaultdict(int)\n raw_data = []\n with open(filename, 'r') as f:\n for lin...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.legend", "matplotlib.pyplot.subplots" ], [ "matplotlib.pyplot.show", "matplotlib.pyplot.legend", "matplotlib.pyplot.subplots" ] ]
VishaalMK/VectorDefense
[ "dc488fbf19bc9aefaf58bcc2b89dfe0e5adc3806" ]
[ "mnist_cnn.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport numpy as np\nimport keras\nfrom keras.utils import np_utils\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Activation, Flatten, Dr...
[ [ "matplotlib.use", "tensorflow.set_random_seed", "tensorflow.python.platform.flags.DEFINE_integer", "tensorflow.python.platform.flags.DEFINE_boolean", "numpy.random.RandomState", "tensorflow.Session", "tensorflow.train.Saver", "tensorflow.train.get_checkpoint_state", "tensorflow...
hangzh-msft/MLOpsDatabricks
[ "fc50127b236142a15c102a8c8e44ef1cbb584738" ]
[ "src/score/score.py" ]
[ "import json\nimport torch\nimport torch.nn as nn\nimport torchvision.transforms as transforms\nfrom azorean.core.model import Model\nfrom PIL import Image\n\n\nclass CNN(nn.Module):\n def __init__(self):\n super(CNN, self).__init__()\n self.layer1 = nn.Sequential(\n nn.Conv2d(1, 16, ker...
[ [ "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d", "torch.nn.ReLU", "torch.nn.Conv2d", "torch.load", "torch.argmax" ] ]
guangyizhangbci/EEG_Riemannian
[ "2d301bf3d06a192da2829c1c54b24d388ddea1dd" ]
[ "code/main.py" ]
[ "from __future__ import print_function, division\nimport tensorflow as tf\nimport matplotlib.pyplot as plt\nimport sys, os\nimport numpy as np\nfrom tqdm import tqdm\nfrom rich.progress import track\nfrom time import time\nimport pyriemann\nimport yaml\nimport argparse\nfrom scipy.stats import pearsonr\nfrom sklear...
[ [ "numpy.zeros", "numpy.random.seed", "tensorflow.random.set_random_seed", "numpy.round", "numpy.mean", "scipy.stats.pearsonr", "sklearn.metrics.accuracy_score", "numpy.ravel", "numpy.argmax", "tensorflow.device", "sklearn.model_selection.KFold", "numpy.expand_dims", ...
johnjohndoe/c3nav
[ "a17f863a3512e305595c16b0300796b6bae81241", "a17f863a3512e305595c16b0300796b6bae81241" ]
[ "src/c3nav/mapdata/render/geometry/altitudearea.py", "src/c3nav/mapdata/render/engines/svg.py" ]
[ "from collections import deque\nfrom itertools import chain\n\nimport numpy as np\n\nfrom c3nav.mapdata.models import AltitudeArea\nfrom c3nav.mapdata.render.geometry.hybrid import HybridGeometry\n\n\nclass AltitudeAreaGeometries:\n def __init__(self, altitudearea=None, colors=None, obstacles=None):\n if ...
[ [ "numpy.empty", "numpy.vstack" ], [ "numpy.array" ] ]
ezhaohongwei/jina
[ "9769f2e35eb8a196304a145409f959a7beac0432", "9769f2e35eb8a196304a145409f959a7beac0432" ]
[ "jina/types/document/graph.py", "tests/unit/types/document/test_document.py" ]
[ "from typing import Optional, Iterator, Tuple, Dict, Iterable\n\nimport numpy as np\n\nfrom . import Document, DocumentSourceType\nfrom ..arrays import ChunkArray\nfrom ..struct import StructView\nfrom ..ndarray.sparse.scipy import SparseNdArray\nfrom ...importer import ImportExtensions\nfrom ...logging.predefined ...
[ [ "scipy.sparse.coo_matrix", "numpy.array", "numpy.delete", "numpy.copy", "numpy.append" ], [ "tensorflow.SparseTensor", "numpy.array", "numpy.testing.assert_equal", "tensorflow.sparse.to_dense", "numpy.float64", "torch.sparse_coo_tensor", "numpy.random.random" ...
RayRuizhiLiao/DIM_DEMI
[ "6b0cb14f56f1aee232e553e75ea81a722b9e71dd" ]
[ "cortex_DIM_DEMI/models/coordinates.py" ]
[ "'''Coordinate task\n\n'''\n\nfrom cortex.plugins import ModelPlugin\nimport torch\nimport torch.nn.functional as F\n\nfrom cortex_DIM_DEMI.nn_modules.mi_networks import MI1x1ConvNet\n\n\nclass CoordinatePredictor(ModelPlugin):\n '''Coordinate prediction\n\n '''\n defaults = dict(\n data=dict(batch_...
[ [ "torch.zeros", "torch.max", "torch.chunk", "torch.nn.functional.log_softmax" ] ]
ljzycmd/SimDeblur
[ "dd2f60c41176b75c4eaf80d740f547c206aa8227", "31d88e1fbec91d5cc9062f4a46538e4ba806ab29" ]
[ "simdeblur/model/loss/perceptual_loss.py", "utils/metrics.py" ]
[ "\"\"\" ************************************************\n* fileName: perceptual_loss.py\n* desc: Perceptual loss using vggnet with conv1_2, conv2_2, conv3_3 feature,\n before relu layer. \n* author: mingdeng_cao\n* date: 2021/07/09 11:08\n* last revised: None\n***********************************************...
[ [ "torch.nn.functional.mse_loss" ], [ "torch.sqrt", "torch.ones", "torch.nn.functional.conv1d", "torch.nn.functional.conv2d", "torch.mean" ] ]
mleszczy/bootleg
[ "162d74001cdfbbe146753393641d549e0328acb1" ]
[ "bootleg/dataloaders/wiki_dataset.py" ]
[ "import os\nimport time\nimport ujson as json\nimport torch\nimport sys\nimport pickle\nimport numpy as np\nfrom torch.utils.data import Dataset\nimport torch.distributed as dist\nimport torch.nn.functional as F\n\nfrom bootleg.symbols.alias_entity_table import AliasEntityTable\nfrom bootleg.symbols.constants impor...
[ [ "torch.nn.functional.one_hot", "numpy.asarray", "numpy.zeros", "numpy.copy", "torch.from_numpy", "torch.ones", "numpy.memmap", "torch.tensor", "torch.bernoulli", "numpy.hstack", "torch.distributed.barrier" ] ]
CyberFlameGO/conversationai-models
[ "f82f66398b221d9fe3bcfd7641610af454b3db46", "f82f66398b221d9fe3bcfd7641610af454b3db46", "f82f66398b221d9fe3bcfd7641610af454b3db46" ]
[ "kaggle-classification/keras_trainer/custom_metrics.py", "experiments/tf_trainer/tf_cnn/finetune.py", "attention-tutorial/visualize_attention.py" ]
[ "\"\"\"Custom metrics used by Keras models.\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport tensorflow as tf\n\n\ndef auc_roc(y_true, y_pred):\n # any tensorflow metric\n y_true = tf.to_int32(tf.greater(y_true, 0.5))\n value, updat...
[ [ "tensorflow.local_variables", "tensorflow.metrics.auc", "tensorflow.greater", "tensorflow.control_dependencies", "tensorflow.add_to_collection", "tensorflow.identity" ], [ "tensorflow.logging.set_verbosity", "tensorflow.app.flags.DEFINE_string", "pandas.DataFrame", "ten...
zabaras/deep-turbulence
[ "0daca5daada449d4ba16bce37b703e20b444b6bc" ]
[ "tmglow/nn/modules/flowUtils.py" ]
[ "'''\n=====\nDistributed by: Notre Dame SCAI Lab (MIT Liscense)\n- Associated publication:\nurl: http://aimsciences.org//article/id/3a9f3d14-3421-4947-a45f-a9cc74edd097\ndoi: https://dx.doi.org/10.3934/fods.2020019\ngithub: https://github.com/zabaras/deep-turbulence\n=====\n'''\nimport torch\nimport torch.nn as nn\...
[ [ "torch.zeros", "torch.cat", "numpy.log", "torch.randn_like", "torch.nn.Conv2d", "torch.nn.modules.utils._quadruple" ] ]
tartaruszen/oddstream
[ "c3f2a4d6cba9753052acf8be03e5df038d40b745" ]
[ "build/lib/oddstream/kde_estimation.py" ]
[ "from fastkde import fastKDE\nimport numpy as np\n\n\"\"\"\n Fast 2D Kernel Density Estimation with simple point evaluation\n\"\"\"\nclass KDEEstimation2D(object):\n def __init__(self, X):\n self.pdf, self.axes = fastKDE.pdf(X[:, 0], X[:, 1])\n\n def evaluate_points(self, X):\n m = X.shape[0]...
[ [ "numpy.max", "numpy.min" ] ]
iamgroot42/cleverhans
[ "53da9cd6daf9d7457800831c3eaa75f729a39145", "53da9cd6daf9d7457800831c3eaa75f729a39145" ]
[ "cleverhans/train.py", "scripts/plot_success_fail_curve.py" ]
[ "\"\"\"\nMulti-replica synchronous training\n\n\nNOTE: This module is much more free to change than many other modules\nin CleverHans. CleverHans is very conservative about changes to any\ncode that affects the output of benchmark tests (attacks, evaluation\nmethods, etc.). This module provides *model training* fun...
[ [ "tensorflow.control_dependencies", "numpy.isinf", "numpy.isnan", "tensorflow.train.AdamOptimizer", "tensorflow.assign", "numpy.random.RandomState", "tensorflow.Variable", "tensorflow.add_n", "tensorflow.placeholder", "tensorflow.train.ExponentialMovingAverage", "tensorf...
Twizwei/idinvert_pytorch
[ "11f1126aab517fbe32b488d92f6fdea339463d04" ]
[ "utils/inverter.py" ]
[ "# python 3.7\n\"\"\"Utility functions to invert a given image back to a latent code.\"\"\"\n\nfrom tqdm import tqdm\nimport cv2\nimport numpy as np\n\nimport torch\n\nfrom models.stylegan_generator import StyleGANGenerator\nfrom models.stylegan_encoder import StyleGANEncoder\nfrom models.perceptual_model import Pe...
[ [ "torch.nn.functional.softplus", "numpy.zeros", "torch.optim.Adam", "numpy.tile", "torch.Tensor", "torch.mean" ] ]
acceleratedmaterials/NUS_workshop
[ "8937111a4f4d252ed76e33897fd4be7d9582a491" ]
[ "gold nanocluster synthesis/own_package/others.py" ]
[ "import numpy as np\nimport pandas as pd\nfrom openpyxl import load_workbook\nimport sys\n\ndef print_array_to_excel(array, first_cell, ws, axis=2):\n '''\n Print an np array to excel using openpyxl\n :param array: np array\n :param first_cell: first cell to start dumping values in\n :param ws: works...
[ [ "numpy.array" ] ]
Juspem1980/privacy
[ "d122e2d1c7182ba7195ecbcb1cb8da29b2a14d6f" ]
[ "tensorflow_privacy/privacy/dp_query/gaussian_query.py" ]
[ "# Copyright 2018, The TensorFlow Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable ...
[ [ "tensorflow.compat.v1.cast", "tensorflow.compat.v1.clip_by_global_norm", "tensorflow.compat.v1.nest.map_structure", "tensorflow.compat.v1.random_normal_initializer", "tensorflow.compat.v1.shape", "tensorflow.compat.v1.control_dependencies", "tensorflow.compat.v1.nest.flatten", "ten...
jaimefrio/pandas
[ "d6a77007b247f3c218ecc38de8130e7d42e1d0e9" ]
[ "pandas/tests/test_frame.py" ]
[ "# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\n# pylint: disable-msg=W0612,E1101\nfrom copy import deepcopy\nfrom datetime import datetime, timedelta, time, date\nimport sys\nimport operator\nimport re\nimport csv\nimport nose\nimport functools\nimport itertools\nfrom itertools import product, p...
[ [ "numpy.ma.masked_all", "numpy.random.rand", "numpy.array_equal", "numpy.random.choice", "numpy.median", "pandas.core.nanops.nansem", "pandas.compat.OrderedDict", "numpy.tile", "scipy.stats.skew", "pandas.core.common.pprint_thing", "pandas.util.testing.getSeriesData", ...
leonsariel/python
[ "dd68c21a02417341031b40c945152a61be12e3eb" ]
[ "finance/tutorial/tester.py" ]
[ "# _*_ coding: utf-8 _*_\n__author__ = 'Di Meng'\n__date__ = '1/3/2018 10:16 PM'\n\n# _*_ coding: utf-8 _*_\n__author__ = 'Di Meng'\n__date__ = '1/3/2018 9:26 PM'\n\nfrom tutorial.feature_functions import *\nimport pandas as pd\nimport plotly as py\nimport json\n\nfrom plotly import tools\nimport plotly.graph_objs ...
[ [ "pandas.to_datetime", "pandas.read_csv" ] ]
KevinLee3627/pi-temp-monitor
[ "0ab519f19693a201fa5a49e58cfa7e73becd7206" ]
[ "monitor_temp.py" ]
[ "from gpiozero import CPUTemperature\nfrom tabulate import tabulate\nfrom math import floor\nimport numpy as np\nimport termplotlib as tpl\nimport time\nimport shutil\n\ndef roundNum(num, digits):\n return floor(num * 10 ** digits) / (10 ** digits)\n\ndef CtoF(temp):\n fahrenheit = (temp + 1.8) + 32\n roun...
[ [ "numpy.average", "numpy.amax", "numpy.amin" ] ]
ShuanDeMorian/deepspeech.pytorch
[ "58d7a693447ead632ef9b625681790ee8b5f6b82" ]
[ "data/data_loader.py" ]
[ "import os\nimport subprocess\nfrom tempfile import NamedTemporaryFile\n\nfrom torch.distributed import get_rank\nfrom torch.distributed import get_world_size\nfrom torch.utils.data.sampler import Sampler\n\nimport librosa\nimport numpy as np\nimport scipy.signal\nimport torch\nfrom scipy.io.wavfile import read\nim...
[ [ "torch.zeros", "torch.distributed.get_world_size", "numpy.random.binomial", "numpy.random.choice", "numpy.random.rand", "torch.IntTensor", "torch.FloatTensor", "torch.Generator", "numpy.random.shuffle", "numpy.log1p", "numpy.random.uniform", "torch.distributed.get_r...
kuanhanl/k_aug
[ "5ceaccbf9e699a9dffe284de686f1b623cafbec5" ]
[ "Reduce_hessian/tests/B1.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue May 12 14:25:43 2020\n\n@author: greg6\n\"\"\"\n\nimport numpy as np\n\nt = [i for i in range(3)]\nlam = [100+i*10 for i in range(2)]\ncom = [\"A\",\"B\",\"C\"]\n\nS = dict()\nfor l in lam:\n for u,c in enumerate(com):\n S[(l,c)] = l+0.1*u\n\nC = dict()\nfo...
[ [ "numpy.zeros" ] ]
vpeterson/mne-python
[ "a6e2222a7e76f5b13a371697b1b61d22ac5bf67d" ]
[ "mne/io/kit/kit.py" ]
[ "\"\"\"Conversion tool from SQD to FIF.\n\nRawKIT class is adapted from Denis Engemann et al.'s mne_bti2fiff.py.\n\"\"\"\n\n# Authors: Teon Brooks <teon.brooks@gmail.com>\n# Joan Massich <mailsik@gmail.com>\n# Christian Brodbeck <christianbrodbeck@nyu.edu>\n#\n# License: BSD (3-clause)\n\nfrom col...
[ [ "numpy.full", "numpy.array", "numpy.empty", "numpy.asarray", "numpy.zeros", "numpy.sum", "numpy.mean", "numpy.where", "numpy.radians", "numpy.arange", "numpy.fromfile", "numpy.unique", "numpy.searchsorted", "scipy.linalg.norm", "numpy.cross", "numpy....
NCTUMLlab/Adversarial-Masking-Transformers-for-Language-Understanding
[ "b43fb91cf99ee3ffaf137cd0be87b67448995c9b" ]
[ "models/transformer.py" ]
[ "# Copyright (c) 2017-present, Facebook, Inc.\r\n# All rights reserved.\r\n#\r\n# This source code is licensed under the license found in the LICENSE file in\r\n# the root directory of this source tree. An additional grant of patent rights\r\n# can be found in the PATENTS file in the same directory.\r\n\r\nimport m...
[ [ "torch.nn.Linear", "torch.zeros", "torch.nn.ModuleList", "torch.nn.init.constant_", "torch.nn.Softmax", "torch.nn.functional.dropout", "torch.argsort", "torch.nn.init.xavier_uniform_", "torch.FloatTensor", "torch.nn.init.normal_", "torch.nn.functional.linear", "nump...
OrenBochman/probability
[ "eb4cff2c441e52f0604236b30d422577e498349c" ]
[ "tensorflow_probability/python/distributions/zipf_test.py" ]
[ "# Copyright 2018 The TensorFlow Probability Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a...
[ [ "scipy.stats.zipf.logcdf", "numpy.array", "numpy.ndenumerate", "numpy.ceil", "numpy.vectorize", "numpy.ones_like", "tensorflow.compat.v2.TensorShape", "tensorflow.compat.v2.test.main", "scipy.stats.zipf.std", "scipy.stats.zipf.pmf", "scipy.stats.zipf.logpmf", "tenso...
rochamatcomp/python-rocha
[ "bbf8b559f8052f8c081be29ef21d3e1f697477c3" ]
[ "tests/test_plots.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n:mod:`plots` -- Tests data plots\n================================\n\n.. module:: plots\n :platform: Unix, Windows\n :synopsis: Tests of the raster plots and processed data plots.\n.. moduleauthor:: Andre Rocha <rocha.matcomp@gmail.com>\n\"\"\"\n\nimport matplotlib.pyplot as ...
[ [ "matplotlib.testing.decorators.image_comparison" ] ]
harshita1000/crest
[ "64918b85d31e7939fce874431b6059c0c9cca7b7" ]
[ "third_party/augment_ops.py" ]
[ "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "tensorflow.reduce_min", "tensorflow.cumsum", "tensorflow.ones", "tensorflow.ones_like", "tensorflow.reshape", "tensorflow.saturate_cast", "tensorflow.zeros_like", "tensorflow.clip_by_value", "tensorflow.stack", "tensorflow.tile", "tensorflow.image.rgb_to_grayscale", ...
satya323/spark
[ "4f825aad65f2650343e7cfbef39465ebb4e403b6" ]
[ "python/pyspark/pandas/data_type_ops/base.py" ]
[ "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); yo...
[ [ "pandas.api.types.CategoricalDtype", "numpy.dtype" ] ]
RobbinBouwmeester/LIT
[ "0516a69fbf1b8e9976524e0c243f82de041df544" ]
[ "src/lpb.py" ]
[ "\"\"\"\n Copyright (c) 2017 Robbin Bouwmeester\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, me...
[ [ "pandas.DataFrame", "pandas.read_csv" ] ]
MathieuTuli/transformers
[ "da3db8ba7a18deed492808b0d6c5d29669241fa0" ]
[ "src/transformers/adas.py" ]
[ "\"\"\"\n\"\"\"\nfrom __future__ import division\nfrom torch.optim.optimizer import Optimizer, required\n\nimport numpy as np\nimport torch\n\nfrom typing import NamedTuple, List\nfrom dataclasses import dataclass\nfrom enum import Enum\nfrom typing import Union, Tuple\n# from scipy.sparse.linalg import svds\nfrom ...
[ [ "numpy.divide", "torch.reshape", "numpy.array", "numpy.less", "torch.sqrt", "numpy.isclose", "numpy.log", "numpy.ceil", "numpy.sum", "torch.svd", "numpy.greater_equal", "numpy.less_equal", "numpy.sqrt", "numpy.maximum", "torch.diag", "torch.clone", ...
mmachenry/pie-pie-chart
[ "d5706c85381b58a3990a20021f6c35c28ee51e0b" ]
[ "pie_pie_chart.py" ]
[ "import RPi.GPIO as GPIO\nimport hx711\nimport matplotlib.pyplot as plt\n \n# Read initial calibration and tare weight data then display the plot.\ndef main():\n GPIO.setmode(GPIO.BCM)\n hx = hx711.HX711(dout_pin=5, pd_sck_pin=6)\n zero_the_scale(hx)\n calibrate_scale(hx)\n (tare_weight, total_weight...
[ [ "matplotlib.pyplot.pie", "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "matplotlib.pyplot.draw", "matplotlib.pyplot.pause", "matplotlib.pyplot.clf" ] ]
jcchan23/SAIL
[ "878c59e9f1b4e6df3e2424c8213c1df25459e950", "878c59e9f1b4e6df3e2424c8213c1df25459e950", "878c59e9f1b4e6df3e2424c8213c1df25459e950" ]
[ "Repeat/CoMPT/utils_node.py", "Repeat/MTDSite/utils.py", "Repeat/GraphSite/dataset.py" ]
[ "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n'''\n@File : utils_node.py\n@Time : 2022/03/08 14:35:13\n@Author : Jianwen Chen\n@Version : 1.0\n@Contact : chenjw48@mail2.sysu.edu.cn\n@License : (C)Copyright 2021-2022, SAIL-Lab\n'''\n######################################## import area #######...
[ [ "numpy.concatenate", "numpy.array", "torch.cuda.manual_seed", "numpy.random.seed", "torch.full_like", "torch.manual_seed", "torch.abs", "sklearn.metrics.mean_absolute_error", "torch.cuda.empty_cache", "sklearn.metrics.r2_score", "torch.nn.init.xavier_normal_", "torc...
aasir22/tools_classification
[ "f5a2606f5fa07c1ebc161c467d17f4e7a04c5ebb" ]
[ "training.py" ]
[ "from tensorflow.keras.layers import Dense, Flatten\nfrom tensorflow.keras.models import Model\nfrom tensorflow.keras.applications.vgg19 import VGG19\nfrom tensorflow.keras.preprocessing.image import ImageDataGenerator\nfrom tensorflow.keras.callbacks import ModelCheckpoint\nfrom datetime import datetime\nimport nu...
[ [ "tensorflow.keras.preprocessing.image.ImageDataGenerator", "numpy.array", "sklearn.metrics.confusion_matrix", "tensorflow.keras.layers.Flatten", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "tensorflow.keras.models.Model", "tensorflow.keras...
Tenvence/polar-inst
[ "95b2ef2fbc666469b031367e6aeb471d0465c272" ]
[ "model/polar_inst.py" ]
[ "import torch\nimport torch.nn as nn\n\nfrom model.modules.stage_backbone import StageBackbone\nfrom model.modules.feature_pyramid_net import FeaturePyramidNet\nfrom model.modules.polar_head import PolarHead\n\n\nclass PolarInst(nn.Module):\n def __init__(self, num_polars, num_channels, num_classes):\n su...
[ [ "torch.cat", "torch.tensor" ] ]