repo_name stringlengths 8 75 | hexsha stringlengths 40 40 | code stringlengths 447 163k | apis list | file_path stringlengths 7 127 | api_extract stringlengths 346 104k |
|---|---|---|---|---|---|
GZHoffie/analytics-zoo | d0258aa113ffd1a5c4927376fb32b09fb0baf73c | #
# Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | [
"tensorflow.keras.models.load_model",
"tensorflow.keras.models.Model",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.optimizers.RMSprop",
"tensorflow.keras.layers.LSTM",
"tensorflow.keras.layers.Input"
] | pyzoo/zoo/zouwu/model/Seq2Seq.py | [(58, 'tensorflow.keras.layers.Input', 'Input', ([], {'shape': '(None, self.feature_num)', 'name': '"""encoder_inputs"""'}), False, 'from tensorflow.keras.layers import Input, LSTM, Dense\n'), (59, 'tensorflow.keras.layers.LSTM', 'LSTM', ([], {'units': 'self.latent_dim', 'dropout': 'self.dropout', 'return_state': '(Tru... |
GZHoffie/analytics-zoo | d0258aa113ffd1a5c4927376fb32b09fb0baf73c | # Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | [
"tensorflow.keras.initializers.Constant",
"tensorflow.matmul",
"tensorflow.keras.models.Model",
"numpy.reshape",
"tensorflow.keras.backend.dot",
"tensorflow.keras.backend.sum",
"tensorflow.keras.backend.concatenate",
"tensorflow.keras.backend.rnn",
"tensorflow.keras.backend.reshape",
"tensorflow.k... | pyzoo/zoo/zouwu/model/MTNet_keras.py | [(142, 'tensorflow.keras.backend.sum', 'K.sum', (['(attention * X)', '[1]'], {}), True, 'import tensorflow.keras.backend as K\n'), (186, 'tensorflow.keras.backend.rnn', 'K.rnn', (['self.step', 'x', 'initial_states'], {'go_backwards': 'self.layer.go_backwards', 'mask': 'mask', 'constants': 'constants', 'unroll': 'self.l... |
YifanQie/Deep_Learning_for_Manufacturing | 9ba19e41f69c561b04b8573ab9c52c0969f45bfd | """ The model deploy file is used to leverage a trained model to perform inference on unknown set of node deviations.
"""
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import sys
current_path=os.path.dirname(__file__)
parentdir = os.path.dirname(current_path)
#Adding Path to various Modules
sys.path.append("../... | [
"tensorflow.keras.models.load_model",
"numpy.core.defchararray.add",
"numpy.min",
"tensorflow.get_logger",
"numpy.round",
"numpy.max",
"tensorflow.keras.backend.epsilon",
"numpy.savetxt",
"numpy.array",
"scipy.ndimage.interpolation.zoom",
"numpy.sum"
] | core/model_deployment.py | [(8, 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), False, 'import os\n'), (9, 'os.path.dirname', 'os.path.dirname', (['current_path'], {}), False, 'import os\n'), (12, 'sys.path.append', 'sys.path.append', (['"""../core"""'], {}), False, 'import sys\n'), (13, 'sys.path.append', 'sys.path.append', (['"""../v... |
jacenkow/inside | 6f860420644b50b78981158a59ceed8cdbd209bf | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 Grzegorz Jacenków.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable... | [
"tensorflow.keras.metrics.Mean",
"tensorflow.GradientTape"
] | inside/pipelines/clevr.py | [(41, 'inside.constructor.setup_model', 'setup_model', ([], {}), False, 'from inside.constructor import setup_comet_ml, setup_model\n'), (44, 'inside.constructor.setup_comet_ml', 'setup_comet_ml', ([], {}), False, 'from inside.constructor import setup_comet_ml, setup_model\n'), (47, 'inside.metrics.DiceScore', 'DiceSco... |
kaylani2/machineLearning | 692623abf6fe02bde6c7da6c2f8c0ec526a3e8f8 | import os
import time
from multiprocessing import Process
from typing import Tuple
import flwr as fl
import numpy as np
import tensorflow as tf
from flwr.server.strategy import FedAvg
import dataset
# generate random integer values
from random import seed
from random import randint
# Make TensorFlow log less verbos... | [
"tensorflow.keras.Input",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.metrics.MeanSquaredError",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.metrics.CategoricalAccuracy",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.layers.Flatten"
] | src/specific_models/federated/single_machine_simulation_flower/single_machine_simulation.py | [(29, 'flwr.server.strategy.FedAvg', 'FedAvg', ([], {'min_available_clients': 'num_clients', 'fraction_fit': 'fraction_fit'}), False, 'from flwr.server.strategy import FedAvg\n'), (31, 'flwr.server.start_server', 'fl.server.start_server', ([], {'strategy': 'strategy', 'config': "{'num_rounds': num_rounds}"}), True, 'im... |
haruiz/models | 2db2501bc9928f68e225282f3884b81680a9cccb | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.transpose",
"tensorflow.keras.models.Model",
"tensorflow.cast",
"tensorflow.python.keras.backend.get_graph",
"tensorflow.keras.layers.Input"
] | official/vision/detection/modeling/retinanet_model.py | [(42, 'official.vision.detection.modeling.architecture.factory.backbone_generator', 'factory.backbone_generator', (['params'], {}), False, 'from official.vision.detection.modeling.architecture import factory\n'), (43, 'official.vision.detection.modeling.architecture.factory.multilevel_features_generator', 'factory.mult... |
haruiz/models | 2db2501bc9928f68e225282f3884b81680a9cccb | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Activation",
"tensorflow.keras.utils.register_keras_serializable",
"tensorflow.keras.layers.Input"
] | official/nlp/modeling/networks/token_classification.py | [(25, 'tensorflow.keras.utils.register_keras_serializable', 'tf.keras.utils.register_keras_serializable', ([], {'package': '"""Text"""'}), True, 'import tensorflow as tf\n'), (55, 'tensorflow.keras.layers.Input', 'tf.keras.layers.Input', ([], {'shape': '(None, input_width)', 'name': '"""sequence_data"""', 'dtype': 'tf.... |
sanghuynh1501/mlcollect | e85fe6a08e14fa6502166c1a7bfffdcd8c3a25b2 | from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.layers import MaxPooling2D
from tensorflow.keras.layers import Activation
from tensorflow.keras.layers import Flatten
from tensorflow.keras.layers import Dense
from tensorflow.keras import backend as K
clas... | [
"tensorflow.keras.layers.Activation",
"tensorflow.keras.backend.image_data_format",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.models.Sequential",
"tensorflow.keras.layers.Flatten"
] | mlcollect/cnn/lenet.py | [(14, 'tensorflow.keras.models.Sequential', 'Sequential', ([], {}), False, 'from tensorflow.keras.models import Sequential\n'), (18, 'tensorflow.keras.backend.image_data_format', 'K.image_data_format', ([], {}), True, 'from tensorflow.keras import backend as K\n'), (22, 'tensorflow.keras.layers.Conv2D', 'Conv2D', (['(2... |
sanghuynh1501/mlcollect | e85fe6a08e14fa6502166c1a7bfffdcd8c3a25b2 | from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import BatchNormalization
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.layers import MaxPooling2D
from tensorflow.keras.layers import Activation
from tensorflow.keras.layers import Flatten
from tensorflow.keras.layers import... | [
"tensorflow.keras.layers.Activation",
"tensorflow.keras.backend.image_data_format",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.BatchNormalization",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.models.Seque... | mlcollect/cnn/minivggnet.py | [(16, 'tensorflow.keras.models.Sequential', 'Sequential', ([], {}), False, 'from tensorflow.keras.models import Sequential\n'), (21, 'tensorflow.keras.backend.image_data_format', 'K.image_data_format', ([], {}), True, 'from tensorflow.keras import backend as K\n'), (26, 'tensorflow.keras.layers.Conv2D', 'Conv2D', (['(3... |
deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
"tensorflow.data.Dataset.from_tensors",
"tensorflow.keras.losses.CategoricalCrossentropy",
"tensorflow.executing_eagerly",
"tensorflow.zeros",
"tensorflow.compat.v2.enable_v2_behavior",
"tensorflow.keras.optimizers.Adam",
"tensorflow.one_hot",
"tensorflow.keras.metrics.SparseCategoricalAccuracy",
"t... | non_semantic_speech_benchmark/eval_embedding/finetune/train_keras_test.py | [(36, 'tensorflow.zeros', 'tf.zeros', (['(bs, 32000)', 'tf.float32'], {}), True, 'import tensorflow as tf\n'), (37, 'tensorflow.zeros', 'tf.zeros', (['[bs]', 'tf.int32'], {}), True, 'import tensorflow as tf\n'), (44, 'absl.testing.parameterized.parameters', 'parameterized.parameters', (["{'num_clusters': 0, 'alpha_init... |
deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
"numpy.hstack",
"tensorflow.concat",
"tensorflow.keras.losses.MeanSquaredError",
"tensorflow.compat.v1.enable_eager_execution",
"tensorflow.keras.optimizers.Adam",
"numpy.float32",
"numpy.array",
"tensorflow.keras.metrics.Mean",
"tensorflow.GradientTape"
] | ravens/ravens/agents/gt_state_2_step.py | [(29, 'tensorflow.compat.v1.enable_eager_execution', 'tf.compat.v1.enable_eager_execution', ([], {}), True, 'import tensorflow as tf\n'), (42, 'tensorflow.keras.optimizers.Adam', 'tf.keras.optimizers.Adam', ([], {'learning_rate': '(0.0002)'}), True, 'import tensorflow as tf\n'), (43, 'tensorflow.keras.optimizers.Adam',... |
ahmedsabie/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.python.compat.v2_compat.enable_v2_behavior",
"tensorflow.python.keras.layers.preprocessing.hashing.Hashing",
"tensorflow.python.framework.tensor_shape.TensorShape",
"tensorflow.python.keras.Input",
"tensorflow.python.platform.test.main",
"tensorflow.python.ops.string_ops.string_to_hash_bucket"... | tensorflow/python/keras/layers/preprocessing/benchmarks/hashing_benchmark.py | [(40, 'tensorflow.python.compat.v2_compat.enable_v2_behavior', 'v2_compat.enable_v2_behavior', ([], {}), False, 'from tensorflow.python.compat import v2_compat\n'), (46, 'itertools.count', 'itertools.count', (['(1)'], {}), False, 'import itertools\n'), (115, 'tensorflow.python.platform.test.main', 'test.main', ([], {})... |
victor-tuda/chatbot | 3cadd018759344991c77e2aa86b8965ed0271789 | import random
import json
import pickle
import numpy as np
import nltk
nltk.download('punkt')
nltk.download('wordnet')
from nltk.stem import WordNetLemmatizer
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Activation, Dropout
from tensorflow.keras.optimizers import SGD
lemm... | [
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Dropout",
"numpy.array",
"tensorflow.keras.models.Sequential",
"tensorflow.keras.optimizers.SGD"
] | training.py | [(7, 'nltk.download', 'nltk.download', (['"""punkt"""'], {}), False, 'import nltk\n'), (8, 'nltk.download', 'nltk.download', (['"""wordnet"""'], {}), False, 'import nltk\n'), (15, 'nltk.stem.WordNetLemmatizer', 'WordNetLemmatizer', ([], {}), False, 'from nltk.stem import WordNetLemmatizer\n'), (54, 'random.shuffle', 'r... |
Sensors-in-Paradise/OpportunityML | a123b4842de45f735d517be6bcd96ca35171db91 | from random import shuffle
from models.RainbowModelLeaveRecsOut import RainbowModelLeaveRecsOut
from tensorflow.keras.layers import Conv1D, MaxPooling1D, Flatten, Dense, Dropout # type: ignore
from tensorflow.keras.models import Sequential # type: ignore
import numpy as np
from utils.Recording import Recording
from ... | [
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv1D",
"tensorflow.keras.layers.MaxPooling1D",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.models.Sequential",
"tensorflow.keras.layers.Flatten"
] | archive/model_archive/ConvModel.py | [(42, 'tensorflow.keras.models.Sequential', 'Sequential', ([], {}), False, 'from tensorflow.keras.models import Sequential\n'), (44, 'tensorflow.keras.layers.Conv1D', 'Conv1D', ([], {'filters': '(64)', 'kernel_size': '(3)', 'activation': '"""relu"""', 'input_shape': '(self.window_size, n_features)'}), False, 'from tens... |
abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.python.framework.tensor_shape.TensorShape",
"tensorflow.python.ops.variable_scope.variable_creator_scope",
"tensorflow.python.framework.ops.name_from_scope_name",
"tensorflow.python.eager.context.context",
"tensorflow.python.framework.ops.get_collection_ref",
"tensorflow.python.framework.ops.g... | tensorflow/python/eager/wrap_function.py | [(540, 'tensorflow.python.util.tf_export.tf_export', 'tf_export', ([], {'v1': "['wrap_function']"}), False, 'from tensorflow.python.util.tf_export import tf_export\n'), (123, 'tensorflow.python.ops.resource_variable_ops.UninitializedVariable', 'resource_variable_ops.UninitializedVariable', ([], {'shape': 'old_variable.... |
lenna-project/birds-plugin | c548790dcb0593b80ea6da4605e7aa32e3f141ae | import logging
import numpy as np
import os
import PIL
import PIL.Image
import tensorflow as tf
from tensorflow.keras.layers import Layer, Conv2D, MaxPool2D, Dense, Flatten, Dropout, GlobalAveragePooling2D
from tensorflow.keras.applications import MobileNetV2
from tensorflow.keras import layers
from tensorflow.keras i... | [
"tensorflow.keras.utils.image_dataset_from_directory",
"tensorflow.keras.callbacks.ModelCheckpoint",
"tensorflow.keras.layers.GlobalAveragePooling2D",
"tensorflow.keras.layers.RandomFlip",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.Model",
"tensorflow.keras.layers.RandomZoom",
"tensorflow.kera... | scripts/train.py | [(18, 'os.path.join', 'os.path.join', (['data_dir', '"""train"""'], {}), False, 'import os\n'), (19, 'os.path.join', 'os.path.join', (['data_dir', '"""valid"""'], {}), False, 'import os\n'), (20, 'os.path.join', 'os.path.join', (['data_dir', '"""test"""'], {}), False, 'import os\n'), (22, 'tensorflow.keras.utils.image_... |
mcasanova1445/models | 7214e17eb425963ec3d0295be215d5d26deaeb32 | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.keras.mixed_precision.set_global_policy",
"tensorflow.keras.Input",
"tensorflow.test.main",
"tensorflow.keras.Model",
"tensorflow.keras.activations.get",
"tensorflow.keras.initializers.get",
"numpy.random.randint"
] | official/nlp/modeling/networks/albert_encoder_test.py | [(188, 'tensorflow.test.main', 'tf.test.main', ([], {}), True, 'import tensorflow as tf\n'), (36, 'tensorflow.keras.mixed_precision.set_global_policy', 'tf.keras.mixed_precision.set_global_policy', (['"""float32"""'], {}), True, 'import tensorflow as tf\n'), (55, 'official.nlp.modeling.networks.albert_encoder.AlbertEnc... |
mcasanova1445/models | 7214e17eb425963ec3d0295be215d5d26deaeb32 | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.zeros",
"tensorflow.reduce_sum",
"tensorflow.cast",
"tensorflow.keras.losses.sparse_categorical_crossentropy",
"tensorflow.distribute.get_strategy",
"tensorflow.name_scope",
"tensorflow.data.Dataset.range",
"tensorflow.keras.initializers.TruncatedNormal",
"tensorflow.keras.metrics.Sparse... | official/nlp/tasks/masked_lm.py | [(45, 'official.core.task_factory.register_task_cls', 'task_factory.register_task_cls', (['MaskedLMConfig'], {}), False, 'from official.core import task_factory\n'), (41, 'official.core.config_definitions.DataConfig', 'cfg.DataConfig', ([], {}), True, 'from official.core import config_definitions as cfg\n'), (42, 'offi... |
mcasanova1445/models | 7214e17eb425963ec3d0295be215d5d26deaeb32 | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.maximum",
"tensorflow.minimum",
"tensorflow.cast",
"tensorflow.keras.utils.register_keras_serializable",
"tensorflow.logical_and"
] | official/recommendation/ranking/common.py | [(47, 'tensorflow.keras.utils.register_keras_serializable', 'tf.keras.utils.register_keras_serializable', ([], {'package': '"""RANKING"""'}), True, 'import tensorflow as tf\n'), (27, 'official.common.flags.define_flags', 'tfm_flags.define_flags', ([], {}), True, 'from official.common import flags as tfm_flags\n'), (32,... |
mcasanova1445/models | 7214e17eb425963ec3d0295be215d5d26deaeb32 | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.keras.mixed_precision.set_global_policy",
"tensorflow.keras.Input",
"tensorflow.keras.initializers.RandomUniform",
"tensorflow.zeros",
"numpy.random.random_sample",
"tensorflow.test.main",
"tensorflow.keras.Model",
"numpy.ones",
"numpy.random.rand",
"tensorflow.keras.initializers.Trunc... | official/nlp/modeling/layers/reuse_transformer_test.py | [(24, 'absl.testing.parameterized.named_parameters', 'parameterized.named_parameters', (["('base', reuse_transformer.ReuseTransformer)"], {}), False, 'from absl.testing import parameterized\n'), (310, 'absl.testing.parameterized.parameters', 'parameterized.parameters', (["{'attention_axes': None}", "{'attention_axes': ... |
mcasanova1445/models | 7214e17eb425963ec3d0295be215d5d26deaeb32 | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.test.main",
"tensorflow.keras.Model",
"tensorflow.keras.initializers.TruncatedNormal",
"numpy.zeros",
"tensorflow.keras.layers.Input"
] | official/projects/nhnet/decoder_test.py | [(147, 'tensorflow.test.main', 'tf.test.main', ([], {}), True, 'import tensorflow as tf\n'), (29, 'official.projects.nhnet.utils.get_test_params', 'utils.get_test_params', ([], {}), False, 'from official.projects.nhnet import utils\n'), (32, 'official.projects.nhnet.decoder.TransformerDecoder', 'decoder.TransformerDeco... |
puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | [
"tensorflow.keras.layers.LayerNormalization",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.utils.get_registered_name",
"tensorflow.keras.layers.Dense",
"tensorflow.cast",
"tensorflow.keras.utils.register_keras_serializable",
"tensorflow.squeeze",
"tensorflow.keras.layers.Add",
"tensorflow.ke... | DeepLearningExamples/TensorFlow2/LanguageModeling/BERT/official/nlp/modeling/networks/encoder_scaffold.py | [(28, 'tensorflow.keras.utils.register_keras_serializable', 'tf.keras.utils.register_keras_serializable', ([], {'package': '"""Text"""'}), True, 'import tensorflow as tf\n'), (92, 'tensorflow.keras.initializers.TruncatedNormal', 'tf.keras.initializers.TruncatedNormal', ([], {'stddev': '(0.02)'}), True, 'import tensorfl... |
gunpowder78/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
"tensorflow.convert_to_tensor",
"tensorflow.nn.softmax",
"tensorflow.constant",
"tensorflow.while_loop",
"tensorflow.concat",
"tensorflow.shape",
"tensorflow.TensorArray",
"tensorflow.zeros",
"tensorflow.reshape",
"tensorflow.random.uniform",
"tensorflow.keras.initializers.GlorotUniform",
"ten... | snlds/model_cavi_snlds.py | [(85, 'tensorflow.keras.initializers.GlorotUniform', 'tf.keras.initializers.GlorotUniform', ([], {}), True, 'import tensorflow as tf\n'), (122, 'tensorflow_probability.experimental.as_composite', 'tfp.experimental.as_composite', (['return_dist'], {}), True, 'import tensorflow_probability as tfp\n'), (603, 'snlds.model_... |
TUDelftHao/models | faf0c2dc442ceaa8425aff73abd00f92f3137b7b | # Lint as: python3
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | [
"tensorflow.keras.Input",
"tensorflow.keras.backend.image_data_format",
"tensorflow.identity",
"tensorflow.keras.utils.register_keras_serializable",
"tensorflow.add_n",
"tensorflow.keras.layers.InputSpec"
] | official/vision/beta/modeling/backbones/spinenet.py | [(116, 'tensorflow.keras.utils.register_keras_serializable', 'tf.keras.utils.register_keras_serializable', ([], {'package': '"""Vision"""'}), True, 'import tensorflow as tf\n'), (112, 'absl.logging.info', 'logging.info', (['"""Building SpineNet block specs: %s"""', 'block_specs'], {}), False, 'from absl import logging\... |
shayxu-ai/A-Repository-for-Machine-Learning | 4b4cea15bb005d1c58f4395fde97cadf44fb0186 | # -*- coding: utf-8 -*-
# @Time: 2020/2/5,005 22:02
# @Last Update: 2020/2/5,005 22:02
# @Author: 徐缘
# @FileName: 2.practices_on_nlp.py
# @Software: PyCharm
from __future__ import absolute_import, division, print_function, unicode_literals # 导入一些熟悉的陌生人
# 绝对引入,精确除法,print,unicode类型字符串。都是为了适配python2,不加也罢
import nu... | [
"matplotlib.pyplot.legend",
"tensorflow.executing_eagerly",
"matplotlib.pyplot.title",
"tensorflow.keras.layers.Embedding",
"tensorflow.keras.layers.Dense",
"tensorflow.config.experimental.list_physical_devices",
"tensorflow.keras.layers.GlobalAveragePooling1D",
"tensorflow.keras.Sequential",
"matpl... | 测试/tensorflow_hello/2.practices_on_nlp.py | [(21, 'tensorflow_datasets.disable_progress_bar', 'tfds.disable_progress_bar', ([], {}), True, 'import tensorflow_datasets as tfds\n'), (41, 'tensorflow_datasets.load', 'tfds.load', ([], {'name': '"""imdb_reviews"""', 'split': "('train[:60%]', 'train[60%:]', 'test')", 'as_supervised': '(True)'}), True, 'import tensorfl... |
TS-SE-GROUP/icme2019 | fe9b31db7bf19b08d5e5d41a259f0a297eb21766 | # -*- coding:utf-8 -*-
"""
Author:
Weichen Shen,wcshen1994@163.com
Reference:
[1] Lian J, Zhou X, Zhang F, et al. xDeepFM: Combining Explicit and Implicit Feature Interactions for Recommender Systems[J]. arXiv preprint arXiv:1803.05170, 2018.(https://arxiv.org/pdf/1803.05170.pdf)
"""
import tensorflow as tf
fr... | [
"tensorflow.keras.layers.add",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Flatten",
"tensorflow.keras.models.Model"
] | mdeepctr/models/xdeepfm.py | [(74, 'tensorflow.keras.models.Model', 'tf.keras.models.Model', ([], {'inputs': 'inputs_list', 'outputs': 'output'}), True, 'import tensorflow as tf\n'), (50, 'tensorflow.keras.layers.Flatten', 'tf.keras.layers.Flatten', ([], {}), True, 'import tensorflow as tf\n'), (48, 'tensorflow.keras.layers.Dense', 'tf.keras.layer... |
sagnik1511/U-Net-Lowered-with-keras | 364336b244ece288a52cf76df451501a665e745a | # -*- coding: utf-8 -*-
"""
UNET LOwered Model :
This customized UNet Model has been generated lowering the filters to their 25% .
"""
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
from tensorflow.keras.layers import Input , Conv2D , MaxPooling2D , D... | [
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.UpSampling2D",
"tensorflow.keras.layers.concatenate",
"tensorflow.keras.Model",
"tensorflow.keras.backend.clear_session",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.layers.Input"
] | code/UNET_lowered.py | [(20, 'tensorflow.keras.backend.clear_session', 'keras.backend.clear_session', ([], {}), False, 'from tensorflow import keras\n'), (21, 'tensorflow.keras.layers.Input', 'Input', (['input_shape'], {}), False, 'from tensorflow.keras.layers import Input, Conv2D, MaxPooling2D, Dropout, concatenate, UpSampling2D\n'), (44, '... |
PIN-devel/inside-kids | 554e4a0a5654c9a0f5237b904bb2ca6db88a55cb | # -*- coding: utf-8 -*-
# Copyright 2020 The FastSpeech Authors, The HuggingFace Inc. team and Minh Nguyen (@dathudeptrai)
#
# 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.a... | [
"tensorflow.keras.layers.LayerNormalization",
"tensorflow.convert_to_tensor",
"tensorflow.concat",
"numpy.sqrt",
"tensorflow.zeros",
"tensorflow.reduce_sum",
"tensorflow.cast",
"tensorflow.keras.Sequential",
"tensorflow.pad",
"numpy.sin",
"tensorflow.gather",
"tensorflow.math.softplus",
"ten... | contents/tts/content/TensorflowTTS/tensorflow_tts/models/fastspeech.py | [(31, 'tensorflow.keras.initializers.TruncatedNormal', 'tf.keras.initializers.TruncatedNormal', ([], {'stddev': 'initializer_range'}), True, 'import tensorflow as tf\n'), (56, 'tensorflow.keras.layers.Activation', 'tf.keras.layers.Activation', (['"""linear"""'], {}), True, 'import tensorflow as tf\n'), (57, 'tensorflow... |
zcdzcdzcd/models | a31b526a7617a152a138a865b5689bf5b59f655d | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.convert_to_tensor",
"tensorflow.keras.callbacks.ModelCheckpoint",
"tensorflow.compat.v1.enable_v2_behavior",
"tensorflow.train.latest_checkpoint",
"tensorflow.range",
"tensorflow.io.gfile.exists",
"tensorflow.train.Checkpoint",
"tensorflow.compat.v2.keras.mixed_precision.experimental.Polic... | official/transformer/v2/transformer_main.py | [(75, 'tempfile.NamedTemporaryFile', 'tempfile.NamedTemporaryFile', ([], {'delete': '(False)'}), False, 'import tempfile\n'), (78, 'official.transformer.v2.translate.translate_file', 'translate.translate_file', (['model', 'params', 'subtokenizer', 'bleu_source'], {'output_file': 'tmp_filename', 'print_all_translations'... |
OlegBezverhii/python-notebooks | 5d4b501173a2f3519bff9a085c3d2190ce6cf808 | import os
from PIL import Image
import numpy as np
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.layers import AveragePooling2D
from tensorflow.keras.layers import Flatten
from tensorflow.keras.layers import Dense
from tensorflow.keras.models import mod... | [
"tensorflow.keras.layers.AveragePooling2D",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.models.model_from_json",
"tensorflow.keras.models.Sequential",
"tensorflow.keras.layers.Flatten"
] | webcams/eye_status.py | [(19, 'keras.preprocessing.image.ImageDataGenerator', 'ImageDataGenerator', ([], {'rescale': '(1.0 / 255)', 'shear_range': '(0.2)', 'horizontal_flip': '(True)'}), False, 'from keras.preprocessing.image import ImageDataGenerator\n'), (25, 'keras.preprocessing.image.ImageDataGenerator', 'ImageDataGenerator', ([], {'resca... |
LimJiaJing/Cam2BEV | 8177e13f7a3662daee28cce62f35b85f500941c0 | # ==============================================================================
# MIT License
#
# Copyright 2020 Institute for Automotive Engineering of RWTH Aachen University.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "S... | [
"tensorflow.keras.layers.Concatenate",
"tensorflow.keras.layers.Activation",
"tensorflow.keras.models.Model",
"tensorflow.keras.layers.Conv2DTranspose",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.BatchNormalization",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.layers.MaxPoolin... | model/architecture/uNetXST.py | [(158, 'tensorflow.keras.models.Model', 'Model', (['inputs', 'prediction'], {}), False, 'from tensorflow.keras.models import Model\n'), (140, 'tensorflow.keras.layers.Input', 'Input', (['input_shape'], {}), False, 'from tensorflow.keras.layers import Input\n'), (155, 'tensorflow.keras.layers.Conv2D', 'Conv2D', ([], {'f... |
HwangDongJun/Federated_Learning_using_Websockets | 87c2873ae9b6a651750d08f4cd0ad5757893ce88 | # Setup library
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import numpy as np
import PIL.Image as Image
from PIL import ImageFile
import tensorflow as tf
import tensorflow_hub as hub
from tensorflow.keras import layers
import matplotlib.pylab as plt
import efficientnet... | [
"tensorflow.keras.models.load_model",
"tensorflow.config.experimental.list_logical_devices",
"tensorflow.keras.preprocessing.image.ImageDataGenerator",
"tensorflow.config.experimental.set_memory_growth",
"tensorflow.keras.layers.Dense",
"tensorflow.config.experimental.list_physical_devices",
"tensorflow... | federated_learning_without_transfer_learning/ntf_client_fit_model.py | [(17, 'tensorflow.config.experimental.list_physical_devices', 'tf.config.experimental.list_physical_devices', (['"""GPU"""'], {}), True, 'import tensorflow as tf\n'), (22, 'tensorflow.config.experimental.list_logical_devices', 'tf.config.experimental.list_logical_devices', (['"""GPU"""'], {}), True, 'import tensorflow ... |
alshedivat/federated | fe9f44a504bc51b603a3ab9a181148da0aa9612f | # Copyright 2021, Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | [
"tensorflow.keras.losses.SparseCategoricalCrossentropy"
] | fedopt_guide/stackoverflow_transformer/centralized_main.py | [(79, 'utils.datasets.stackoverflow_word_prediction.get_centralized_datasets', 'stackoverflow_word_prediction.get_centralized_datasets', (['vocab_size', 'sequence_length'], {'train_batch_size': 'batch_size', 'num_validation_examples': 'num_validation_examples', 'num_oov_buckets': 'num_oov_buckets'}), False, 'from utils... |
sssssch/jupyter-examples | cf9e26e22dcfa263bcd26323527911cdbcc2cd61 | # -*- coding: utf-8 -*-
"""
Alibaba_Realworld_predict.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/17d_0_LfRIh4WL-lFXY9WfNtudc6hFkjW
"""
from math import sqrt
import tensorflow as tf
import pandas as pd
from tensorflow.keras import Sequential... | [
"matplotlib.pyplot.legend",
"pandas.concat",
"pandas.read_csv",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv1D",
"tensorflow.keras.Sequential",
"pandas.DataFrame",
"matplotlib.pyplot.plot",
"tensorflow.keras.layers.GRU",
"tensorflow.keras.loss... | Project_Alibaba_workload/E50_Alibaba_cluster_predict_compare/Train_20000/Alibaba_Realworld_predict/alibaba_realworld_predict.py | [(52, 'pandas.read_csv', 'pd.read_csv', (['"""Machine_usage_groupby.csv"""'], {}), True, 'import pandas as pd\n'), (60, 'sklearn.preprocessing.MinMaxScaler', 'MinMaxScaler', ([], {'feature_range': '(0, 1)'}), False, 'from sklearn.preprocessing import MinMaxScaler\n'), (83, 'tensorflow.keras.Sequential', 'Sequential', (... |
Forest216/BigDL | 840da9a2eaf395978dd83730b02aa5e5dfbd7989 | #
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | [
"tensorflow.keras.backend.clear_session",
"tensorflow.keras.models.clone_model"
] | python/nano/src/bigdl/nano/automl/tf/objective.py | [(30, 'inspect.ismethod', 'inspect.ismethod', (['model'], {}), False, 'import inspect\n'), (30, 'inspect.isfunction', 'inspect.isfunction', (['model'], {}), False, 'import inspect\n'), (79, 'copy.copy', 'copy.copy', (['self.kwargs'], {}), False, 'import copy\n'), (105, 'tensorflow.keras.backend.clear_session', 'clear_s... |
mahnooranjum/Python_Programming | ba251e0e855842112efeb968d06458c60eaf1bd3 | '''
Author: Mahnoor Anjum
Description:
Autocolorization
Model:
neighboring pixels
L + HAARS ----> A, B
Data preprocessed by:
https://github.com/Abdullah230
'''
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import tensorflow... | [
"matplotlib.pyplot.legend",
"pandas.read_csv",
"tensorflow.keras.models.Model",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.optimizers.RMSprop",
"matplotlib.pyplot.plot",
"numpy.concatenate",
"tensorflow.keras.layers.Dropout",
"sklearn.preprocessing.StandardScaler",
"tensorflow.keras.callba... | Research_Autocolorization/m15_llandmarks2ab.py | [(20, 'pandas.read_csv', 'pd.read_csv', (['"""data/M15/m.csv"""'], {}), True, 'import pandas as pd\n'), (27, 'pandas.read_csv', 'pd.read_csv', (['"""data/M15/test.csv"""'], {}), True, 'import pandas as pd\n'), (42, 'sklearn.preprocessing.StandardScaler', 'StandardScaler', ([], {}), False, 'from sklearn.preprocessing im... |
jtchilders/deephyper | 06f9653599757a69fa5720820f4de3a1f154b081 | from collections.abc import Iterable
from functools import reduce
import networkx as nx
from tensorflow import keras
from tensorflow.python.keras.utils.vis_utils import model_to_dot
from deephyper.core.exceptions.nas.space import (InputShapeOfWrongType,
NodeAlreadyAdde... | [
"tensorflow.python.keras.utils.vis_utils.model_to_dot",
"tensorflow.keras.Model",
"tensorflow.keras.layers.Input"
] | deephyper/search/nas/model/space/keras_search_space.py | [(87, 'networkx.algorithms.dag.dag_longest_path', 'nx.algorithms.dag.dag_longest_path', (['nx_graph'], {}), True, 'import networkx as nx\n'), (143, 'tensorflow.keras.Model', 'keras.Model', ([], {'inputs': 'input_tensors', 'outputs': 'output_tensor'}), False, 'from tensorflow import keras\n'), (145, 'tensorflow.keras.Mo... |
yage99/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.python.keras.keras_parameterized.run_all_keras_modes",
"tensorflow.python.keras.layers.preprocessing.normalization.Normalization",
"numpy.ones",
"tensorflow.python.keras.layers.preprocessing.image_preprocessing.CenterCrop",
"tensorflow.python.platform.test.main",
"tensorflow.python.keras.layer... | tensorflow/python/keras/layers/preprocessing/preprocessing_stage_test.py | [(36, 'tensorflow.python.keras.keras_parameterized.run_all_keras_modes', 'keras_parameterized.run_all_keras_modes', ([], {'always_skip_v1': '(True)'}), False, 'from tensorflow.python.keras import keras_parameterized\n'), (105, 'tensorflow.python.platform.test.main', 'test.main', ([], {}), False, 'from tensorflow.python... |
abhi526691/Covid-Guard | 9c050ef44201c01f512169ffb146ad0da5278ec1 | # import the necessary packages
from tensorflow.keras.preprocessing.image import img_to_array
from tensorflow.keras.applications.mobilenet_v2 import preprocess_input
from tensorflow.keras.models import load_model
from imutils.video import VideoStream,FileVideoStream
import imutils
import numpy as np
import time
... | [
"tensorflow.keras.models.load_model",
"numpy.random.seed",
"tensorflow.keras.applications.mobilenet_v2.preprocess_input",
"numpy.ones",
"numpy.argmax",
"numpy.array",
"tensorflow.keras.preprocessing.image.img_to_array"
] | main.py | [(23, 'numpy.random.seed', 'np.random.seed', (['(42)'], {}), True, 'import numpy as np\n'), (30, 'cv2.dnn.readNetFromDarknet', 'cv2.dnn.readNetFromDarknet', (['configPath', 'weightsPath'], {}), False, 'import cv2\n'), (32, 'cv2.VideoCapture', 'cv2.VideoCapture', (['(0)'], {}), False, 'import cv2\n'), (106, 'os.getcwd',... |
MohammadWasil/Self-Driving-Car | 9ef5b77e1268623c11e4c39d5c8e1e990caee273 |
import pandas as p
import cv2
from sklearn import model_selection
import tensorflow as tf
from tensorflow.keras.models import Sequential#, Input
from tensorflow.keras.layers import Dense, Dropout, Flatten
from tensorflow.keras.layers import Lambda, Conv2D
from tensorflow.keras.optimizers import Adam
from te... | [
"tensorflow.keras.callbacks.ModelCheckpoint",
"pandas.read_csv",
"numpy.expand_dims",
"tensorflow.keras.models.Sequential",
"tensorflow.keras.layers.Lambda",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"sklearn.model_selection.train_test_split",
"tensorflow.keras.optimizers.Ad... | Self Driving Car/Python with Tensorflow/CNN_Model.py | [(19, 'numpy.zeros', 'np.zeros', (['(4536, 66, 200, 3)'], {}), True, 'import numpy as np\n'), (23, 'pandas.read_csv', 'p.read_csv', (['URL'], {}), True, 'import pandas as p\n'), (92, 'sklearn.model_selection.train_test_split', 'model_selection.train_test_split', (['image_input_array2', 'steering_Angle'], {'test_size': ... |
ColdFrenzy/Adaptive_Learning | 02cdd519a7e224fe5f2a49b0c21baa3dac5ce0e1 | import tensorflow as tf
def dense_model(in_shape, hidden_layer_shapes, num_outputs, name):
x = None
inputs = tf.keras.layers.Input(shape=(in_shape,), name="observations")
for i,layer_shape in enumerate(hidden_layer_shapes):
x = tf.keras.layers.Dense(
layer_shape, name="dense_" + str(i)... | [
"tensorflow.keras.layers.ReLU",
"tensorflow.keras.Input",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.utils.plot_model",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.Model",
"tensorflow.keras.layers.BatchNormalization",
"tensorflow.keras.layers.Add",
"tensorflow.keras.layers.Flatten",
... | models/custom_models.py | [(6, 'tensorflow.keras.layers.Input', 'tf.keras.layers.Input', ([], {'shape': '(in_shape,)', 'name': '"""observations"""'}), True, 'import tensorflow as tf\n'), (15, 'tensorflow.keras.Model', 'tf.keras.Model', (['inputs', '[out_layer, value_layer]'], {'name': 'name'}), True, 'import tensorflow as tf\n'), (25, 'tensorfl... |
bfxavier/GamestonkTerminal | b0a685cacaca1f06fc41d8041bcae5492216dc52 | import argparse
import os
from warnings import simplefilter
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from pandas.plotting import register_matplotlib_converters
from TimeSeriesCrossValidation import splitTrain
from sklearn.preprocessing import MinMaxScaler, StandardScaler
from tensorflow.ke... | [
"matplotlib.pyplot.minorticks_on",
"matplotlib.pyplot.plot",
"sklearn.preprocessing.MinMaxScaler",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.layers.SimpleRNN",
"numpy.reshape",
"pandas.plotting.register_matplotlib_converters",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.vlines",
"tenso... | gamestonk_terminal/prediction_techniques/neural_networks.py | [(23, 'pandas.plotting.register_matplotlib_converters', 'register_matplotlib_converters', ([], {}), False, 'from pandas.plotting import register_matplotlib_converters\n'), (27, 'warnings.simplefilter', 'simplefilter', ([], {'action': '"""ignore"""', 'category': 'FutureWarning'}), False, 'from warnings import simplefilt... |
KhelmholtzR/ProgLearn | f5177c720e53d2f5936272998b94e0746135a3b9 | """
Main Author: Will LeVine
Corresponding Email: levinewill@icloud.com
"""
from tensorflow import keras
import numpy as np
from sklearn.tree import DecisionTreeClassifier
from sklearn.utils.validation import check_array, check_is_fitted, check_X_y
from .base import BaseTransformer
class NeuralClassificationTransfor... | [
"sklearn.utils.validation.check_is_fitted",
"tensorflow.keras.models.clone_model",
"sklearn.utils.validation.check_array",
"numpy.unique",
"tensorflow.keras.models.Model",
"sklearn.tree.DecisionTreeClassifier",
"sklearn.utils.validation.check_X_y",
"tensorflow.keras.callbacks.EarlyStopping",
"tensor... | proglearn/transformers.py | [(70, 'tensorflow.keras.models.clone_model', 'keras.models.clone_model', (['network'], {}), False, 'from tensorflow import keras\n'), (71, 'tensorflow.keras.models.Model', 'keras.models.Model', ([], {'inputs': 'self.network.inputs', 'outputs': 'self.network.layers[euclidean_layer_idx].output'}), False, 'from tensorflow... |
Ankur3107/zenml | 5dc05a833b50ac9cc49e851b9d91255da6016dfd | # Copyright (c) ZenML GmbH 2021. 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:
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | [
"sklearn.linear_model.LogisticRegression",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.datasets.mnist.load_data",
"tensorflow.keras.optimizers.Adam",
"tensorflow.keras.layers.Flatten"
] | examples/functional_api/chapter_4.py | [(35, 'zenml.steps.Output', 'Output', ([], {'X_train': 'np.ndarray', 'y_train': 'np.ndarray', 'X_test': 'np.ndarray', 'y_test': 'np.ndarray'}), False, 'from zenml.steps import BaseStepConfig, Output, step\n'), (49, 'zenml.steps.Output', 'Output', ([], {'X_train_normed': 'np.ndarray', 'X_test_normed': 'np.ndarray'}), Fa... |
ishani-chakraborty/models | 367486482c5fe6fc896868edf9bbde7519deb52d | # Lint as: python3
# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | [
"tensorflow.train.latest_checkpoint",
"tensorflow.train.Checkpoint",
"tensorflow.io.gfile.GFile",
"tensorflow.test.main",
"tensorflow.keras.metrics.SparseCategoricalAccuracy",
"tensorflow.keras.optimizers.SGD"
] | official/nlp/tasks/question_answering_test.py | [(165, 'absl.testing.parameterized.named_parameters', 'parameterized.named_parameters', (["('squad1', False)", "('squad2', True)"], {}), False, 'from absl.testing import parameterized\n'), (188, 'tensorflow.test.main', 'tf.test.main', ([], {}), True, 'import tensorflow as tf\n'), (35, 'official.nlp.configs.encoders.Tra... |
Novixous/Emotion-Trainer | a71d7c6ac3a0686e28ad7ee0b3a5489289ee233d | import numpy as np
import argparse
import matplotlib.pyplot as plt
import cv2
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, Flatten
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.layers import MaxPooling2... | [
"tensorflow.keras.preprocessing.image.ImageDataGenerator",
"tensorflow.keras.layers.Dense",
"numpy.set_printoptions",
"tensorflow.keras.layers.Conv2D",
"matplotlib.pyplot.subplots",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.optimizers.Adam",
"numpy.argmax",
"tensorflow.keras.layers.D... | src/emotions_tpu.py | [(16, 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), False, 'import argparse\n'), (60, 'tensorflow.keras.preprocessing.image.ImageDataGenerator', 'ImageDataGenerator', ([], {'rescale': '(1.0 / 255)', 'brightness_range': '[0.2, 1.5]', 'horizontal_flip': '(True)'}), False, 'from tensorflow.keras.preproce... |
Lufeifeina/models | d7d260d4c690e5163070e21d75df372ab559ea23 | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.io.gfile.isdir",
"tensorflow.constant",
"tensorflow.train.latest_checkpoint",
"tensorflow.shape",
"tensorflow.reduce_any",
"tensorflow.train.Checkpoint",
"tensorflow.keras.regularizers.l2",
"tensorflow.reduce_sum",
"tensorflow.io.gfile.exists",
"tensorflow.cast",
"tensorflow.zeros_li... | official/vision/tasks/maskrcnn.py | [(60, 'official.core.task_factory.register_task_cls', 'task_factory.register_task_cls', (['exp_cfg.MaskRCNNTask'], {}), False, 'from official.core import task_factory\n'), (50, 'tensorflow.constant', 'tf.constant', (['allowed_class_ids'], {'dtype': 'batch_class_ids.dtype'}), True, 'import tensorflow as tf\n'), (56, 'te... |
teo-milea/federated | ce0707a954a531860eb38864b44d7b748fd62aa7 | # Copyright 2019, The TensorFlow Federated Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | [
"tensorflow.convert_to_tensor",
"numpy.asarray",
"tensorflow.ragged.constant",
"tensorflow.keras.layers.InputLayer",
"tensorflow.keras.backend.clear_session",
"tensorflow.keras.optimizers.SGD",
"tensorflow.keras.Input",
"tensorflow.keras.layers.Embedding",
"tensorflow.keras.metrics.MeanSquaredError"... | tensorflow_federated/python/learning/keras_utils_test.py | [(105, 'collections.namedtuple', 'collections.namedtuple', (['"""TestBatch"""', "['x', 'y']"], {}), False, 'import collections\n'), (1242, 'tensorflow_federated.python.core.backends.native.execution_contexts.set_local_python_execution_context', 'execution_contexts.set_local_python_execution_context', ([], {}), False, '... |
wnorris/models | a5e4965d1f4e4b02d51aa344336b6fff53af7c17 | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.io.gfile.isdir",
"tensorflow.train.latest_checkpoint",
"tensorflow.train.Checkpoint",
"tensorflow.keras.regularizers.l2",
"tensorflow.reduce_sum",
"tensorflow.cast",
"tensorflow.keras.losses.Huber",
"tensorflow.one_hot",
"tensorflow.distribute.get_strategy",
"tensorflow.keras.layers.In... | official/vision/tasks/retinanet.py | [(36, 'official.core.task_factory.register_task_cls', 'task_factory.register_task_cls', (['exp_cfg.RetinaNetTask'], {}), False, 'from official.core import task_factory\n'), (48, 'tensorflow.keras.layers.InputSpec', 'tf.keras.layers.InputSpec', ([], {'shape': '([None] + self.task_config.model.input_size)'}), True, 'impo... |
wnorris/models | a5e4965d1f4e4b02d51aa344336b6fff53af7c17 | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.keras.backend.softmax",
"tensorflow.cast",
"tensorflow.keras.utils.register_keras_serializable",
"tensorflow.keras.layers.Dropout",
"tensorflow.reduce_logsumexp"
] | official/projects/edgetpu/nlp/modeling/edgetpu_layers.py | [(84, 'tensorflow.keras.utils.register_keras_serializable', 'tf.keras.utils.register_keras_serializable', ([], {'package': '"""Text"""'}), True, 'import tensorflow as tf\n'), (118, 'tensorflow.keras.utils.register_keras_serializable', 'tf.keras.utils.register_keras_serializable', ([], {'package': '"""Text"""'}), True, ... |
akshit-protonn/models | 38c8c6fe4144c93d6aadd19981c2b90570c29eba | # Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.keras.layers.Input",
"tensorflow.keras.mixed_precision.set_global_policy",
"tensorflow.keras.Input",
"tensorflow.keras.utils.get_registered_name",
"tensorflow.test.main",
"tensorflow.keras.utils.register_keras_serializable",
"tensorflow.keras.Model",
"tensorflow.keras.initializers.Truncate... | official/nlp/modeling/networks/encoder_scaffold_test.py | [(31, 'tensorflow.keras.utils.register_keras_serializable', 'tf.keras.utils.register_keras_serializable', ([], {'package': '"""TestOnly"""'}), True, 'import tensorflow as tf\n'), (50, 'tensorflow.keras.utils.register_keras_serializable', 'tf.keras.utils.register_keras_serializable', ([], {'package': '"""TestLayerOnly""... |
akshit-protonn/models | 38c8c6fe4144c93d6aadd19981c2b90570c29eba | # Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.identity",
"tensorflow.keras.utils.register_keras_serializable",
"tensorflow.keras.backend.image_data_format",
"tensorflow.keras.Input"
] | official/vision/beta/modeling/backbones/efficientnet.py | [(95, 'tensorflow.keras.utils.register_keras_serializable', 'tf.keras.utils.register_keras_serializable', ([], {'package': '"""Vision"""'}), True, 'import tensorflow as tf\n'), (297, 'official.vision.beta.modeling.backbones.factory.register_backbone_builder', 'factory.register_backbone_builder', (['"""efficientnet"""']... |
KiryanovKD/models | e17080247e3c9b3301680f61b8f4815c22509e7e | # Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.nn.l2_normalize",
"tensorflow.keras.regularizers.l2",
"tensorflow.cast",
"tensorflow.reduce_all",
"tensorflow.keras.losses.binary_crossentropy",
"tensorflow.clip_by_global_norm",
"tensorflow.add_n",
"tensorflow.distribute.get_strategy",
"tensorflow.keras.layers.InputSpec",
"tensorflow.... | official/projects/yt8m/tasks/yt8m_task.py | [(30, 'official.core.task_factory.register_task_cls', 'task_factory.register_task_cls', (['yt8m_cfg.YT8MTask'], {}), False, 'from official.core import task_factory\n'), (40, 'tensorflow.keras.layers.InputSpec', 'tf.keras.layers.InputSpec', ([], {'shape': '([None] + common_input_shape)'}), True, 'import tensorflow as tf... |
AdamWang00/yolov3-tf2 | 956ebe38d3a90de585444b33fa1c01259434f701 | from absl import app, flags, logging
from absl.flags import FLAGS
import tensorflow as tf
import numpy as np
import cv2
from tensorflow.keras.callbacks import (
ReduceLROnPlateau,
EarlyStopping,
ModelCheckpoint,
TensorBoard
)
from yolov3_tf2.models import (
YoloV3, YoloV3Tiny, YoloLoss,
yolo_an... | [
"tensorflow.keras.callbacks.ModelCheckpoint",
"tensorflow.config.experimental.set_memory_growth",
"tensorflow.reduce_sum",
"tensorflow.config.experimental.list_physical_devices",
"tensorflow.keras.callbacks.ReduceLROnPlateau",
"tensorflow.keras.optimizers.Adam",
"tensorflow.keras.callbacks.TensorBoard",... | train.py | [(21, 'absl.flags.DEFINE_string', 'flags.DEFINE_string', (['"""dataset"""', '""""""', '"""path to dataset"""'], {}), False, 'from absl import app, flags, logging\n'), (22, 'absl.flags.DEFINE_string', 'flags.DEFINE_string', (['"""val_dataset"""', '""""""', '"""path to validation dataset"""'], {}), False, 'from absl impo... |
Jet132/keras-tuner | be682573c6f6be1e3f3e6dcac786a34ccac19d3b | # Copyright 2019 The KerasTuner Authors
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | [
"tensorflow.keras.layers.Dense",
"tensorflow.keras.Sequential",
"numpy.ones"
] | keras_tuner/tuners/randomsearch_test.py | [(26, 'tensorflow.keras.Sequential', 'tf.keras.Sequential', ([], {}), True, 'import tensorflow as tf\n'), (52, 'numpy.ones', 'np.ones', (['(10, 10)'], {}), True, 'import numpy as np\n'), (52, 'numpy.ones', 'np.ones', (['(10, 1)'], {}), True, 'import numpy as np\n'), (33, 'tensorflow.keras.layers.Dense', 'tf.keras.layer... |
shamim-hussain/egt | 02187de16fcd672b8070191d29e9c9e7f681eb37 | import tensorflow as tf
from tensorflow.keras import (optimizers, losses, metrics)
from tqdm import tqdm
import numpy as np
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score
import os
from lib.base.dotdict import HDict
from lib.data.datasets.tsp import SVDDataset
from lib.models.tsp.d... | [
"sklearn.metrics.recall_score",
"tensorflow.concat",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"sklearn.metrics.precision_score",
"numpy.concatenate",
"tensorflow.py_function",
"sklearn.metrics.f1_score",
"tensorflow.keras.metrics.SparseCategoricalCrossentropy",
"sklearn.metrics.accur... | lib/training/schemes/tsp/svd.py | [(41, 'tensorflow.keras.losses.SparseCategoricalCrossentropy', 'losses.SparseCategoricalCrossentropy', ([], {'from_logits': '(True)', 'name': '"""xentropy"""'}), False, 'from tensorflow.keras import optimizers, losses, metrics\n'), (46, 'tensorflow.keras.metrics.SparseCategoricalCrossentropy', 'metrics.SparseCategorica... |
chineseocr/table-detect | 92488f30ffaf486d29791aab63802beeb1eaca32 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 9 23:11:51 2020
table line detect
@author: chineseocr
"""
from tensorflow.keras.layers import Input, concatenate, Conv2D, MaxPooling2D, BatchNormalization, UpSampling2D
from tensorflow.keras.layers import LeakyReLU
from tensorflow.keras.models impor... | [
"tensorflow.keras.layers.LeakyReLU",
"tensorflow.keras.models.Model",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.UpSampling2D",
"tensorflow.keras.layers.concatenate",
"tensorflow.keras.layers.BatchNormalization",
"numpy.array",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.kera... | table_line.py | [(15, 'tensorflow.keras.layers.Input', 'Input', ([], {'shape': 'input_shape'}), False, 'from tensorflow.keras.layers import Input, concatenate, Conv2D, MaxPooling2D, BatchNormalization, UpSampling2D\n'), (82, 'tensorflow.keras.layers.concatenate', 'concatenate', (['[down4, up4]'], {'axis': '(3)'}), False, 'from tensorf... |
jizhouh/deepcell-tf | 491ece59f5024d73429477ebdcb437a6e67d766b | # Copyright 2016-2021 The Van Valen Lab at the California Institute of
# Technology (Caltech), with support from the Paul Allen Family Foundation,
# Google, & National Institutes of Health (NIH) under Grant U24CA224309-01.
# All rights reserved.
#
# Licensed under a modified Apache License, Version 2.0 (the "License");... | [
"tensorflow.python.framework.test_util.generate_combinations_with_testcase_name",
"tensorflow.keras.backend.set_image_data_format",
"tensorflow.python.platform.test.main",
"tensorflow.keras.layers.Input"
] | deepcell/utils/backbone_utils_test.py | [(139, 'tensorflow.python.platform.test.main', 'test.main', ([], {}), False, 'from tensorflow.python.platform import test\n'), (57, 'tensorflow.keras.layers.Input', 'Input', ([], {'shape': 'input_shape'}), False, 'from tensorflow.keras.layers import Input\n'), (79, 'tensorflow.keras.layers.Input', 'Input', ([], {'shape... |
jizhouh/deepcell-tf | 491ece59f5024d73429477ebdcb437a6e67d766b | # Copyright 2016-2021 The Van Valen Lab at the California Institute of
# Technology (Caltech), with support from the Paul Allen Family Foundation,
# Google, & National Institutes of Health (NIH) under Grant U24CA224309-01.
# All rights reserved.
#
# Licensed under a modified Apache License, Version 2.0 (the "License");... | [
"tensorflow.python.framework.tensor_shape.TensorShape",
"tensorflow.keras.backend.permute_dimensions",
"tensorflow.keras.backend.max",
"tensorflow.get_logger",
"tensorflow.keras.backend.shape",
"tensorflow.keras.backend.expand_dims",
"tensorflow.python.keras.utils.conv_utils.normalize_data_format",
"t... | deepcell/layers/location.py | [(39, 'tensorflow.get_logger', 'tf.get_logger', ([], {}), True, 'import tensorflow as tf\n'), (59, 'tensorflow.python.keras.utils.conv_utils.normalize_data_format', 'conv_utils.normalize_data_format', (['data_format'], {}), False, 'from tensorflow.python.keras.utils import conv_utils\n'), (65, 'tensorflow.python.framew... |
genisplaja/cunet | 58a200c84810f20099265e30200327eefddb3eff | import tensorflow as tf
from tensorflow.keras import backend as K
from tensorflow.keras import Input, Model
from tensorflow.keras.layers import Dense, Conv2D, BatchNormalization, Dropout, Lambda, \
GlobalAveragePooling2D, Activation, MaxPooling2D, AveragePooling2D, \
Concatenate, Add, Multiply, Softmax, Re... | [
"tensorflow.keras.layers.Concatenate",
"tensorflow.keras.layers.GlobalAveragePooling2D",
"tensorflow.keras.Input",
"tensorflow.keras.layers.Lambda",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv1D",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.UpSampling2D",
"tensorflo... | cunet/ftanet/network/ftanet.py | [(77, 'tensorflow.keras.Input', 'Input', ([], {'shape': 'input_shape'}), False, 'from tensorflow.keras import Input, Model\n'), (120, 'tensorflow.keras.Model', 'Model', ([], {'inputs': 'visible', 'outputs': 'x'}), False, 'from tensorflow.keras import Input, Model\n'), (19, 'tensorflow.keras.layers.GlobalAveragePooling2... |
bryanblackbee/topic__deep-learning-python | 6d916cee3457a886f3bffc7a5dd97a4d627b3c23 | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from tensorflow.keras.backend import clear_session
from tensorflow.keras.optimizers import RMSprop
from tensorflow.keras.preprocessing import sequence
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import (Flatten, Dens... | [
"tensorflow.keras.callbacks.ModelCheckpoint",
"pandas.read_csv",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.optimizers.RMSprop",
"pandas.DataFrame",
"tensorflow.keras.layers.GRU",
"tensorflow.keras.backend.clear_session",
"tensorflow.keras.callbacks.EarlyStopping",
"tensorflow.keras.models.S... | chap06/weather_modelv4_stacked_rnn_with_dropout.py | [(75, 'tensorflow.keras.backend.clear_session', 'clear_session', ([], {}), False, 'from tensorflow.keras.backend import clear_session\n'), (76, 'tensorflow.keras.models.Sequential', 'Sequential', ([], {}), False, 'from tensorflow.keras.models import Sequential\n'), (101, 'pandas.DataFrame', 'pd.DataFrame', (['history4.... |
ackness/GazeFlow | ca6b7d548571f85af84bdec77292758ab5d36449 | #!/usr/bin/env python3
import tensorflow as tf
from layers.spectral_normalization import SpectralNormalization
class SpadeBN(tf.keras.layers.Layer):
"""SPADE BatchNormalization
Sources:
https://towardsdatascience.com/implementing-spade-using-fastai-6ad86b94030a
"""
def __init__(self, widt... | [
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.experimental.SyncBatchNormalization"
] | layers/spadebn.py | [(17, 'tensorflow.keras.layers.experimental.SyncBatchNormalization', 'tf.keras.layers.experimental.SyncBatchNormalization', ([], {}), True, 'import tensorflow as tf\n'), (19, 'tensorflow.keras.layers.Conv2D', 'tf.keras.layers.Conv2D', (['width'], {'kernel_size': 'kernel_size', 'activation': '"""relu"""'}), True, 'impor... |
RaphaelMeudec/tf-explain | 1a75841762985e55abe19107d09279f68f5731c8 | import numpy as np
import tensorflow as tf
import tf_explain
INPUT_SHAPE = (28, 28, 1)
NUM_CLASSES = 10
AVAILABLE_DATASETS = {
'mnist': tf.keras.datasets.mnist,
'fashion_mnist': tf.keras.datasets.fashion_mnist,
}
DATASET_NAME = 'fashion_mnist' # Choose between "mnist" and "fashion_mnist"
# Load dataset
data... | [
"tensorflow.keras.Input",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.MaxPool2D",
"tensorflow.keras.Model",
"tensorflow.keras.layers.Dropout",
"numpy.array",
"tensorflow.keras.layers.Flatten",
"tensorflow.keras.utils.to_categorical"
] | examples/callbacks/mnist.py | [(23, 'tensorflow.keras.utils.to_categorical', 'tf.keras.utils.to_categorical', (['train_labels'], {'num_classes': 'NUM_CLASSES'}), True, 'import tensorflow as tf\n'), (24, 'tensorflow.keras.utils.to_categorical', 'tf.keras.utils.to_categorical', (['test_labels'], {'num_classes': 'NUM_CLASSES'}), True, 'import tensorfl... |
xbodx/DeepPavlov | 4b60bf162df4294b8b0db3b72786cdd699c674fa | # Copyright 2017 Neural Networks and Deep Learning lab, MIPT
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
"tensorflow.keras.backend.sigmoid",
"tensorflow.keras.activations.get",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.backend.bias_add",
"tensorflow.keras.backend.softmax",
"tensorflow.keras.layers.Lambda",
"tensorflow.keras.initializers.Constant",
"tensorflow.keras.backend.dot",
"tensorflow.... | deeppavlov/models/morpho_tagger/cells.py | [(179, 'tensorflow.keras.backend.log', 'K.log', (['(1.0 + position_inputs)'], {}), True, 'import tensorflow.keras.backend as K\n'), (28, 'tensorflow.keras.activations.get', 'tf.keras.activations.get', (['activation'], {}), True, 'import tensorflow as tf\n'), (46, 'tensorflow.keras.layers.InputSpec', 'InputSpec', ([], {... |
inacioMattos/DeepLearning-Cachorros-e-Gatos | a1eb42308f820809b7239cca6e81c4e880f5f540 | import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten, Conv2D, MaxPooling2D
from tensorflow.keras.callbacks import TensorBoard
import pickle, os, time
DATADIR="data/"
NAME="cachorros-gatos-cnn-128-128-128-{}".format(int(time.time... | [
"tensorflow.keras.layers.Activation",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.ConfigProto",
"tensorflow.GPUOptions",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.models.Sequential",
"tensorflow.keras.layers.Flatten"
] | src/backend/model.py | [(14, 'tensorflow.GPUOptions', 'tf.GPUOptions', ([], {'per_process_gpu_memory_fraction': '(0.4)'}), True, 'import tensorflow as tf\n'), (42, 'tensorflow.keras.models.Sequential', 'Sequential', ([], {}), False, 'from tensorflow.keras.models import Sequential\n'), (9, 'time.time', 'time.time', ([], {}), False, 'import pi... |
atlas-calo-ml/GraphNets4Pions_LLNL | fb25259124711526cc4110461f09db1d03a669f9 | import numpy as np
import os
import sys
import glob
import uproot as ur
import matplotlib.pyplot as plt
import time
import seaborn as sns
import tensorflow as tf
from graph_nets import utils_np
from graph_nets import utils_tf
from graph_nets.graphs import GraphsTuple
import sonnet as snt
import argparse
import yaml
imp... | [
"tensorflow.convert_to_tensor",
"numpy.hstack",
"numpy.savez",
"tensorflow.train.latest_checkpoint",
"tensorflow.train.Checkpoint",
"tensorflow.keras.losses.BinaryCrossentropy",
"numpy.concatenate",
"tensorflow.math.sigmoid",
"tensorflow.GradientTape",
"tensorflow.keras.optimizers.Adam",
"numpy.... | train_multiOut_weightedRegress.py | [(21, 'seaborn.set_context', 'sns.set_context', (['"""poster"""'], {}), True, 'import seaborn as sns\n'), (25, 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), False, 'import argparse\n'), (53, 'os.makedirs', 'os.makedirs', (['save_dir'], {'exist_ok': '(True)'}), False, 'import os\n'), (56, 'logging.basi... |
Mohammed-Abbass/DeepEI | 6466556e529afd9ef747105c21cba51cbac890fe | # -*- coding: utf-8 -*-
"""
Created on Thu Jan 9 09:22:42 2020
@author: hcji
"""
import numpy as np
import tensorflow.keras.backend as K
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Dense, Input, Fl... | [
"matplotlib.pyplot.legend",
"sklearn.metrics.r2_score",
"sklearn.metrics.mean_absolute_error",
"matplotlib.pyplot.plot",
"tensorflow.keras.backend.clear_session",
"numpy.load",
"tensorflow.keras.layers.Flatten",
"tensorflow.keras.models.Model",
"numpy.isnan",
"tensorflow.keras.layers.Dense",
"sk... | Retention/multi_cnn.py | [(96, 'smiles_to_onehot.encoding.get_dict', 'get_dict', (['smiles'], {'save_path': '"""DeepEI/data/words.json"""'}), False, 'from smiles_to_onehot.encoding import get_dict, one_hot_coding\n'), (98, 'numpy.array', 'np.array', (['smiles'], {}), True, 'import numpy as np\n'), (23, 'sklearn.model_selection.train_test_split... |
hanranCode/models | 8e5fbdadcf66f90117b448a8acb0ac3259897d55 | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.train.latest_checkpoint",
"tensorflow.executing_eagerly",
"tensorflow.train.Checkpoint",
"tensorflow.io.gfile.GFile",
"tensorflow.keras.metrics.Mean",
"tensorflow.GradientTape"
] | official/bert/model_training_utils.py | [(40, 'os.path.join', 'os.path.join', (['model_dir', 'checkpoint_prefix'], {}), False, 'import os\n'), (42, 'absl.logging.info', 'logging.info', (['"""Saving model as TF checkpoint: %s"""', 'saved_path'], {}), False, 'from absl import logging\n'), (158, 'tensorflow.executing_eagerly', 'tf.executing_eagerly', ([], {}), ... |
juancastillo0/tfjs | a53aae8fd99762ab41a25ac362ece95b4bbb8cf6 | # @license
# Copyright 2020 Google LLC. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | [
"tensorflow.python.saved_model.save.save",
"tensorflow.python.eager.def_function.function",
"tensorflow.python.training.tracking.tracking.AutoTrackable",
"tensorflow.python.ops.variables.Variable",
"tensorflow.python.framework.constant_op.constant"
] | e2e/integration_tests/metadata.py | [(51, 'os.path.join', 'os.path.join', (['curr_dir', '"""metadata"""'], {}), False, 'import os\n'), (50, 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), False, 'import os\n'), (55, 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {}), False, 'import tempfile\n'), (60, 'os.path.join', 'os.path.join', (['_tmp_dir'... |
Noba1anc3/recommenders | fb886881137ca3add05bb0d478a4751207ca5559 | # Copyright 2022 The TensorFlow Recommenders Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | [
"tensorflow.keras.layers.Dense",
"tensorflow.keras.regularizers.get",
"tensorflow.keras.initializers.serialize",
"tensorflow.keras.utils.register_keras_serializable",
"tensorflow.keras.regularizers.serialize",
"tensorflow.keras.initializers.get"
] | tensorflow_recommenders/layers/feature_interaction/dcn.py | [(22, 'tensorflow.keras.utils.register_keras_serializable', 'tf.keras.utils.register_keras_serializable', ([], {}), True, 'import tensorflow as tf\n'), (99, 'tensorflow.keras.initializers.get', 'tf.keras.initializers.get', (['kernel_initializer'], {}), True, 'import tensorflow as tf\n'), (100, 'tensorflow.keras.initial... |
Anon-Artist/tfx | 2692c9ab437d76b5d9517996bfe2596862e0791d | # Lint as: python3
# Copyright 2020 Google LLC. 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | [
"tensorflow.distribute.MirroredStrategy",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.concatenate",
"tensorflow.keras.Model",
"tensorflow.keras.optimizers.Adam",
"tensorflow.keras.callbacks.TensorBoard",
"tensorflow.keras.metrics.SparseCategoricalAccuracy",
"tensorflow.io.parse_example",... | tfx/experimental/templates/penguin/models/model.py | [(104, 'tensorflow.keras.layers.concatenate', 'keras.layers.concatenate', (['inputs'], {}), False, 'from tensorflow import keras\n'), (111, 'tensorflow.keras.Model', 'keras.Model', ([], {'inputs': 'inputs', 'outputs': 'outputs'}), False, 'from tensorflow import keras\n'), (140, 'tensorflow.distribute.MirroredStrategy',... |
leo6033/Graduation-Project | c1cf68edaffc346b37ac6e615d580cd05c4f0711 | """
@Description: TextCNN 网络
@Author: 吕明伟
@Date: 2021-4-6
"""
from tensorflow.keras import Input, Model
from tensorflow.keras.layers import Embedding, Dense, Conv1D, GlobalMaxPooling1D, Concatenate, Dropout
class TextCNN(object):
def __init__(self, maxlen, max_features, embedding_dims,
class_num=5... | [
"tensorflow.keras.layers.Concatenate",
"tensorflow.keras.Input",
"tensorflow.keras.layers.Embedding",
"tensorflow.keras.layers.GlobalMaxPooling1D",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv1D",
"tensorflow.keras.Model"
] | TextCNN.py | [(20, 'tensorflow.keras.Input', 'Input', (['(self.maxlen,)'], {}), False, 'from tensorflow.keras import Input, Model\n'), (30, 'tensorflow.keras.Model', 'Model', ([], {'inputs': 'input', 'outputs': 'output'}), False, 'from tensorflow.keras import Input, Model\n'), (21, 'tensorflow.keras.layers.Embedding', 'Embedding', ... |
GiorgosNikitopoulos/Mine_Vulnerable_Code | e8770698b501a3681b1cf1a978a4cc409d359b3c | # -*- coding: utf-8 -*-
"""
CNN model for text classification implemented in TensorFlow 2.
This implementation is based on the original paper of Yoon Kim [1] for classification using words.
Besides I add charachter level input [2].
# References
- [1] [Convolutional Neural Networks for Sentence Classification](https://... | [
"tensorflow.keras.layers.Activation",
"tensorflow.keras.layers.Average",
"tensorflow.keras.layers.SeparableConv1D",
"tensorflow.keras.layers.Embedding",
"tensorflow.keras.layers.GlobalMaxPooling1D",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.GlobalAveragePooling1D",
"tensorflow.keras.la... | models/cnn_model.py | [(88, 'tensorflow.keras.layers.Input', 'layers.Input', ([], {'shape': '(self.max_seq_length,)', 'dtype': '"""int32"""', 'name': '"""word_input"""'}), False, 'from tensorflow.keras import layers\n'), (114, 'tensorflow.keras.Model', 'tf.keras.Model', ([], {'inputs': 'word_input', 'outputs': 'prediction', 'name': '"""CNN_... |
jaymessina3/model-analysis | 8638ad375d860a97df5938850c59c72b0def995a | # Lint as: python3
# Copyright 2018 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | [
"tensorflow.compat.v1.enable_v2_behavior",
"tensorflow.keras.layers.Lambda",
"tensorflow.keras.models.Model",
"tensorflow.test.main",
"tensorflow.keras.losses.BinaryCrossentropy",
"tensorflow.keras.optimizers.Adam",
"numpy.array",
"tensorflow.keras.layers.Input"
] | tensorflow_model_analysis/writers/metrics_plots_and_validations_writer_test.py | [(1207, 'absl.testing.parameterized.named_parameters', 'parameterized.named_parameters', (['_OUTPUT_FORMAT_PARAMS'], {}), False, 'from absl.testing import parameterized\n'), (1502, 'absl.testing.parameterized.named_parameters', 'parameterized.named_parameters', (['_OUTPUT_FORMAT_PARAMS'], {}), False, 'from absl.testing... |
satheeshxolo/tensorflow | 93082af9e866067d5383ec36c8d840b21d91a9f8 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.python.distribute.values.ReplicaDeviceMap",
"tensorflow.python.distribute.values.LogicalDeviceSpec",
"tensorflow.python.distribute.cross_device_ops.reduce_non_distributed_value",
"tensorflow.python.distribute.distribute_lib.UpdateContext",
"tensorflow.python.distribute.numpy_dataset.SingleDevice... | tensorflow/python/distribute/parameter_server_strategy.py | [(50, 'tensorflow.python.util.tf_export.tf_export', 'tf_export', (['"""distribute.experimental.ParameterServerStrategy"""'], {}), False, 'from tensorflow.python.util.tf_export import tf_export\n'), (101, 'tensorflow.python.distribute.cluster_resolver.TFConfigClusterResolver', 'TFConfigClusterResolver', ([], {}), False,... |
OObasuyi/evidential-deep-learning | 995764dd3a1923ec3b0f35392d2e25e8a6831bd9 | import tensorflow as tf
import tensorflow_probability as tfp
from tensorflow.keras.layers import Conv2D, MaxPooling2D, \
UpSampling2D, Cropping2D, concatenate, ZeroPadding2D, SpatialDropout2D
import functools
def create(input_shape, num_class=1, activation=tf.nn.relu):
opts = locals().copy()
# model = De... | [
"tensorflow.keras.models.Model",
"tensorflow.keras.layers.UpSampling2D",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.concatenate",
"tensorflow.keras.layers.Cropping2D",
"tensorflow.keras.layers.ZeroPadding2D",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.layers.Input"
] | neurips2020/models/depth/bbbp.py | [(15, 'tensorflow.keras.layers.Input', 'tf.keras.layers.Input', ([], {'shape': 'input_shape'}), True, 'import tensorflow as tf\n'), (17, 'functools.partial', 'functools.partial', (['tfp.layers.Convolution2DReparameterization'], {'activation': 'activation', 'padding': '"""same"""'}), False, 'import functools\n'), (41, '... |
ashutom/tensorflow-upstream | 3457a2b122e50b4d44ceaaed5a663d635e5c22df | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.python.keras.benchmarks.benchmark_util.generate_benchmark_params_cpu_gpu",
"tensorflow.reduce_mean",
"tensorflow.keras.layers.Conv2D",
"tensorflow.ones",
"tensorflow.test.main",
"numpy.ones",
"tensorflow.function",
"tensorflow.keras.layers.LSTM",
"numpy.random.randint",
"tensorflow.ker... | tensorflow/python/keras/benchmarks/layer_benchmarks/layer_benchmarks_test.py | [(212, 'tensorflow.python.keras.benchmarks.benchmark_util.generate_benchmark_params_cpu_gpu', 'benchmark_util.generate_benchmark_params_cpu_gpu', (['(CORE_LAYERS + CONV_LAYERS + RECURRENT_LAYERS + NORMALIZATION_LAYERS +\n REGULARIZATION_LAYERS + ATTENSION_LAYERS + POOLING_LAYERS)'], {}), False, 'from tensorflow.pyth... |
ashutom/tensorflow-upstream | 3457a2b122e50b4d44ceaaed5a663d635e5c22df | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.python.keras.applications.imagenet_utils.decode_predictions",
"tensorflow.python.keras.backend.image_data_format",
"tensorflow.python.keras.utils.data_utils.get_file",
"tensorflow.python.keras.layers.VersionAwareLayers",
"tensorflow.python.util.tf_export.keras_export",
"tensorflow.python.keras... | tensorflow/python/keras/applications/vgg19.py | [(39, 'tensorflow.python.keras.layers.VersionAwareLayers', 'VersionAwareLayers', ([], {}), False, 'from tensorflow.python.keras.layers import VersionAwareLayers\n'), (42, 'tensorflow.python.util.tf_export.keras_export', 'keras_export', (['"""keras.applications.vgg19.VGG19"""', '"""keras.applications.VGG19"""'], {}), Fa... |
KristianHolsheimer/keras-gym | 0296ddcc8685e1ce732c3173caaa0fd25af9ef58 | import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import backend as K
from ..utils import (
check_numpy_array, check_tensor, is_vfunction, is_qfunction, is_policy)
from ..base.mixins import ActionSpaceMixin
from ..base.errors import ActionSpaceError
from ..policies.base import BasePolicy
... | [
"tensorflow.keras.layers.Concatenate",
"tensorflow.keras.Input",
"tensorflow.keras.backend.min",
"tensorflow.keras.Model",
"tensorflow.keras.backend.squeeze",
"tensorflow.einsum",
"tensorflow.keras.backend.stop_gradient",
"tensorflow.keras.backend.mean"
] | keras_gym/core/actor_critic.py | [(387, 'tensorflow.keras.Input', 'keras.Input', ([], {'name': '"""G"""', 'shape': '(1,)', 'dtype': '"""float"""'}), False, 'from tensorflow import keras\n'), (391, 'tensorflow.keras.backend.stop_gradient', 'K.stop_gradient', (['(G - V)'], {}), True, 'from tensorflow.keras import backend as K\n'), (401, 'tensorflow.kera... |
GranScudetto/TensorflowExamples | 25e0f0f973febc8997b75eb512c22d2e85b0788a | """
Separated File containing all different models implemented
Creation Date: May 2020
Creator: GranScudetto
"""
from tensorflow.keras.layers import Input, Conv2D, BatchNormalization, Activation, Dense
from tensorflow.keras.layers import MaxPool2D, Concatenate, Flatten
from tensorflow.keras import Model
def model_1(... | [
"tensorflow.keras.layers.Concatenate",
"tensorflow.keras.layers.Activation",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.MaxPool2D",
"tensorflow.keras.Model",
"tensorflow.keras.layers.BatchNormalization",
"tensorflow.keras.layers.Flatten",
"tensorflow.... | classification/cifar10/cifar_models.py | [(14, 'tensorflow.keras.layers.Input', 'Input', ([], {'shape': 'input_shape'}), False, 'from tensorflow.keras.layers import Input, Conv2D, BatchNormalization, Activation, Dense\n'), (32, 'tensorflow.keras.Model', 'Model', ([], {'inputs': 'inp', 'outputs': 'out'}), False, 'from tensorflow.keras import Model\n'), (38, 't... |
houcharlie/federated-legacy | cb10a9cdcea33288f8113e7445782d21c8c65f81 | # Copyright 2019, The TensorFlow Federated Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | [
"tensorflow.keras.metrics.Recall",
"tensorflow.keras.metrics.Precision"
] | tensorflow_federated/python/research/optimization/stackoverflow_lr/run_federated.py | [(32, 'tensorflow_federated.python.research.utils.utils_impl.record_hparam_flags', 'utils_impl.record_hparam_flags', ([], {}), False, 'from tensorflow_federated.python.research.utils import utils_impl\n'), (34, 'absl.flags.DEFINE_integer', 'flags.DEFINE_integer', (['"""vocab_tokens_size"""', '(10000)', '"""Vocab tokens... |
mattpoggi/SistemiDigitaliM20-21 | 202e520a571a2bb961851763f37e9293c3af400d | from pathlib import Path
import os
from PIL import Image
from tensorflow.python.keras.layers import Conv2D, BatchNormalization, Activation
import logging
logging.getLogger("tensorflow").setLevel(logging.ERROR)
import tensorflow as tf
tf.get_logger().setLevel('ERROR')
import numpy as np
from tensorflow.python.keras.mod... | [
"tensorflow.convert_to_tensor",
"tensorflow.python.keras.layers.BatchNormalization",
"tensorflow.compat.v1.ConfigProto",
"tensorflow.python.keras.layers.Activation",
"numpy.min",
"numpy.squeeze",
"tensorflow.get_logger",
"numpy.max",
"tensorflow.python.keras.models.Model",
"tensorflow.python.keras... | Mengascini-Spina/Sistemi-Digitali-M/Datasets/Utilities/Maps/Noiseprint/noiseprint.py | [(32, 'tensorflow.keras.layers.Input', 'tf.keras.layers.Input', (['[None, None, 1]'], {}), True, 'import tensorflow as tf\n'), (42, 'tensorflow.python.keras.models.Model', 'Model', (['inp', 'model'], {}), False, 'from tensorflow.python.keras.models import Model\n'), (105, 'numpy.min', 'np.min', (['noiseprint[margin:-ma... |
sakibguy/models | 7214e17eb425963ec3d0295be215d5d26deaeb32 | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.ragged.constant",
"tensorflow.cast",
"tensorflow.io.gfile.remove",
"numpy.zeros_like",
"tensorflow.Graph",
"numpy.ones_like",
"tensorflow.io.gfile.GFile",
"tensorflow.test.main",
"tensorflow.saved_model.save",
"numpy.std",
"numpy.zeros",
"tensorflow.estimator.Estimator",
"tensorf... | official/nlp/tools/export_tfhub_lib_test.py | [(66, 'os.path.join', 'os.path.join', (['temp_dir', '"""dummy_file.txt"""'], {}), False, 'import os\n'), (108, 'absl.testing.parameterized.named_parameters', 'parameterized.named_parameters', (["('Bert', True)", "('Albert', False)"], {}), False, 'from absl.testing import parameterized\n'), (282, 'absl.testing.parameter... |
buzem/inzpeech | 9e03b876bb3fd1956774c84683cd02661d650c81 | import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from tensorflow.keras.models import Sequential, Model
from tensorflow.keras.layers import Dense, Input
from tensorflow.keras.layers import Dropout, GlobalMaxPooling2D
from tensorflow.keras.layers import Flatten, Conv2D, MaxPooling2D, ZeroPadding... | [
"tensorflow.keras.layers.AveragePooling1D",
"tensorflow.matmul",
"tensorflow.keras.backend.softmax",
"tensorflow.keras.backend.permute_dimensions",
"tensorflow.keras.models.Model",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.Reshape",
"tensorflow.keras... | models/model_keras_params.py | [(99, 'tensorflow.keras.layers.Input', 'Input', ([], {'shape': '(300, 40, 1)'}), False, 'from tensorflow.keras.layers import Dense, Input\n'), (146, 'tensorflow.keras.models.Model', 'Model', ([], {'inputs': 'inputs', 'outputs': 'output'}), False, 'from tensorflow.keras.models import Sequential, Model\n'), (20, 'tensorf... |
me-grimjoww/Covid-Sutra | ef07bf61ae3b1adc19affe5e040a9ba2f06fb5a8 |
import os
from django.urls import path, include
import face_recognition
import cv2
from imutils.video import VideoStream
import imutils
import numpy as np
from tensorflow.keras.models import load_model
from tensorflow.keras.applications.mobilenet_v2 import preprocess_input
from tensorflow.keras.preprocessin... | [
"tensorflow.keras.models.load_model",
"tensorflow.keras.applications.mobilenet_v2.preprocess_input",
"numpy.array",
"tensorflow.keras.preprocessing.image.img_to_array"
] | Django_mask_attendance/main_base/face_verification.py | [(18, 'cv2.dnn.readNet', 'cv2.dnn.readNet', (['prototxtPath', 'weightsPath'], {}), False, 'import cv2\n'), (21, 'tensorflow.keras.models.load_model', 'load_model', (['"""C:\\\\Users\\\\mkjsr\\\\OneDrive\\\\Desktop\\\\Django_mask_attendance\\\\main_base\\\\mask_detector.model"""'], {}), False, 'from tensorflow.keras.mod... |
monshri/adversarial-robustness-toolbox | 6465240cb6a71bc376dae52459a7133e403df8d2 | """
The script demonstrates a simple example of using ART with Keras. The example train a small model on the MNIST dataset
and creates adversarial examples using the Fast Gradient Sign Method. Here we use the ART classifier to train the model,
it would also be possible to provide a pretrained model to the ART classifie... | [
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.optimizers.Adam",
"numpy.argmax",
"tensorflow.compat.v1.disable_eager_execution",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.models.Sequential",
"tensorflow.keras.layers.Flatten"
] | examples/get_started_keras.py | [(9, 'tensorflow.compat.v1.disable_eager_execution', 'tf.compat.v1.disable_eager_execution', ([], {}), True, 'import tensorflow as tf\n'), (22, 'art.utils.load_mnist', 'load_mnist', ([], {}), False, 'from art.utils import load_mnist\n'), (26, 'tensorflow.keras.models.Sequential', 'Sequential', ([], {}), False, 'from te... |
IBM/oct-glaucoma-vf-estimate | ea79352547f33fe05ee532ab9faad6a5e4811a76 | #!/usr/bin/struture_function1 python
# File: train_tp.py
# Author: Yasmeen George
import tensorflow as tf
#from tensorflow import keras
import argparse
from tensorpack.tfutils.summary import *
from oct_dataflow_tp import *
import tensorflow.contrib.slim as slim
from keras import backend as K
from contextlib import con... | [
"tensorflow.layers.dropout",
"tensorflow.cast",
"tensorflow.nn.sigmoid_cross_entropy_with_logits",
"tensorflow.keras.losses.MAE",
"tensorflow.get_default_graph",
"tensorflow.add_n",
"tensorflow.summary.scalar",
"tensorflow.layers.batch_normalization",
"tensorflow.gradients",
"tensorflow.layers.den... | python_code/train_tp_si.py | [(14, 'tensorflow.trainable_variables', 'tf.trainable_variables', ([], {}), True, 'import tensorflow as tf\n'), (15, 'tensorflow.contrib.slim.model_analyzer.analyze_vars', 'slim.model_analyzer.analyze_vars', (['model_vars'], {'print_info': '(True)'}), True, 'import tensorflow.contrib.slim as slim\n'), (39, 'tensorflow.... |
mamerisawesome/glassmirror | ed6147e73c049931f0118237f2ebb111d471963d | #!/usr/bin/env python
# Darwin Bautista
# HomographyNet, from https://arxiv.org/pdf/1606.03798.pdf
import os.path
from tensorflow.keras.applications import MobileNet
from tensorflow.keras import Model
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.layer... | [
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.InputLayer",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.models.Sequential",
"tensorflow.keras.layers.Flatten"
] | glassmirror/models.py | [(20, 'tensorflow.keras.models.Sequential', 'Sequential', ([], {'name': '"""homographynet"""'}), False, 'from tensorflow.keras.models import Sequential\n'), (21, 'tensorflow.keras.layers.InputLayer', 'InputLayer', (['(120, 120, 3)'], {'name': '"""input_1"""'}), False, 'from tensorflow.keras.layers import InputLayer\n')... |
dkurt/nncf | 1329d9b13cab84e45064a064e59b8f2c7e52d140 | """
Copyright (c) 2022 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... | [
"tensorflow.keras.layers.Concatenate",
"tensorflow.keras.layers.Activation",
"tensorflow.keras.layers.experimental.SyncBatchNormalization",
"tensorflow.keras.backend.softplus",
"tensorflow.keras.layers.ZeroPadding2D",
"tensorflow.keras.layers.Add"
] | examples/tensorflow/common/object_detection/architecture/darknet.py | [(30, 'examples.tensorflow.common.object_detection.architecture.nn_ops.DarknetConv2D', 'nn_ops.DarknetConv2D', (['*args'], {}), False, 'from examples.tensorflow.common.object_detection.architecture import nn_ops\n'), (31, 'tensorflow.keras.layers.experimental.SyncBatchNormalization', 'tf.keras.layers.experimental.SyncB... |
NCcoco/kaggle-project | bff565bcfa8395c87920068557678566631b8d99 | import tensorflow as tf
import tensorflow_hub as hub
import tensorflow.keras as keras
import tensorflow.keras.layers as layers
from PIL import Image
from io import BytesIO
import matplotlib.pyplot as plt
import numpy as np
import requests
import os
import platform
import pathlib
import random
import math
base_path =... | [
"tensorflow.keras.utils.image_dataset_from_directory",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.keras.layers.Dense",
"tensorflow.cast",
"tensorflow.keras.optimizers.schedules.InverseTimeDecay",
"tensorflow.keras.optimizers.Adam",
"tensorflow.image.resize",
"tensorflow.keras... | Bird-Species/transformer/vision-transformer3.py | [(18, 'os.path.abspath', 'os.path.abspath', (['"""."""'], {}), False, 'import os\n'), (31, 'tensorflow.keras.optimizers.schedules.InverseTimeDecay', 'keras.optimizers.schedules.InverseTimeDecay', ([], {'initial_learning_rate': '(0.02)', 'decay_steps': '(100)', 'decay_rate': '(0.7)'}), True, 'import tensorflow.keras as ... |
xiaoyili/elasticdl | 93e58c42eb5e2ef14661469777d0224884d7bf1d | import abc
import numpy as np
import tensorflow as tf
from elasticdl.python.common.constants import DistributionStrategy
from elasticdl.python.common.log_utils import default_logger as logger
from elasticdl.python.common.save_utils import CheckpointSaver
from elasticdl.python.elasticdl.layers.embedding import Embeddi... | [
"tensorflow.keras.models.clone_model",
"tensorflow.keras.layers.Embedding",
"tensorflow.keras.initializers.serialize",
"tensorflow.keras.backend.clear_session",
"numpy.zeros"
] | elasticdl/python/common/model_handler.py | [(16, 'elasticdl.python.common.save_utils.CheckpointSaver.restore_params_from_checkpoint', 'CheckpointSaver.restore_params_from_checkpoint', (['checkpoint_dir', '(0)', '(1)'], {}), False, 'from elasticdl.python.common.save_utils import CheckpointSaver\n'), (42, 'numpy.zeros', 'np.zeros', (['embedding_shape'], {}), True... |
1Stohk1/tami | e0aa902bb767631dd2435ed0eac05209b9bd64ed | from tensorflow.keras import layers
from tensorflow.keras import models
from tensorflow.keras.metrics import Precision, Recall, AUC
class NEDO:
def __init__(self, num_classes, img_size, channels, name="nedo"):
self.name = name
self.num_classes = num_classes
self.input_width_height = img_s... | [
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.metrics.AUC",
"tensorflow.keras.metrics.Precision",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.metrics.Recall",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.models.Sequential",
"tensorflow.ker... | models_code/nedo.py | [(16, 'tensorflow.keras.models.Sequential', 'models.Sequential', ([], {}), False, 'from tensorflow.keras import models\n'), (39, 'tensorflow.keras.models.Sequential', 'models.Sequential', ([], {}), False, 'from tensorflow.keras import models\n'), (17, 'tensorflow.keras.layers.Conv2D', 'layers.Conv2D', (['(64)', '(3, 3)... |
Abdiel-EMT/segnet | 474a68079000a85d1e62ad9723d316074bb1eb8d | from tensorflow import keras as K
def conv2d(x, filters, shape, padding="same", strides=(1, 1), activation="relu"):
"""
2D Convolutional layers with Batch Normalization
Arguments:
x: Keras layer, the input to the feature map
filters: Int representing the number of filters to use
... | [
"tensorflow.keras.layers.Concatenate",
"tensorflow.keras.layers.Activation",
"tensorflow.keras.models.Model",
"tensorflow.keras.layers.Conv2DTranspose",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.BatchNormalization",
"tensorflow.keras.layers.add",
"tensorflow.keras.layers.MaxPooling2D"... | segnet/models/multiresunet.py | [(71, 'tensorflow.keras.layers.add', 'K.layers.add', (['[dimension_conservation, out]'], {}), True, 'from tensorflow import keras as K\n'), (98, 'tensorflow.keras.layers.add', 'K.layers.add', (['[residual, out]'], {}), True, 'from tensorflow import keras as K\n'), (136, 'tensorflow.keras.layers.Input', 'K.layers.Input'... |
lauromoraes/promoter_paper | 62aea776cb318a13e142f84dd84bb0a29fb0e83f | #!/usr/bin/python
# -*- encoding: utf-8 -*-
"""
@ide: PyCharm
@author: Lauro Ângelo Gonçalves de Moraes
@contact: lauromoraes@ufop.edu.br
@created: 20/06/2020
"""
import tensorflow as tf
from tensorflow.keras import models
from tensorflow.keras.layers import (
Input,
Embedding,
Conv2D,
Conv1D,
MaxP... | [
"tensorflow.keras.models.Model",
"tensorflow.keras.layers.Embedding",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.backend.shape",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.layers.Flatten"
] | mymodels/parent_models.py | [(31, 'tensorflow.keras.layers.Conv2D', 'Conv2D', ([], {'filters': 'n_filters', 'kernel_size': '(k_size, input_dim)', 'padding': 'pad', 'activation': 'activ'}), False, 'from tensorflow.keras.layers import Input, Embedding, Conv2D, Conv1D, MaxPooling1D, MaxPooling2D, AveragePooling1D, AveragePooling2D, Flatten, Dense\n'... |
ScSteffen/neuralEntropy | 796e0b38ac9c01f59772d49be3368b8ac9ad24d7 | ### imports
import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
from tensorflow.keras import initializers
import src.utils as utils
# import tensorflow.keras.backend as K
import matplotlib.pyplot as plt
from src.utils import finiteDiff, integrate, loadData, eva... | [
"tensorflow.keras.callbacks.ModelCheckpoint",
"numpy.amax",
"numpy.absolute",
"numpy.log",
"tensorflow.keras.Input",
"numpy.linspace",
"numpy.asarray",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.initializers.RandomNormal",
"numpy.linalg.norm",
"tensorflow.keras.Model",
"numpy.cos",
"... | experimental/sandBoxGeneral.py | [(15, 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""kitish"""'], {}), True, 'import matplotlib.pyplot as plt\n'), (121, 'numpy.linspace', 'np.linspace', (['(-5)', '(5)', '(100)'], {}), True, 'import numpy as np\n'), (122, 'matplotlib.pyplot.plot', 'plt.plot', (['x', 'y'], {}), True, 'import matplotlib.pyplot as... |
ScSteffen/neuralEntropy | 796e0b38ac9c01f59772d49be3368b8ac9ad24d7 | #### MK 4 Networks ####
'''
Exploration of convex Networks on a simple example
It includes the ICNN techniques (Amos et al)
'''
### This is a script for the training of the
### Third NN approach
'''
Improvements:
1) accepts u as a N-vector
2) Generalized Loss function
3) Adapted network layout
4) RESNet Used as N... | [
"tensorflow.keras.models.load_model",
"matplotlib.pyplot.legend",
"numpy.asarray",
"matplotlib.pyplot.plot",
"tensorflow.keras.Input",
"tensorflow.Variable",
"numpy.reshape",
"numpy.arange",
"tensorflow.keras.layers.Add",
"tensorflow.keras.callbacks.EarlyStopping",
"matplotlib.pyplot.style.use",... | experimental/convexNetworkComparison.py | [(39, 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""kitish"""'], {}), True, 'import matplotlib.pyplot as plt\n'), (56, 'tensorflow.keras.models.load_model', 'tf.keras.models.load_model', (["(filename + '/model')"], {}), True, 'import tensorflow as tf\n'), (66, 'tensorflow.keras.models.load_model', 'tf.keras.mod... |
Romit-Maulik/Tutorials-Demos-Practice | 77eecdc2a202e6b333123cfd92e7db6dc0eea021 | import numpy as np
np.random.seed(10)
from data_splitter import collect_snapshots
from sklearn.metrics.pairwise import rbf_kernel
import matplotlib.pyplot as plt
import tensorflow as tf
num_components = 4
# http://fourier.eng.hmc.edu/e161/lectures/kernelPCA/node4.html
def centerK(K):
''' Returns centered K matri... | [
"matplotlib.pyplot.legend",
"matplotlib.pyplot.plot",
"tensorflow.keras.Input",
"numpy.arange",
"numpy.linalg.eig",
"numpy.matmul",
"numpy.zeros",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.title",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.losses.MeanSquaredError",
"tensorflow.ker... | ROM_Demos/Kernel_POD/kernel_pod.py | [(2, 'numpy.random.seed', 'np.random.seed', (['(10)'], {}), True, 'import numpy as np\n'), (15, 'numpy.ones', 'np.ones', ([], {'shape': '(1, M)'}), True, 'import numpy as np\n'), (16, 'numpy.ones', 'np.ones', ([], {'shape': '(M, 1)'}), True, 'import numpy as np\n'), (17, 'numpy.matmul', 'np.matmul', (['o_', 'ot_'], {})... |
shenghh2015/segmentation_models | 473c528c724f62ff38ac127747dd8babb7de6b85 | import os
import cv2
from skimage import io
import sys
# import keras
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import argparse
from natsort import natsorted
# sys.path.append('../')
import segmentation_models_v1 as sm
from segmentation_models_v1 import Unet, Linknet, PSPNet, FPN, AtUne... | [
"tensorflow.keras.callbacks.ModelCheckpoint",
"tensorflow.multiply",
"numpy.uint8",
"tensorflow.keras.callbacks.ReduceLROnPlateau",
"numpy.stack",
"numpy.concatenate",
"tensorflow.keras.losses.Huber",
"tensorflow.keras.backend.square",
"tensorflow.keras.optimizers.Adam",
"numpy.random.permutation"... | translate/train_model.py | [(14, 'segmentation_models_v1.set_framework', 'sm.set_framework', (['"""tf.keras"""'], {}), True, 'import segmentation_models_v1 as sm\n'), (28, 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), False, 'import argparse\n'), (259, 'segmentation_models_v1.get_preprocessing', 'sm.get_preprocessing', (['BACKB... |
expoli/Learn-tensorflow | cc6b30c233678cf8a6f5da97fdf02ff49e810e61 | from __future__ import absolute_import, division, print_function, unicode_literals
import tensorflow as tf
from tensorflow.keras import layers
print(tf.__version__)
# !pip install -q git+https://github.com/tensorflow/docs
# import tensorflow_docs as tfdocs
# import tensorflow_docs.modeling
# import tensorflow_docs.... | [
"numpy.linspace",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.xscale",
"tensorflow.stack",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.losses.BinaryCrossentropy",
"matplotlib.pyplot.plot",
"tensorflow.keras.optimizers.schedules.InverseTimeDecay",
"matplotlib.pyplot.ylabel",
"tensorflow.ker... | BEGINNER/ML_basics_with_Keras/Overfit_and_underfit/Overfit_and_underfit.py | [(24, 'shutil.rmtree', 'shutil.rmtree', (['logdir'], {'ignore_errors': '(True)'}), False, 'import shutil\n'), (26, 'tensorflow.keras.utils.get_file', 'tf.keras.utils.get_file', (['"""HIGGS.csv.gz"""', '"""https://archive.ics.uci.edu/ml/machine-learning-databases/00280/HIGGS.csv.gz"""'], {}), True, 'import tensorflow as... |
molokhovdmitry/placeholder | cc0a983af91fcbea3dcd7b9a16db471b000b5ff5 | """
MIT License
Copyright (c) 2021 molokhovdmitry
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish... | [
"matplotlib.pyplot.legend",
"tensorflow.compat.v1.ConfigProto",
"matplotlib.pyplot.title",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.preprocessing.image_dataset_from_directory",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers... | model/create.py | [(41, 'pathlib.Path', 'Path', (['MODEL_PATH'], {}), False, 'from pathlib import Path\n'), (42, 'pathlib.Path.joinpath', 'Path.joinpath', (['MODEL_PATH', '"""model.h5"""'], {}), False, 'from pathlib import Path\n'), (43, 'pathlib.Path.joinpath', 'Path.joinpath', (['MODEL_PATH', '"""classes.txt"""'], {}), False, 'from pa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.