repo_name stringlengths 9 109 | hexsha stringlengths 40 40 | code stringlengths 547 141k | apis list | file_path stringlengths 6 143 | api_extract stringlengths 142 58.4k |
|---|---|---|---|---|---|
muell-monster/google-research | 2c0043ecd507e75e2df9973a3015daf9253e1467 | # coding=utf-8
# Copyright 2020 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.transpose",
"tensorflow.constant",
"tensorflow.shape",
"tensorflow.stack",
"tensorflow.reshape",
"tensorflow.random.uniform",
"tensorflow.test.main",
"tensorflow.expand_dims",
"tensorflow.gather",
"tensorflow.square"
] | tf3d/utils/instance_segmentation_utils_test.py | [(283, 'tensorflow.test.main', 'tf.test.main', ([], {}), True, 'import tensorflow as tf\n'), (25, 'tensorflow.constant', 'tf.constant', (['[[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, \n 0], [1, 1, 1, 1, 0, 0, 0, 0], [1, 1, 1, 1, 0, 0, 0, 0]]'], {'dtype': 'tf.float32'}), True, 'import t... |
muell-monster/google-research | 2c0043ecd507e75e2df9973a3015daf9253e1467 | # coding=utf-8
# Copyright 2020 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.concat",
"tensorflow.stack",
"tensorflow.cast",
"numpy.random.randint",
"tensorflow.squeeze",
"tensorflow.compat.v1.train.get_or_create_global_step",
"tensorflow.name_scope",
"tensorflow.argmax",
"tensorflow.tile",
"tensorflow.gather_nd",
"tensorflow.math.reduce_logsumexp",
"tensor... | hipi/relabelling_replay_buffer.py | [(199, 'tensorflow.tile', 'tf.tile', (['states[:, (None)]', '[1, num_tasks, 1]'], {}), True, 'import tensorflow as tf\n'), (200, 'tensorflow.reshape', 'tf.reshape', (['states_tiled', '[batch_size * num_tasks, obs_dim]'], {}), True, 'import tensorflow as tf\n'), (202, 'tensorflow.tile', 'tf.tile', (['actions[:, (None)]'... |
muell-monster/google-research | 2c0043ecd507e75e2df9973a3015daf9253e1467 | # coding=utf-8
# Copyright 2020 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.ones",
"tensorflow.test.main",
"numpy.zeros",
"tensorflow.shape"
] | etcmodel/feature_utils_test.py | [(766, 'tensorflow.test.main', 'tf.test.main', ([], {}), True, 'import tensorflow as tf\n'), (28, 'etcmodel.feature_utils.RelativePositionGenerator', 'feature_utils.RelativePositionGenerator', ([], {'max_distance': '(3)'}), False, 'from etcmodel import feature_utils\n'), (37, 'etcmodel.feature_utils.RelativePositionGen... |
zhoudoufu/lingvo | bd0f89809942fd0508ff43bd4b6bca1b598220cb | # Lint as: python2, python3
# 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
#
... | [
"tensorflow.Graph",
"tensorflow.all_variables",
"tensorflow.test.main",
"tensorflow.trainable_variables",
"tensorflow.global_variables_initializer",
"tensorflow.set_random_seed"
] | lingvo/tasks/asr/model_test.py | [(434, 'tensorflow.test.main', 'tf.test.main', ([], {}), True, 'import tensorflow as tf\n'), (57, 'lingvo.tasks.asr.model.AsrModel.Params', 'model.AsrModel.Params', ([], {}), False, 'from lingvo.tasks.asr import model\n'), (60, 'lingvo.tasks.asr.model_test_input_generator.TestInputGenerator.Params', 'tig.TestInputGener... |
qrsforever/workspace | 53c7ce7ca7da62c9fbb3d991ae9e4e34d07ece5f | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# @file tf_print.py
# @brief
# @author QRS
# @blog qrsforever.github.io
# @version 1.0
# @date 2019-06-02 15:40:55
################################ jupyter-vim #######################################
# https://github.com/qrsforever/vim/blob/master/bundle/.configs/jupyter-vi... | [
"tensorflow.print",
"tensorflow.range",
"tensorflow.Session",
"tensorflow.control_dependencies"
] | ML/learn/tensorflow/tf_print.py | [(22, 'memory_util.vlog', 'memory_util.vlog', (['(1)'], {}), False, 'import memory_util\n'), (24, 'tensorflow.Session', 'tf.Session', ([], {}), True, 'import tensorflow as tf\n'), (26, 'tensorflow.range', 'tf.range', (['(10)'], {}), True, 'import tensorflow as tf\n'), (27, 'tensorflow.print', 'tf.print', (['"""tensors:... |
KoconJan/BERT-NER-CLI | 6f1323bf6294bc05ee3ee9a58e5b932a68bb85c0 | #! usr/bin/env python3
# -*- coding:utf-8 -*-
"""
Copyright 2018 The Google AI Language Team Authors.
BASED ON Google_BERT.
@Author:zhoukaiyin
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import os
from bert import mode... | [
"tensorflow.contrib.cluster_resolver.TPUClusterResolver",
"tensorflow.FixedLenFeature",
"tensorflow.nn.log_softmax",
"tensorflow.reduce_sum",
"tensorflow.train.init_from_checkpoint",
"tensorflow.to_int32",
"tensorflow.contrib.tpu.TPUEstimatorSpec",
"tensorflow.contrib.tpu.TPUEstimator",
"tensorflow.... | bert_ner.py | [(95, 'tensorflow.flags.DEFINE_string', 'tf.flags.DEFINE_string', (['"""master"""', 'None', '"""[Optional] TensorFlow master URL."""'], {}), True, 'import tensorflow as tf\n'), (261, 'tensorflow.python_io.TFRecordWriter', 'tf.python_io.TFRecordWriter', (['output_file'], {}), True, 'import tensorflow as tf\n'), (314, 'b... |
golunovas/onnx-tensorflow | b6340b3e66aa08af1ea4382e98257c2098177371 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import math
import unittest
import numpy as np
import tensorflow as tf
from onnx_tf.backend import run_node
from onnx_tf.common import supports_device
from onnx_tf.common... | [
"numpy.dot",
"numpy.arctanh",
"numpy.sqrt",
"numpy.minimum",
"numpy.squeeze",
"numpy.cumsum",
"numpy.isneginf",
"numpy.round",
"numpy.max",
"numpy.concatenate",
"numpy.mean",
"numpy.argmin",
"numpy.random.randn",
"numpy.negative",
"numpy.exp",
"numpy.where",
"numpy.divide",
"numpy.... | test/backend/test_node.py | [(1237, 'unittest.main', 'unittest.main', ([], {}), False, 'import unittest\n'), (23, 'numpy.random.uniform', 'np.random.uniform', (['low', 'high', 'shape'], {}), True, 'import numpy as np\n'), (30, 'numpy.random.randint', 'np.random.randint', (['low', 'high'], {'size': 'shape', 'dtype': 'dtype'}), True, 'import numpy ... |
sereini/SpeechSeparationModel | ea44c845762112f3bc2e5e54c5530e6fd429464f | """
Exports the embeddings of a directory of images as numpy arrays.
Following structure:
D:\images:
folder1:
img_0
...
img_74
folder2:
img_0
...
img_74
Output:
embeddings.npy -- Embeddings as np array (with names "... | [
"scipy.misc.imresize",
"tensorflow.Graph",
"numpy.stack",
"numpy.save",
"tensorflow.ConfigProto",
"tensorflow.GPUOptions",
"tensorflow.Session",
"tensorflow.get_default_graph",
"numpy.zeros"
] | preprocessing/embedding/export_FaceEmbedding.py | [(85, 'facenet.get_dataset', 'facenet.get_dataset', (['args.data_dir'], {}), False, 'import facenet\n'), (86, 'facenet.get_image_paths_and_labels', 'facenet.get_image_paths_and_labels', (['train_set'], {}), False, 'import facenet\n'), (92, 'os.path.expanduser', 'os.path.expanduser', (['args.data_dir'], {}), False, 'imp... |
clear-nus/BOIRL | cc872111fda3c7b8118e1a864831013c30f63948 | import time
from rllab.algos.base import RLAlgorithm
import rllab.misc.logger as logger
import rllab.plotter as plotter
from sandbox.rocky.tf.policies.base import Policy
import tensorflow as tf
from sandbox.rocky.tf.samplers.batch_sampler import BatchSampler
from sandbox.rocky.tf.samplers.vectorized_sampler import Vec... | [
"tensorflow.get_default_session",
"numpy.min",
"numpy.max",
"tensorflow.global_variables_initializer",
"numpy.mean",
"numpy.array",
"numpy.sum"
] | inverse_rl/algos/irl_batch_polopt.py | [(135, 'numpy.mean', 'np.mean', (['undiscounted_returns'], {}), True, 'import numpy as np\n'), (178, 'tensorflow.get_default_session', 'tf.get_default_session', ([], {}), True, 'import tensorflow as tf\n'), (185, 'time.time', 'time.time', ([], {}), False, 'import time\n'), (121, 'rllab.plotter.init_plot', 'plotter.init... |
jylinman/tensorflow | 5248d111c3aeaf9f560cd77bff0f183f38e31e0b | # Copyright 2015 Google Inc. 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 or a... | [
"tensorflow.Graph",
"tensorflow.constant",
"numpy.cosh",
"numpy.fft.rfft",
"tensorflow.zeros",
"tensorflow.test.main",
"numpy.sinh",
"tensorflow.python.ops.script_ops._py_funcs.size",
"numpy.array",
"tensorflow.py_func"
] | tensorflow/python/kernel_tests/py_func_test.py | [(131, 'tensorflow.test.main', 'tf.test.main', ([], {}), True, 'import tensorflow as tf\n'), (102, 'six.moves.xrange', 'xrange', (['(1000)'], {}), False, 'from six.moves import xrange\n'), (37, 'tensorflow.constant', 'tf.constant', (['(1.0)', 'tf.float32'], {}), True, 'import tensorflow as tf\n'), (38, 'tensorflow.cons... |
jylinman/tensorflow | 5248d111c3aeaf9f560cd77bff0f183f38e31e0b | # Copyright 2015 Google Inc. 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 or a... | [
"tensorflow.fill",
"tensorflow.assign_add",
"tensorflow.zeros",
"tensorflow.test.main",
"numpy.ones",
"tensorflow.initialize_all_variables"
] | tensorflow/python/kernel_tests/dense_update_ops_no_tsan_test.py | [(77, 'tensorflow.test.main', 'tf.test.main', ([], {}), True, 'import tensorflow as tf\n'), (32, 'tensorflow.fill', 'tf.fill', (['[1024, 1024]', '(1.0)'], {}), True, 'import tensorflow as tf\n'), (33, 'tensorflow.zeros', 'tf.zeros', (['[1024, 1024]'], {}), True, 'import tensorflow as tf\n'), (34, 'tensorflow.assign_add... |
jylinman/tensorflow | 5248d111c3aeaf9f560cd77bff0f183f38e31e0b | # Copyright 2015 Google Inc. 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 or a... | [
"tensorflow.python.framework.ops.IndexedSlices",
"tensorflow.python.framework.ops.convert_to_tensor",
"tensorflow.python.training.training_ops.apply_gradient_descent"
] | tensorflow/python/training/gradient_descent.py | [(57, 'tensorflow.python.framework.ops.IndexedSlices', 'ops.IndexedSlices', (['(grad.values * self._learning_rate_tensor)', 'grad.indices', 'grad.dense_shape'], {}), False, 'from tensorflow.python.framework import ops\n'), (62, 'tensorflow.python.framework.ops.convert_to_tensor', 'ops.convert_to_tensor', (['self._learn... |
jylinman/tensorflow | 5248d111c3aeaf9f560cd77bff0f183f38e31e0b | # -*- coding: utf-8 -*-
# Copyright 2015 Google Inc. 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 require... | [
"tensorflow.compat.as_bytes",
"tensorflow.matching_files",
"tensorflow.test.main",
"tensorflow.read_file"
] | tensorflow/python/kernel_tests/io_ops_test.py | [(73, 'tensorflow.test.main', 'tf.test.main', ([], {}), True, 'import tensorflow as tf\n'), (33, 'tensorflow.compat.as_bytes', 'tf.compat.as_bytes', (['contents'], {}), True, 'import tensorflow as tf\n'), (34, 'tempfile.NamedTemporaryFile', 'tempfile.NamedTemporaryFile', ([], {'prefix': '"""ReadFileTest"""'}), False, '... |
jylinman/tensorflow | 5248d111c3aeaf9f560cd77bff0f183f38e31e0b | # Copyright 2015 Google Inc. 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 or a... | [
"tensorflow.fill",
"tensorflow.assign_add",
"tensorflow.Variable",
"numpy.arange",
"tensorflow.test.is_built_with_cuda",
"tensorflow.assign",
"tensorflow.test.main",
"numpy.ones",
"tensorflow.assign_sub",
"numpy.zeros"
] | tensorflow/python/kernel_tests/dense_update_ops_test.py | [(168, 'tensorflow.test.main', 'tf.test.main', ([], {}), True, 'import tensorflow as tf\n'), (31, 'tensorflow.Variable', 'tf.Variable', (['x'], {}), True, 'import tensorflow as tf\n'), (32, 'tensorflow.assign', 'tf.assign', (['p', 'y'], {}), True, 'import tensorflow as tf\n'), (40, 'tensorflow.Variable', 'tf.Variable',... |
parachutel/garage | f4a6271edd0f9c280c306d1f0bbf4bc1591ab85e | import gc
from dowel import logger
import tensorflow as tf
from garage.experiment import deterministic
from tests.fixtures.logger import NullOutput
class TfTestCase:
def setup_method(self):
self.sess = tf.compat.v1.Session()
self.sess.__enter__()
def teardown_method(self):
self.sess... | [
"tensorflow.compat.v1.Session",
"tensorflow.Graph",
"tensorflow.reset_default_graph",
"tensorflow.Session"
] | tests/fixtures/fixtures.py | [(12, 'tensorflow.compat.v1.Session', 'tf.compat.v1.Session', ([], {}), True, 'import tensorflow as tf\n'), (19, 'gc.collect', 'gc.collect', ([], {}), False, 'import gc\n'), (24, 'tensorflow.reset_default_graph', 'tf.reset_default_graph', ([], {}), True, 'import tensorflow as tf\n'), (25, 'tensorflow.Graph', 'tf.Graph'... |
Dongzhou-1996/tf_learning | fe764e78cc1a934707ae01d0847f901cb6fbb8b9 | #!/usr/bin/env python
# coding=utf-8
import tensorflow as tf
import os
import numpy as np
import argparse
import shutil
from tensorflow.examples.tutorials.mnist import input_data
parser = argparse.ArgumentParser('MNIST Softmax')
parser.add_argument('--data_dir', type=str, default='/tmp/mnist-data',
... | [
"tensorflow.nn.softmax_cross_entropy_with_logits",
"tensorflow.matmul",
"tensorflow.cast",
"tensorflow.placeholder",
"tensorflow.constant_initializer",
"tensorflow.global_variables_initializer",
"tensorflow.train.GradientDescentOptimizer",
"tensorflow.variable_scope",
"tensorflow.Session",
"tensor... | tf_mnist.py | [(10, 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['"""MNIST Softmax"""'], {}), False, 'import argparse\n'), (20, 'tensorflow.placeholder', 'tf.placeholder', (['tf.float32', '[None, 784]'], {'name': '"""x"""'}), True, 'import tensorflow as tf\n'), (21, 'tensorflow.placeholder', 'tf.placeholder', (['tf.float3... |
dolaameng/tensorflow_cookbook | ca9bcb892239e9276e9348689e06cd6d1edd19ef | # Operations on a Computational Graph
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from tensorflow.python.framework import ops
ops.reset_default_graph()
# Create graph
sess = tf.Session()
# Create tensors
# Create data to feed in
x_vals = np.array([1., 3., 5., 7., 9.])
x_data = tf.place... | [
"tensorflow.constant",
"tensorflow.merge_all_summaries",
"tensorflow.placeholder",
"tensorflow.mul",
"tensorflow.train.SummaryWriter",
"tensorflow.Session",
"numpy.array",
"tensorflow.python.framework.ops.reset_default_graph"
] | 02_TensorFlow_Way/01_Operations_as_a_Computational_Graph/01_operations_on_a_graph.py | [(6, 'tensorflow.python.framework.ops.reset_default_graph', 'ops.reset_default_graph', ([], {}), False, 'from tensorflow.python.framework import ops\n'), (9, 'tensorflow.Session', 'tf.Session', ([], {}), True, 'import tensorflow as tf\n'), (14, 'numpy.array', 'np.array', (['[1.0, 3.0, 5.0, 7.0, 9.0]'], {}), True, 'impo... |
dolaameng/tensorflow_cookbook | ca9bcb892239e9276e9348689e06cd6d1edd19ef | # -*- coding: utf-8 -*-
# Using Multiple Devices
#----------------------------------
#
# This function gives us the ways to use
# multiple devices (executors) in TensorFlow.
import tensorflow as tf
from tensorflow.python.framework import ops
ops.reset_default_graph()
# To find out where placement occurs, set 'log_de... | [
"tensorflow.matmul",
"tensorflow.device",
"tensorflow.constant",
"tensorflow.test.is_built_with_cuda",
"tensorflow.reshape",
"tensorflow.mul",
"tensorflow.ConfigProto",
"tensorflow.Session",
"tensorflow.python.framework.ops.reset_default_graph"
] | 10_Taking_TensorFlow_to_Production/02_Using_Multiple_Devices/02_using_multiple_devices.py | [(10, 'tensorflow.python.framework.ops.reset_default_graph', 'ops.reset_default_graph', ([], {}), False, 'from tensorflow.python.framework import ops\n'), (15, 'tensorflow.constant', 'tf.constant', (['[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]'], {'shape': '[2, 3]', 'name': '"""a"""'}), True, 'import tensorflow as tf\n'), (16, 'te... |
theendsofinvention/cartoonify | 39ea84d96b3e93f0480e6d6158bea506d01278ca | # Copyright 2017 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.image.resize_bilinear",
"tensorflow.transpose",
"tensorflow.range",
"tensorflow.shape",
"tensorflow.reduce_mean",
"tensorflow.stack",
"tensorflow.reshape",
"tensorflow.sigmoid",
"tensorflow.ones",
"tensorflow.squeeze",
"tensorflow.constant_initializer",
"tensorflow.variable_scope"
... | cartoonify/app/object_detection/core/box_predictor.py | [(378, 'tensorflow.reduce_mean', 'tf.reduce_mean', (['image_features', '[1, 2]'], {'keep_dims': '(True)', 'name': '"""AvgPool"""'}), True, 'import tensorflow as tf\n'), (397, 'tensorflow.reshape', 'tf.reshape', (['box_encodings', '[-1, 1, self._num_classes, self._box_code_size]'], {}), True, 'import tensorflow as tf\n'... |
levskaya/tensor2tensor | 4643800137f802693f880a1fab9e10de7ba32e66 | # coding=utf-8
# Copyright 2019 The Tensor2Tensor 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... | [
"tensorflow.gfile.Open",
"tensorflow.gfile.Exists",
"tensorflow.gfile.GFile",
"tensorflow.Summary.Value",
"tensorflow.logging.info",
"tensorflow.contrib.slim.tfexample_decoder.Tensor",
"tensorflow.VarLenFeature"
] | tensor2tensor/data_generators/translate.py | [(107, 'tensorflow.logging.info', 'tf.logging.info', (["('%s: BLEU = %6.2f' % (decode_hparams.decode_to_file, bleu))"], {}), True, 'import tensorflow as tf\n'), (147, 'tensor2tensor.data_generators.cleaner_en_xx.clean_en_xx_pairs', 'cleaner_en_xx.clean_en_xx_pairs', (['sentence_pairs'], {}), False, 'from tensor2tensor.... |
fangqyi/garage | ddafba385ef005f46f913ab352f9638760e5b412 | """First order optimizer."""
import time
from dowel import logger
import pyprind
import tensorflow as tf
from garage.np.optimizers import BatchDataset
from garage.tf.misc import tensor_utils
from garage.tf.optimizers.utils import LazyDict
class FirstOrderOptimizer:
"""First order optimier.
P... | [
"tensorflow.compat.v1.get_default_session",
"tensorflow.name_scope"
] | src/garage/tf/optimizers/first_order_optimizer.py | [(134, 'time.time', 'time.time', ([], {}), False, 'import time\n'), (136, 'garage.np.optimizers.BatchDataset', 'BatchDataset', (['inputs', 'self._batch_size'], {'extra_inputs': 'extra_inputs'}), False, 'from garage.np.optimizers import BatchDataset\n'), (140, 'tensorflow.compat.v1.get_default_session', 'tf.compat.v1.ge... |
utahnlp/therapist-observer | 31eaf9a5c82c6d0f9a62427ac5df030d81547472 |
import numpy as np
import tensorflow as tf
import h5py
import json
import re
from .data import UnicodeCharsVocabulary, Batcher
DTYPE = 'float32'
DTYPE_INT = 'int64'
class BidirectionalLanguageModel(object):
def __init__(
self,
options_file,
weight_file,
use_chara... | [
"tensorflow.device",
"tensorflow.get_variable",
"tensorflow.concat",
"numpy.sqrt",
"tensorflow.control_dependencies",
"tensorflow.nn.rnn_cell.ResidualWrapper",
"tensorflow.nn.max_pool",
"tensorflow.zeros",
"tensorflow.nn.rnn_cell.LSTMStateTuple",
"tensorflow.cast",
"tensorflow.group",
"tensorf... | tensorflow/classes/bilm/model.py | [(616, 'tensorflow.placeholder', 'tf.placeholder', (['"""int32"""'], {'shape': '(None, None, max_word_length)'}), True, 'import tensorflow as tf\n'), (625, 'numpy.zeros', 'np.zeros', (['(n_tokens, embed_dim)'], {'dtype': 'DTYPE'}), True, 'import numpy as np\n'), (627, 'tensorflow.ConfigProto', 'tf.ConfigProto', ([], {'... |
rist-ro/argo | a10c33346803239db8a64c104db7f22ec4e05bef | import os
from abc import abstractmethod
import numpy as np
import tensorflow as tf
from datasets.Dataset import Dataset, TRAIN_LOOP
from .ArgoLauncher import ArgoLauncher
from .DeepLearningModel import DeepLearningModel
from .hooks.ArgoHook import STEPS, EPOCHS
from .hooks.LoggingMeanTensorsHook import LoggingMeanTe... | [
"tensorflow.zeros",
"tensorflow.cast",
"tensorflow.train.ChiefSessionCreator",
"tensorflow.get_default_graph",
"tensorflow.group",
"tensorflow.add_n",
"tensorflow.get_collection",
"tensorflow.placeholder_with_default",
"tensorflow.check_numerics",
"tensorflow.train.get_or_create_global_step",
"t... | argo/core/TFDeepLearningModel.py | [(54, 'datasets.Dataset.Dataset.load_dataset', 'Dataset.load_dataset', (['dataset_conf'], {}), False, 'from datasets.Dataset import Dataset, TRAIN_LOOP\n'), (105, 'datasets.Dataset.Dataset.load_dataset', 'Dataset.load_dataset', (['dataset_conf'], {}), False, 'from datasets.Dataset import Dataset, TRAIN_LOOP\n'), (241, ... |
aimalz/justice | 2edcb471cd01d6659a498bcd0209cb5dae83375a | # -*- coding: utf-8 -*-
"""Extracts dense features with linear transformations."""
import enum
import json
import pathlib
import typing
import numpy as np
import tensorflow as tf
from justice import path_util
from justice.align_model import graph_typecheck
from justice.features import band_settings_params
def _left... | [
"tensorflow.clip_by_value",
"tensorflow.fill",
"tensorflow.concat",
"tensorflow.stack",
"tensorflow.expand_dims",
"tensorflow.exp",
"tensorflow.where",
"numpy.array",
"tensorflow.sequence_mask",
"tensorflow.tile"
] | justice/features/dense_extracted_features.py | [(34, 'tensorflow.sequence_mask', 'tf.sequence_mask', (['(window_size - after_padding)'], {'maxlen': 'window_size'}), True, 'import tensorflow as tf\n'), (311, 'justice.features.band_settings_params.BandSettings.from_params', 'band_settings_params.BandSettings.from_params', (['params'], {}), False, 'from justice.featur... |
PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | # Copyright 2016 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.ops.parsing_ops.FixedLenFeature",
"tensorflow.contrib.slim.python.slim.data.dataset.Dataset",
"tensorflow.contrib.slim.python.slim.queues.QueueRunners",
"tensorflow.contrib.slim.python.slim.data.tfexample_decoder.Tensor",
"tensorflow.contrib.slim.python.slim.data.test_utils.create_tfrecor... | tensorflow/contrib/slim/python/slim/data/dataset_data_provider_test.py | [(40, 'tensorflow.python.ops.array_ops.expand_dims', 'array_ops.expand_dims', (['image', '(0)'], {}), False, 'from tensorflow.python.ops import array_ops\n'), (41, 'tensorflow.python.ops.image_ops.resize_bilinear', 'image_ops.resize_bilinear', (['image', '[height, width]'], {}), False, 'from tensorflow.python.ops impor... |
PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | # Copyright 2016 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.ops.device",
"numpy.linalg.norm",
"tensorflow.python.training.server_lib.ClusterSpec",
"tensorflow.python.ops.variables.Variable",
"tensorflow.python.ops.variables.global_variables_initializer",
"tensorflow.python.client.session.Session",
"tensorflow.python.platform.test.mai... | tensorflow/contrib/opt/python/training/variable_clipping_optimizer_test.py | [(187, 'tensorflow.python.platform.test.main', 'test.main', ([], {}), False, 'from tensorflow.python.platform import test\n'), (49, 'tensorflow.python.training.server_lib.ClusterSpec', 'server_lib.ClusterSpec', (["{'worker': ['localhost:%s' % port1], 'ps': ['localhost:%s' % port2]}"], {}), False, 'from tensorflow.pytho... |
PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | # Copyright 2016 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.contrib.learn.python.learn.ops.softmax_classifier",
"tensorflow.contrib.learn.python.learn.ops.categorical_variable",
"tensorflow.contrib.learn.python.learn.ops.embedding_lookup",
"tensorflow.python.ops.array_ops.placeholder",
"numpy.random.randn",
"tensorflow.python.platform.test.main",
"nu... | tensorflow/contrib/learn/python/learn/ops/ops_test.py | [(77, 'tensorflow.python.platform.test.main', 'test.main', ([], {}), False, 'from tensorflow.python.platform import test\n'), (53, 'numpy.random.randn', 'np.random.randn', (['n_embed', 'd_embed'], {}), True, 'import numpy as np\n'), (54, 'numpy.random.randint', 'np.random.randint', (['(0)', 'n_embed', 'ids_shape'], {})... |
PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | # Copyright 2017 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.device",
"matplotlib.pyplot.imshow",
"tensorflow.gfile.Exists",
"tensorflow.stack",
"tensorflow.gfile.GFile",
"tensorflow.contrib.eager.python.tfe.run",
"tensorflow.gfile.MakeDirs",
"tensorflow.contrib.summary.always_record_summaries",
"tensorflow.train.AdamOptimizer",
"tensorflow.stri... | tensorflow/contrib/eager/python/examples/rnn_colorbot/rnn_colorbot.py | [(108, 'os.path.join', 'os.path.join', (['work_directory', 'filename'], {}), False, 'import os\n'), (215, 'tensorflow.contrib.eager.python.tfe.metrics.Mean', 'tfe.metrics.Mean', (['"""loss"""'], {}), False, 'from tensorflow.contrib.eager.python import tfe\n'), (216, 'tensorflow.contrib.eager.python.tfe.Iterator', 'tfe.... |
PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | # 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.enable_eager_execution",
"tensorflow.contrib.eager.python.examples.l2hmc.l2hmc.compute_loss",
"tensorflow.contrib.summary.always_record_summaries",
"tensorflow.train.AdamOptimizer",
"tensorflow.Graph",
"tensorflow.test.main",
"tensorflow.ConfigProto",
"tensorflow.reset_default_graph",
"t... | tensorflow/contrib/eager/python/examples/l2hmc/l2hmc_test.py | [(30, 'tensorflow.contrib.training.HParams', 'tf.contrib.training.HParams', ([], {'x_dim': '(2)', 'n_samples': '(200)', 'n_steps': '(10)', 'eps': '(0.1)', 'n_iters': '(10)', 'learning_rate': '(0.0003)', 'n_warmup_iters': '(3)'}), True, 'import tensorflow as tf\n'), (41, 'tensorflow.contrib.eager.python.examples.l2hmc.l... |
dpton/tensorflow-attention-rnn | a1b8884640ca49d6fdebc7df2167e4353364a243 | # _*_ coding:utf-8 _*_
# !/usr/bin/env python
from __future__ import absolute_import, division, print_function, unicode_literals
import numpy as np
import logging
import nltk
from nltk.corpus import stopwords
from gensim.models.wrappers import FastText
from gensim.models import Word2Vec
import random
import threading
i... | [
"tensorflow.placeholder",
"tensorflow.PaddingFIFOQueue"
] | utils/reprocessing.py | [(60, 'ftfy.fix_text', 'fix_text', (['text'], {'normalization': 'normalization'}), False, 'from ftfy import fix_text\n'), (68, 'unidecode.unidecode', 'unidecode', (['text'], {}), False, 'from unidecode import unidecode\n'), (86, 're.sub', 're.sub', (['"""(\\\\b)([Aa]re|[Cc]ould|[Dd]id|[Dd]oes|[Dd]o|[Hh]ad|[Hh]as|[Hh]av... |
JiByungKyu/ludwig | 3e2f276459f976054b5c2ab8c55be994170345da | # coding=utf-8
# Copyright (c) 2019 Uber Technologies, Inc.
#
# 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 applicabl... | [
"tensorflow.concat",
"tensorflow.cast",
"tensorflow.reshape",
"tensorflow.expand_dims",
"tensorflow.sequence_mask"
] | ludwig/features/base_feature.py | [(28, 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), False, 'import logging\n'), (143, 'ludwig.modules.fully_connected_modules.FCStack', 'FCStack', ([], {'layers': 'self.fc_layers', 'num_layers': 'self.num_fc_layers', 'default_fc_size': 'self.fc_size', 'default_use_bias': 'self.use_bias', 'default_weight... |
Dzinushi/models_1_4 | d7e72793a68c1667d403b1542c205d1cd9b1d17c | # Copyright 2017 Google Inc. 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 or a... | [
"tensorflow.Graph",
"tensorflow.train.start_queue_runners",
"tensorflow.test.main",
"tensorflow.global_variables_initializer",
"tensorflow.reset_default_graph",
"tensorflow.trainable_variables"
] | research/adversarial_text/graphs_test.py | [(57, 'random.randint', 'random.randint', (['(10)', '(200)'], {}), False, 'import random\n'), (66, 'collections.defaultdict', 'defaultdict', (['int'], {}), False, 'from collections import defaultdict\n'), (225, 'tensorflow.test.main', 'tf.test.main', ([], {}), True, 'import tensorflow as tf\n'), (60, 'random.choice', '... |
PaullMP/TensorFlowT | b9b3b5b19971671fe24868273ca5274c1ec7169f | # Copyright 2016 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.ops.math_ops.greater_equal",
"tensorflow.python.ops.array_ops.constant",
"tensorflow.python.ops.array_ops.shape",
"tensorflow.python.ops.nn.in_top_k",
"tensorflow.python.ops.math_ops.ceil",
"tensorflow.python.ops.state_ops.assign_add",
"tensorflow.python.ops.math_ops.to_double",
"te... | tensorflow/contrib/metrics/python/ops/metric_ops.py | [(519, 'tensorflow.contrib.framework.deprecated_args', 'deprecated_args', (['IGNORE_MASK_DATE', 'IGNORE_MASK_INSTRUCTIONS', '"""ignore_mask"""'], {}), False, 'from tensorflow.contrib.framework import deprecated_args\n'), (602, 'tensorflow.contrib.framework.deprecated_args', 'deprecated_args', (['IGNORE_MASK_DATE', 'IGN... |
TianjieZhang1993/PINNs | 9034ba7f4fef81c24954fa3cbf08a2d4a7fee85a | """
@author: Maziar Raissi
"""
import sys
sys.path.insert(0, '../../Utilities/')
import tensorflow as tf
import numpy as np
import time
import scipy.io
np.random.seed(1234)
tf.set_random_seed(1234)
class PhysicsInformedNN:
# Initialize the class
def __init__(self, x0, u0, x1, u1, layers, dt, lb, ub, q):
... | [
"numpy.sqrt",
"tensorflow.zeros",
"numpy.random.randn",
"tensorflow.train.AdamOptimizer",
"numpy.asscalar",
"tensorflow.Variable",
"numpy.reshape",
"tensorflow.gradients",
"numpy.finfo",
"tensorflow.ConfigProto",
"numpy.real",
"numpy.std",
"tensorflow.square",
"tensorflow.matmul",
"numpy... | appendix/discrete_time_identification (Burgers)/Burgers_systematic.py | [(6, 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../../Utilities/"""'], {}), False, 'import sys\n'), (13, 'numpy.random.seed', 'np.random.seed', (['(1234)'], {}), True, 'import numpy as np\n'), (14, 'tensorflow.set_random_seed', 'tf.set_random_seed', (['(1234)'], {}), True, 'import tensorflow as tf\n'), (182, 'n... |
ash-vs/tensorflow | 303dc341a6300a4a2eee820679bca30547426aa6 | # Copyright 2015 Google Inc. 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 o... | [
"tensorflow.python.training.saver.latest_checkpoint",
"tensorflow.contrib.learn.python.learn.estimators.tensor_signature.tensors_compatible",
"tensorflow.python.training.device_setter.replica_device_setter",
"tensorflow.contrib.learn.python.learn.estimators.tensor_signature.create_signatures",
"tensorflow.c... | tensorflow/contrib/learn/python/learn/estimators/estimator.py | [(77, 'tensorflow.contrib.learn.python.learn.io.data_feeder.setup_train_data_feeder', 'data_feeder.setup_train_data_feeder', (['x', 'y'], {'n_classes': 'None', 'batch_size': 'batch_size'}), False, 'from tensorflow.contrib.learn.python.learn.io import data_feeder\n'), (90, 'tensorflow.contrib.learn.python.learn.io.data_... |
souradip93/GCDT | 5991044307f59598ea224b64f1f3b915fa00ebcc | #!/usr/bin/env python
# coding=utf-8
# Copyright 2018 The THUMT Authors
import argparse
import os
import numpy as np
import tensorflow as tf
import thumt.data.dataset as dataset
import thumt.data.record as record
import thumt.data.vocab as vocabulary
import thumt.models as models
import thumt.utils.hooks as hooks
impo... | [
"tensorflow.convert_to_tensor",
"tensorflow.control_dependencies",
"tensorflow.gfile.Exists",
"tensorflow.gfile.MkDir",
"tensorflow.minimum",
"tensorflow.train.AdamOptimizer",
"tensorflow.to_int32",
"tensorflow.train.MonitoredTrainingSession",
"tensorflow.add_n",
"tensorflow.summary.scalar",
"te... | thumt/bin/trainer.py | [(20, 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Training neural machine translation models"""', 'usage': '"""trainer.py [<args>] [-h | --help]"""'}), False, 'import argparse\n'), (53, 'tensorflow.contrib.training.HParams', 'tf.contrib.training.HParams', ([], {'input': "['', '']", 'o... |
wull566/tensorflow_demo | c2c45050867cb056b8193eb53466d26b80b0ec13 | import tensorflow as tf
import numpy as np
import gym
import os
import shutil
np.random.seed(1)
tf.set_random_seed(1)
MAX_EPISODES = 2000
LR_A = 0.0005 # 1_tensorflow_new rate for actor
LR_C = 0.0005 # 1_tensorflow_new rate for critic
GAMMA = 0.999 # reward discount
REPLACE_ITER_A = 1700
REPLACE_ITER_C = 1500
MEMO... | [
"tensorflow.get_variable",
"numpy.max",
"tensorflow.abs",
"tensorflow.train.AdamOptimizer",
"numpy.random.randint",
"numpy.hstack",
"tensorflow.Variable",
"numpy.clip",
"tensorflow.get_collection",
"tensorflow.gradients",
"tensorflow.layers.dense",
"tensorflow.train.exponential_decay",
"tens... | tutorials/3_reinforce/experiments/Solve_BipedalWalker/DDPG.py | [(7, 'numpy.random.seed', 'np.random.seed', (['(1)'], {}), True, 'import numpy as np\n'), (8, 'tensorflow.set_random_seed', 'tf.set_random_seed', (['(1)'], {}), True, 'import tensorflow as tf\n'), (26, 'tensorflow.Variable', 'tf.Variable', (['(0)'], {'trainable': '(False)'}), True, 'import tensorflow as tf\n'), (28, 't... |
Ravi-0809/question-generation | 9065a3b47293b8a69a0548af1f6bedd4a4aa7f9c | import tensorflow as tf
from qa.qanet.layers import initializer, regularizer, residual_block, highway, conv, mask_logits, trilinear, total_params, optimized_trilinear_for_attention
class Model(object):
def __init__(self, config, batch, word_mat=None, char_mat=None, trainable=True, opt=True, demo = False, graph = N... | [
"tensorflow.concat",
"tensorflow.matrix_band_part",
"tensorflow.contrib.layers.apply_regularization",
"tensorflow.control_dependencies",
"tensorflow.cast",
"tensorflow.global_variables",
"tensorflow.train.ExponentialMovingAverage",
"tensorflow.train.AdamOptimizer",
"tensorflow.Graph",
"tensorflow.... | src/qa/qanet/model.py | [(8, 'tensorflow.Graph', 'tf.Graph', ([], {}), True, 'import tensorflow as tf\n'), (13, 'tensorflow.placeholder_with_default', 'tf.placeholder_with_default', (['(0.0)', '()'], {'name': '"""dropout"""'}), True, 'import tensorflow as tf\n'), (30, 'tensorflow.cast', 'tf.cast', (['self.c', 'tf.bool'], {}), True, 'import te... |
DdeGeus/single-network-panoptic-segmentation | 891f13b8bca0f41e298900fe1c73bc3035caef5d | import tensorflow as tf
import numpy as np
from utils import box_utils
def generate(base_size,
stride,
scales,
ratios,
features_height,
features_width,
offset=None):
"""
Args:
base_size: (height, width)
stride: (height, width)
... | [
"tensorflow.convert_to_tensor",
"tensorflow.concat",
"tensorflow.range",
"tensorflow.stack",
"tensorflow.cast",
"tensorflow.reshape",
"tensorflow.ConfigProto",
"tensorflow.global_variables_initializer",
"tensorflow.meshgrid",
"tensorflow.variable_scope",
"tensorflow.sqrt"
] | components/anchor_generator.py | [(88, 'tensorflow.global_variables_initializer', 'tf.global_variables_initializer', ([], {}), True, 'import tensorflow as tf\n'), (27, 'tensorflow.variable_scope', 'tf.variable_scope', (['"""anchor_generator"""'], {}), True, 'import tensorflow as tf\n'), (31, 'tensorflow.cast', 'tf.cast', (['features_width', 'tf.int32'... |
Johnson-yue/stylegan2encoder | 709ccb52fe9a1b4dfdc367f0390cf419f2c3e972 | import tensorflow as tf
import numpy as np
import dnnlib.tflib as tflib
from functools import partial
def create_stub(name, batch_size):
return tf.constant(0, dtype='float32', shape=(batch_size, 0))
def create_variable_for_generator(name, batch_size):
return tf.get_variable('learnable_dlatents',
... | [
"tensorflow.get_default_session",
"tensorflow.constant",
"tensorflow.assign",
"tensorflow.global_variables",
"tensorflow.initializers.random_normal",
"tensorflow.saturate_cast",
"tensorflow.get_default_graph",
"numpy.zeros"
] | encoder/generator_model.py | [(8, 'tensorflow.constant', 'tf.constant', (['(0)'], {'dtype': '"""float32"""', 'shape': '(batch_size, 0)'}), True, 'import tensorflow as tf\n'), (22, 'numpy.zeros', 'np.zeros', (['(self.batch_size, 18, 512)'], {}), True, 'import numpy as np\n'), (29, 'tensorflow.get_default_session', 'tf.get_default_session', ([], {})... |
failure-to-thrive/addons | 63c82e318e68b07eb1162d1ff247fe9f4d3194fc | # 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.convert_to_tensor",
"tensorflow.cast",
"tensorflow.floor",
"tensorflow.keras.utils.register_keras_serializable",
"tensorflow.name_scope",
"tensorflow.abs"
] | tensorflow_addons/optimizers/cyclical_learning_rate.py | [(20, 'tensorflow.keras.utils.register_keras_serializable', 'tf.keras.utils.register_keras_serializable', ([], {'package': '"""Addons"""'}), True, 'import tensorflow as tf\n'), (107, 'tensorflow.keras.utils.register_keras_serializable', 'tf.keras.utils.register_keras_serializable', ([], {'package': '"""Addons"""'}), Tr... |
mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | import numpy as np
import os
import scipy.optimize
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
import ray
import ray.experimental.tf_utils
class LinearModel(object):
"""Simple class for a one layer neural network.
Note that this code does not initialize the network we... | [
"tensorflow.device",
"tensorflow.matmul",
"tensorflow.zeros",
"tensorflow.gradients",
"tensorflow.placeholder",
"numpy.random.normal",
"tensorflow.log",
"tensorflow.Session",
"tensorflow.examples.tutorials.mnist.input_data.read_data_sets"
] | doc/source/ray-core/examples/lbfgs/driver.py | [(102, 'ray.put', 'ray.put', (['theta'], {}), False, 'import ray\n'), (109, 'ray.put', 'ray.put', (['theta'], {}), False, 'import ray\n'), (116, 'ray.init', 'ray.init', ([], {}), False, 'import ray\n'), (130, 'tensorflow.examples.tutorials.mnist.input_data.read_data_sets', 'input_data.read_data_sets', (['"""MNIST_data"... |
ProjetEtudeMLFI/TensorFI | 961a0205ec90935a238c58112e8119c34a70ba7c | #!/usr/bin/python
'''
A nearest neighbor learning algorithm example using TensorFlow library.
This example is using the MNIST database of handwritten digits
(http://yann.lecun.com/exdb/mnist/)
Author: Aymeric Damien
Project: https://github.com/aymericdamien/TensorFlow-Examples/
'''
from __future__ import print_functi... | [
"tensorflow.negative",
"tensorflow.summary.FileWriter",
"tensorflow.arg_min",
"tensorflow.placeholder",
"tensorflow.compat.v1.Session",
"tensorflow.global_variables_initializer",
"numpy.argmax",
"tensorflow.examples.tutorials.mnist.input_data.read_data_sets"
] | Tests/nearest_neighbor.py | [(19, 'tensorflow.examples.tutorials.mnist.input_data.read_data_sets', 'input_data.read_data_sets', (['"""/tmp/data/"""'], {'one_hot': '(True)'}), False, 'from tensorflow.examples.tutorials.mnist import input_data\n'), (26, 'tensorflow.placeholder', 'tf.placeholder', (['"""float"""', '[None, 784]'], {}), True, 'import ... |
gourav108/coreml | 6bc2d494dff23cff923368e735992a4f4a47483c | # Copyright 2017 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.concat",
"tensorflow.range",
"tensorflow.greater",
"tensorflow.shape",
"tensorflow.stack",
"tensorflow.zeros",
"tensorflow.control_dependencies",
"tensorflow.identity",
"tensorflow.expand_dims",
"tensorflow.assert_equal",
"tensorflow.unstack",
"tensorflow.map_fn",
"tensorflow.no_... | object_detection/utils/shape_utils.py | [(64, 'tensorflow.rank', 'tf.rank', (['t'], {}), True, 'import tensorflow as tf\n'), (65, 'tensorflow.shape', 'tf.shape', (['t'], {}), True, 'import tensorflow as tf\n'), (67, 'tensorflow.expand_dims', 'tf.expand_dims', (['(length - t_d0)', '(0)'], {}), True, 'import tensorflow as tf\n'), (131, 'tensorflow.shape', 'tf.... |
myelintek/tensorpack | 8d5ae5cc2cfcf2e4e53b4d1064ac9e727f736d09 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
# File: load-cpm.py
# Author: Yuxin Wu <ppwwyyxxc@gmail.com>
import cv2
import tensorflow as tf
import numpy as np
import argparse
from tensorpack import *
from tensorpack.utils import viz
from tensorpack.utils.argtools import memoized
"""
15 channels:
0-1 head, neck
2-4... | [
"tensorflow.image.resize_bilinear",
"tensorflow.random_normal_initializer",
"tensorflow.pad",
"numpy.load",
"numpy.exp",
"numpy.zeros"
] | examples/ConvolutionalPoseMachines/load-cpm.py | [(36, 'numpy.zeros', 'np.zeros', (['(368, 368)'], {'dtype': '"""float32"""'}), True, 'import numpy as np\n'), (50, 'tensorflow.pad', 'tf.pad', (['gmap', '[[0, 0], [0, 1], [0, 1], [0, 0]]'], {}), True, 'import tensorflow as tf\n'), (110, 'cv2.resize', 'cv2.resize', (['im', '(368, 368)'], {}), False, 'import cv2\n'), (11... |
myelintek/tensorpack | 8d5ae5cc2cfcf2e4e53b4d1064ac9e727f736d09 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: CycleGAN.py
# Author: Yuxin Wu <ppwwyyxxc@gmail.com>
import os
import argparse
import glob
from six.moves import range
from tensorpack import *
from tensorpack.tfutils.summary import add_moving_summary
from tensorpack.tfutils.scope_utils import auto_reuse_variabl... | [
"tensorflow.clip_by_value",
"tensorflow.nn.relu",
"tensorflow.get_variable",
"tensorflow.multiply",
"tensorflow.transpose",
"tensorflow.concat",
"tensorflow.summary.image",
"tensorflow.cast",
"tensorflow.add",
"tensorflow.name_scope",
"tensorflow.train.AdamOptimizer",
"tensorflow.square",
"t... | examples/GAN/CycleGAN.py | [(35, 'tensorflow.nn.relu', 'tf.nn.relu', (['x'], {'name': 'name'}), True, 'import tensorflow as tf\n'), (206, 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), False, 'import argparse\n'), (155, 'tensorpack.tfutils.summary.add_moving_summary', 'add_moving_summary', (['recon_loss_A', 'recon_loss_B', 'self... |
ryangillard/artificial_intelligence | f7c21af221f366b075d351deeeb00a1b266ac3e3 | import tensorflow as tf
from . import regularization
from .print_object import print_obj
class Discriminator(object):
"""Discriminator that takes image input and outputs logits.
Fields:
name: str, name of `Discriminator`.
kernel_regularizer: `l1_l2_regularizer` object, regularizar for kernel... | [
"tensorflow.multiply",
"tensorflow.concat",
"tensorflow.control_dependencies",
"tensorflow.reduce_mean",
"tensorflow.shape",
"tensorflow.less",
"tensorflow.reduce_any",
"tensorflow.reshape",
"tensorflow.minimum",
"tensorflow.random.uniform",
"tensorflow.reduce_sum",
"tensorflow.subtract",
"t... | machine_learning/gan/pgan/tf_pgan/pgan_module/trainer/discriminator.py | [(69, 'tensorflow.variable_scope', 'tf.variable_scope', ([], {'name_or_scope': 'self.name', 'reuse': 'tf.AUTO_REUSE'}), True, 'import tensorflow as tf\n'), (115, 'tensorflow.variable_scope', 'tf.variable_scope', ([], {'name_or_scope': 'self.name', 'reuse': 'tf.AUTO_REUSE'}), True, 'import tensorflow as tf\n'), (181, 't... |
ValentinMouret/probability | 7ea6cc55e5b3fed04372cd188cd0764e92fd3cf4 | # Copyright 2018 The TensorFlow Probability 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",
"tensorflow.matrix_transpose",
"tensorflow.name_scope",
"tensorflow.cholesky"
] | tensorflow_probability/python/distributions/mvn_full_covariance.py | [(159, 'tensorflow.name_scope', 'tf.name_scope', (['name'], {}), True, 'import tensorflow as tf\n'), (160, 'tensorflow.name_scope', 'tf.name_scope', (['"""init"""'], {'values': '[loc, covariance_matrix]'}), True, 'import tensorflow as tf\n'), (161, 'tensorflow_probability.python.internal.dtype_util.common_dtype', 'dtyp... |
rmunoz12/tensorpack | 60f4c6df7c4a27b553469352dd6ce73333db1ec6 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: tower.py
import tensorflow as tf
from six.moves import zip
from ..utils import logger
from ..utils.argtools import call_only_once
from ..utils.naming import MOVING_SUMMARY_OPS_KEY
from ..utils.develop import HIDE_DOC
from .collection import CollectionGuard
from .... | [
"tensorflow.variable_scope",
"tensorflow.get_default_graph",
"tensorflow.get_variable_scope",
"tensorflow.name_scope"
] | tensorpack/tfutils/tower.py | [(45, 'tensorflow.get_variable_scope', 'tf.get_variable_scope', ([], {}), True, 'import tensorflow as tf\n'), (134, 'tensorflow.get_variable_scope', 'tf.get_variable_scope', ([], {}), True, 'import tensorflow as tf\n'), (108, 'tensorflow.variable_scope', 'tf.variable_scope', (['self._vs_name'], {'reuse': 'reuse'}), Tru... |
Soum-Soum/Tensorflow_Face_Finder | fec6c15d2df7012608511ad87f4b55731bf99478 | # Copyright 2017 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... | [
"tensorflow.python.framework.tensor_shape.scalar",
"tensorflow.python.ops.array_ops.concat",
"tensorflow.python.ops.array_ops.shape",
"tensorflow.python.ops.array_ops.split",
"tensorflow.python.ops.array_ops.unstack",
"tensorflow.python.framework.ops.device",
"tensorflow.python.ops.array_ops.stack"
] | venv1/Lib/site-packages/tensorflow/contrib/boosted_trees/python/ops/batch_ops_utils.py | [(84, 'collections.OrderedDict', 'collections.OrderedDict', ([], {}), False, 'import collections\n'), (103, 'collections.OrderedDict', 'collections.OrderedDict', ([], {}), False, 'import collections\n'), (129, 'collections.defaultdict', 'collections.defaultdict', (['list'], {}), False, 'import collections\n'), (63, 'te... |
Soum-Soum/Tensorflow_Face_Finder | fec6c15d2df7012608511ad87f4b55731bf99478 | # Copyright 2016 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... | [
"tensorflow.python.ops.math_ops.greater_equal",
"tensorflow.python.ops.nn.softmax",
"tensorflow.python.ops.array_ops.shape",
"tensorflow.contrib.metrics.python.ops.metric_ops.streaming_mean",
"tensorflow.python.ops.array_ops.squeeze",
"tensorflow.python.ops.math_ops.to_float",
"tensorflow.contrib.losses... | venv1/Lib/site-packages/tensorflow/contrib/layers/python/layers/target_column.py | [(33, 'tensorflow.contrib.framework.deprecated', 'deprecated', (['"""2016-11-12"""', '"""This file will be removed after the deprecation date.Please switch to third_party/tensorflow/contrib/learn/python/learn/estimators/head.py"""'], {}), False, 'from tensorflow.contrib.framework import deprecated\n'), (63, 'tensorflow... |
clementpoiret/sparseml | 8442a6ef8ba11fb02f5e51472dd68b72438539b9 | # Copyright (c) 2021 - present / Neuralmagic, Inc. 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 b... | [
"tensorflow.contrib.slim.arg_scope",
"tensorflow.contrib.layers.l2_regularizer"
] | src/sparseml/tensorflow_v1/utils/nets_utils.py | [(111, 'functools.wraps', 'functools.wraps', (['func'], {}), False, 'import functools\n'), (208, 'sparseml.tensorflow_v1.utils.tf_compat.keras.initializers.glorot_normal', 'tf.keras.initializers.glorot_normal', ([], {}), True, 'from sparseml.tensorflow_v1.utils import tf_compat as tf\n'), (209, 'tensorflow.contrib.laye... |
GeniusDog/Intelligent-Projects-Using-Python | ca4650abb0c477b28a5698032835ea993cb08bd4 | from __future__ import print_function, division
#import scipy
import tensorflow as tf
import datetime
import matplotlib.pyplot as plt
#import sys
#from data_loader import DataLoader
import numpy as np
import os
import time
import glob
from scipy.misc import imread,imresize,imsave
import copy
import fire
from elapsedti... | [
"numpy.concatenate",
"tensorflow.nn.sigmoid_cross_entropy_with_logits",
"tensorflow.train.AdamOptimizer",
"tensorflow.summary.scalar",
"tensorflow.contrib.layers.conv2d_transpose",
"numpy.fliplr",
"tensorflow.nn.moments",
"tensorflow.truncated_normal_initializer",
"tensorflow.Session",
"tensorflow... | Chapter04/cycledGAN_edges_to_bags.py | [(19, 'scipy.misc.imread', 'imread', (['image_path[0]'], {}), False, 'from scipy.misc import imread, imresize, imsave\n'), (20, 'scipy.misc.imread', 'imread', (['image_path[1]'], {}), False, 'from scipy.misc import imread, imresize, imsave\n'), (40, 'numpy.concatenate', 'np.concatenate', (['(img_A, img_B)'], {'axis': '... |
SebastianJia/e2e-coref | 9a68d6816cfb4ac00bca9c83f587891239215dce | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import operator
import random
import math
import json
import threading
import numpy as np
import tensorflow as tf
import tensorflow_hub as hub
import h5py
import util
import coref_ops
import conll
im... | [
"tensorflow.get_variable",
"tensorflow.concat",
"tensorflow.zeros",
"tensorflow.reduce_sum",
"tensorflow.minimum",
"tensorflow.equal",
"tensorflow.global_variables",
"tensorflow.nn.bidirectional_dynamic_rnn",
"tensorflow.to_int32",
"tensorflow.reduce_logsumexp",
"tensorflow.Variable",
"tensorf... | coref_model.py | [(24, 'util.EmbeddingDictionary', 'util.EmbeddingDictionary', (["config['context_embeddings']"], {}), False, 'import util\n'), (25, 'util.EmbeddingDictionary', 'util.EmbeddingDictionary', (["config['head_embeddings']"], {'maybe_cache': 'self.context_embeddings'}), False, 'import util\n'), (27, 'util.load_char_dict', 'u... |
sakibguy/models | 662f392677be0e6822eb9852a57f06b3fd1513bf | # 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.cast",
"tensorflow.cos",
"tensorflow.where"
] | official/legacy/detection/modeling/learning_rates.py | [(48, 'tensorflow.where', 'tf.where', (['(global_step < warmup_steps)', 'linear_warmup', 'init_lr'], {}), True, 'import tensorflow as tf\n'), (73, 'tensorflow.cast', 'tf.cast', (['global_step'], {'dtype': 'tf.float32'}), True, 'import tensorflow as tf\n'), (83, 'tensorflow.where', 'tf.where', (['(global_step < warmup_s... |
ShuoZ9379/Integration_SIL_and_MBL | d7df6501a665d65eb791f7fd9b8e85fd660e6320 | import scipy.optimize
# import numpy as np
import autograd.numpy as np # Thinly-wrapped numpy
from autograd import grad
import tensorflow as tf
from baselines import logger
import baselines.common.tf_util as U
class EtaOmegaOptimizer(object):
"""
Finds eta and omega Lagrange multipliers.
"""
def __... | [
"tensorflow.matmul",
"tensorflow.matrix_inverse",
"tensorflow.gradients",
"tensorflow.matrix_determinant",
"tensorflow.placeholder"
] | baselines/n_copos/eta_omega_dual.py | [(125, 'baselines.logger.log', 'logger.log', (['"""optimizing dual"""'], {}), False, 'from baselines import logger\n'), (204, 'tensorflow.placeholder', 'tf.placeholder', ([], {'dtype': 'tf.float32', 'shape': '[]', 'name': '"""param_eta"""'}), True, 'import tensorflow as tf\n'), (205, 'tensorflow.placeholder', 'tf.place... |
aalbersk/DeepRec | f673a950780959b44dcda99398880a1d883ab338 | """
Copyright (c) 2021, NVIDIA 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 ... | [
"tensorflow.nn.compute_average_loss",
"tensorflow.Graph",
"tensorflow.local_variables_initializer",
"numpy.allclose",
"tensorflow.control_dependencies",
"tensorflow.constant",
"tensorflow.concat",
"tensorflow.gradients",
"tensorflow.keras.losses.BinaryCrossentropy",
"tensorflow.identity",
"numpy... | sparse_operation_kit/unit_test/test_scripts/tf1/test_sparse_emb_demo.py | [(55, 'sparse_operation_kit.Saver', 'sok.Saver', ([], {}), True, 'import sparse_operation_kit as sok\n'), (67, 'tensorflow.keras.losses.BinaryCrossentropy', 'tf.keras.losses.BinaryCrossentropy', ([], {'from_logits': '(True)', 'reduction': '"""none"""'}), True, 'import tensorflow as tf\n'), (97, 'utils.tf_dataset', 'uti... |
huangwenwenlili/imgclsmob | 1505fd61acbed429773f5c7ce286c858fc2278b8 | import numpy as np
import tensorflow as tf
from .tensorflowcv.model_provider import get_model
def save_model_params(sess,
file_path):
# assert file_path.endswith('.npz')
param_dict = {v.name: v.eval(sess) for v in tf.global_variables()}
np.savez_compressed(file_path, **param_dict)
... | [
"tensorflow.get_variable",
"tensorflow.global_variables",
"tensorflow.placeholder",
"numpy.savez_compressed",
"tensorflow.Session",
"tensorflow.variable_scope"
] | tensorflow_/utils.py | [(11, 'numpy.savez_compressed', 'np.savez_compressed', (['file_path'], {}), True, 'import numpy as np\n'), (36, 'tensorflow.placeholder', 'tf.placeholder', ([], {'dtype': 'tf.float32', 'shape': '(None, 3, input_image_size, input_image_size)', 'name': '"""xx"""'}), True, 'import tensorflow as tf\n'), (10, 'tensorflow.gl... |
MoonBlvd/TFSegmentation | baa874237289227c99163fe119448579904a231f | import tensorflow as tf
import numpy as np
from layers.utils import variable_summaries, variable_with_weight_decay
from utils.misc import timeit
from utils.misc import _debug
# import torchfile
import pickle
import pdb
class RESNET18:
"""
RESNET 18 Encoder class
"""
def __init__(self, x_input,
... | [
"tensorflow.cond",
"tensorflow.nn.max_pool",
"tensorflow.pad",
"tensorflow.nn.atrous_conv2d",
"tensorflow.nn.conv2d",
"tensorflow.get_collection",
"tensorflow.nn.moments",
"tensorflow.ones_initializer",
"tensorflow.contrib.layers.xavier_initializer",
"tensorflow.name_scope",
"tensorflow.trainabl... | models/encoders/resnet_18.py | [(94, 'tensorflow.add_to_collection', 'tf.add_to_collection', (['"""debug_layers"""', 'self.x_preprocessed'], {}), True, 'import tensorflow as tf\n'), (155, 'tensorflow.trainable_variables', 'tf.trainable_variables', ([], {}), True, 'import tensorflow as tf\n'), (156, 'tensorflow.get_collection', 'tf.get_collection', (... |
Mofokeng-C/rgz_rcnn_py3 | 00bb9a9179b74db5e3fe469f4249dc00c5c0edfc | # Modified by Chen Wu (chen.wu@icrar.org)
from fast_rcnn.config import cfg, get_output_dir
import argparse
from utils.timer import Timer
import numpy as np
import cv2
from utils.cython_nms import nms, nms_new
from utils.boxes_grid import get_boxes_grid
from utils.project_bbox import project_bbox_inv
import pickle
impo... | [
"tensorflow.get_variable",
"matplotlib.pyplot.imshow",
"numpy.minimum",
"tensorflow.RunMetadata",
"numpy.round",
"numpy.max",
"numpy.where",
"tensorflow.python.client.timeline.Timeline",
"numpy.hstack",
"matplotlib.pyplot.gca",
"numpy.unique",
"numpy.reshape",
"numpy.zeros",
"numpy.min",
... | lib/fast_rcnn/test.py | [(40, 'numpy.min', 'np.min', (['im_shape[0:2]'], {}), True, 'import numpy as np\n'), (41, 'numpy.max', 'np.max', (['im_shape[0:2]'], {}), True, 'import numpy as np\n'), (57, 'utils.blob.im_list_to_blob', 'im_list_to_blob', (['processed_ims'], {}), False, 'from utils.blob import im_list_to_blob\n'), (70, 'numpy.hstack',... |
WenjayDu/PocketFlow | 19ed4858b2fc914541032f74239ca08c0074c237 | # Tencent is pleased to support the open source community by making PocketFlow available.
#
# Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | [
"tensorflow.count_nonzero",
"tensorflow.control_dependencies",
"tensorflow.cast",
"tensorflow.variables_initializer",
"tensorflow.app.flags.DEFINE_string",
"numpy.mean",
"tensorflow.where",
"tensorflow.group",
"tensorflow.summary.scalar",
"tensorflow.Graph",
"tensorflow.app.flags.DEFINE_integer"... | learners/weight_sparsification/learner.py | [(32, 'tensorflow.app.flags.DEFINE_string', 'tf.app.flags.DEFINE_string', (['"""ws_save_path"""', '"""./models_ws/model.ckpt"""', '"""WS: model\'s save path"""'], {}), True, 'import tensorflow as tf\n'), (33, 'tensorflow.app.flags.DEFINE_float', 'tf.app.flags.DEFINE_float', (['"""ws_prune_ratio"""', '(0.75)', '"""WS: t... |
ryanbrand/mil | 6524047febe35fa59c356794f1649946332c4e7f | """ Utility functions for tensorflow. """
import tensorflow as tf
from tensorflow.python.framework import ops
from tensorflow.python.framework import tensor_shape
from tensorflow.python.framework import tensor_util
from tensorflow.python.ops import math_ops
from tensorflow.python.ops import random_ops
from tensorflow.... | [
"tensorflow.get_variable",
"numpy.sqrt",
"tensorflow.zeros",
"tensorflow.nn.max_pool",
"numpy.random.randn",
"tensorflow.nn.atrous_conv2d",
"tensorflow.nn.conv2d",
"tensorflow.squeeze",
"tensorflow.add",
"tensorflow.contrib.layers.xavier_initializer",
"tensorflow.square",
"tensorflow.random_no... | tf_utils.py | [(29, 'tensorflow.contrib.layers.xavier_initializer', 'tf.contrib.layers.xavier_initializer', ([], {'dtype': 'tf.float32'}), True, 'import tensorflow as tf\n'), (33, 'tensorflow.contrib.layers.xavier_initializer_conv2d', 'tf.contrib.layers.xavier_initializer_conv2d', ([], {'dtype': 'tf.float32'}), True, 'import tensorf... |
KarlKangYu/dcnn-pos-deps-head | 2ac6c16ea217517e4af79a84a4b0e223b2f62cd0 | import tensorflow as tf
import numpy as np
import math
# weights initializers
he_normal = tf.contrib.keras.initializers.he_normal()
#he_normal = tf.contrib.layers.variance_scaling_initializer()
regularizer = tf.contrib.layers.l2_regularizer(1e-4)
def Convolutional_Block(inputs, shortcut, num_filters, name, i... | [
"tensorflow.device",
"tensorflow.get_variable",
"tensorflow.concat",
"tensorflow.nn.softmax_cross_entropy_with_logits",
"tensorflow.contrib.keras.initializers.he_normal",
"tensorflow.cast",
"tensorflow.pad",
"tensorflow.nn.conv1d",
"tensorflow.nn.conv2d",
"tensorflow.layers.max_pooling1d",
"tens... | vdcnn.py | [(6, 'tensorflow.contrib.keras.initializers.he_normal', 'tf.contrib.keras.initializers.he_normal', ([], {}), True, 'import tensorflow as tf\n'), (8, 'tensorflow.contrib.layers.l2_regularizer', 'tf.contrib.layers.l2_regularizer', (['(0.0001)'], {}), True, 'import tensorflow as tf\n'), (63, 'tensorflow.pad', 'tf.pad', ([... |
Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | """Python wrappers around Brain.
This file is MACHINE GENERATED! Do not edit.
"""
import collections as _collections
from google.protobuf import text_format as _text_format
from tensorflow.core.framework import op_def_pb2 as _op_def_pb2
# Needed to trigger the call to _set_call_cpp_shape_fn.
from tensorflow.python... | [
"tensorflow.python.framework.ops.RegisterShape",
"tensorflow.python.framework.op_def_registry.register_op_list",
"tensorflow.core.framework.op_def_pb2.OpList",
"tensorflow.python.framework.op_def_library.OpDefLibrary"
] | Keras_tensorflow/source/tensorflow/python/framework/test_ops.py | [(149, 'collections.namedtuple', '_collections.namedtuple', (['"""TestStringOutput"""', '_test_string_output_outputs'], {}), True, 'import collections as _collections\n'), (34, 'tensorflow.python.framework.ops.RegisterShape', '_ops.RegisterShape', (['"""GraphDefVersion"""'], {}), True, 'from tensorflow.python.framework... |
lemoner20/tensorlayer | 69bd591f247b4a67f8968bd29c3660b22dbffae4 | import gym, random, time
import numpy as np
import tensorflow as tf
import tensorlayer as tl
from tensorlayer.layers import *
import matplotlib.pyplot as plt
""" Q-Network Q(a, s) - TD Learning, Off-Policy, e-Greedy Exploration (GLIE)
Q(S, A) <- Q(S, A) + alpha * (R + lambda * Q(newS, newA) - Q(S, A))
delta_w = R + l... | [
"tensorflow.random_uniform_initializer",
"tensorflow.placeholder",
"numpy.max",
"tensorflow.reset_default_graph",
"tensorflow.train.GradientDescentOptimizer",
"numpy.random.rand",
"tensorflow.Session",
"tensorflow.argmax",
"numpy.zeros"
] | example/tutorial_frozenlake_dqn.py | [(33, 'gym.make', 'gym.make', (['"""FrozenLake-v0"""'], {}), False, 'import gym, random, time\n'), (43, 'tensorflow.reset_default_graph', 'tf.reset_default_graph', ([], {}), True, 'import tensorflow as tf\n'), (46, 'tensorflow.placeholder', 'tf.placeholder', ([], {'shape': '[1, 16]', 'dtype': 'tf.float32'}), True, 'imp... |
OsbornHu/tensorflow-ml | 56c3051e7085a919a603481709b63e4a6614192a | #!/usr/bin/python2.7
# -*- coding:utf-8 -*-
# Author: NetworkRanger
# Date: 2018/12/22 下午4:06
# 10.3 TensorFlow的并发执行
# 1. 为了能够找到TensorFlow的什么操作正在使用什么设备,我们在计算图会话中传入一个config参数,将log_device_placement设为True。当我们在命令行运行脚本时,会看到指定设备输出
import tensorflow as tf
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
... | [
"tensorflow.matmul",
"tensorflow.device",
"tensorflow.constant",
"tensorflow.multiply",
"tensorflow.test.is_built_with_cuda",
"tensorflow.reshape",
"tensorflow.constant_initializer",
"tensorflow.ConfigProto",
"tensorflow.Session"
] | chapter10/demo_10.3.py | [(12, 'tensorflow.constant_initializer', 'tf.constant_initializer', (['[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]'], {'shape': '[2, 3]', 'name': '"""a"""'}), True, 'import tensorflow as tf\n'), (13, 'tensorflow.constant', 'tf.constant', (['[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]'], {'shape': '[3, 2]', 'name': '"""b"""'}), True, 'import ten... |
goan15910/ConvDet | 6404622cc9d0c8e8b756260c4979b6842b2d0cb0 |
"""YOLO-v2 model."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
import joblib
from utils import util
from easydict import EasyDict as edict
import numpy as np
import tensorflow as tf
from nn_skeleton import ModelSkeleton
class ... | [
"tensorflow.gfile.Exists",
"tensorflow.variable_scope"
] | src/nets/yolo_v2.py | [(22, 'nn_skeleton.ModelSkeleton.__init__', 'ModelSkeleton.__init__', (['self', 'mc'], {}), False, 'from nn_skeleton import ModelSkeleton\n'), (35, 'tensorflow.gfile.Exists', 'tf.gfile.Exists', (['self.mc.PRETRAINED_MODEL_PATH'], {}), True, 'import tensorflow as tf\n'), (38, 'joblib.load', 'joblib.load', (['self.mc.PRE... |
Siddhant085/tensorflow | 6f6161a0110d99b2655efc9d933b753dadadbc38 | # Copyright 2017 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.estimator.canned.head._binary_logistic_head_with_sigmoid_cross_entropy_loss",
"tensorflow.python.platform.gfile.MkDir",
"tensorflow.python.feature_column.feature_column_lib.numeric_column",
"tensorflow.contrib.learn.python.learn.estimators.run_config.RunConfig",
"tensorflow.contrib.booste... | tensorflow/contrib/boosted_trees/estimator_batch/estimator_test.py | [(36, 'tensorflow.python.framework.constant_op.constant', 'constant_op.constant', (['[[1], [0], [0]]'], {'dtype': 'dtypes.int32'}), False, 'from tensorflow.python.framework import constant_op\n'), (47, 'tensorflow.python.framework.constant_op.constant', 'constant_op.constant', (['[[0], [0], [1]]'], {'dtype': 'dtypes.in... |
adsar/tensorflow | b4b2575ec4bf7e6da2686505f61b5f16cb9273ab | # Copyright 2015 Google Inc. 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 or a... | [
"tensorflow.python.framework.tensor_shape.scalar",
"tensorflow.python.ops.gen_nn_ops._sparse_softmax_cross_entropy_with_logits",
"tensorflow.python.ops.array_ops.shape",
"tensorflow.python.ops.common_shapes.unchanged_shape_with_rank",
"tensorflow.python.ops.gen_nn_ops._softmax_cross_entropy_with_logits",
... | tensorflow/python/ops/nn_ops.py | [(266, 'tensorflow.python.framework.ops.RegisterShape', 'ops.RegisterShape', (['"""SparseSoftmaxCrossEntropyWithLogits"""'], {}), False, 'from tensorflow.python.framework import ops\n'), (277, 'tensorflow.python.framework.ops.RegisterShape', 'ops.RegisterShape', (['"""SoftmaxCrossEntropyWithLogits"""'], {}), False, 'fr... |
yanndupis/tf-encrypted | cfaea3ba87520f73979ed4e4f397eba3beb0a535 | import sys
import tensorflow as tf
import tf_encrypted as tfe
from convert import decode
if len(sys.argv) > 1:
# config file was specified
config_file = sys.argv[1]
config = tfe.RemoteConfig.load(config_file)
tfe.set_config(config)
tfe.set_protocol(tfe.protocol.Pond())
session_target = sys.argv[... | [
"tensorflow.matmul",
"tensorflow.nn.sigmoid",
"tensorflow.losses.sparse_softmax_cross_entropy",
"tensorflow.zeros",
"tensorflow.control_dependencies",
"tensorflow.data.TFRecordDataset",
"tensorflow.cast",
"tensorflow.gradients",
"tensorflow.global_variables_initializer",
"tensorflow.print",
"ten... | examples/federated-learning/run.py | [(151, 'tf_encrypted.define_output', 'tfe.define_output', (['model_owner.player_name', 'aggregated_model_grads', 'model_owner.update_model'], {}), True, 'import tf_encrypted as tfe\n'), (11, 'tf_encrypted.RemoteConfig.load', 'tfe.RemoteConfig.load', (['config_file'], {}), True, 'import tf_encrypted as tfe\n'), (12, 'tf... |
whfh3900/Tacotron-2-korea-example | 2799394f14e5d52bed2e5f7495bbd89e020a350a | import os
import threading
import time
import numpy as np
import tensorflow as tf
from datasets import audio
from infolog import log
from keras.utils import np_utils
from sklearn.model_selection import train_test_split
from .util import is_mulaw_quantize, is_scalar_input
_batches_per_group = 64
class Feeder:
""... | [
"tensorflow.device",
"numpy.expand_dims",
"tensorflow.FIFOQueue",
"numpy.clip",
"sklearn.model_selection.train_test_split",
"numpy.random.shuffle",
"tensorflow.placeholder",
"numpy.concatenate",
"numpy.transpose",
"numpy.array"
] | wavenet_vocoder/feeder.py | [(40, 'os.path.dirname', 'os.path.dirname', (['metadata_filename'], {}), False, 'import os\n'), (51, 'sklearn.model_selection.train_test_split', 'train_test_split', (['indices'], {'test_size': 'test_size', 'random_state': 'hparams.wavenet_data_random_state'}), False, 'from sklearn.model_selection import train_test_spli... |
Brian-ZhenLiu/CNN_models | 7cc646b181d86facf19b4129762504ea7b8f1409 | import tensorflow as tf
import os
#from PIL import Image
import random
import numpy as np
from datetime import datetime
from sklearn.metrics import confusion_matrix
from sklearn.metrics import classification_report
slim = tf.contrib.slim
global first
first = True
classnum=12
testnum = tf.placeholder(t... | [
"tensorflow.FixedLenFeature",
"tensorflow.cast",
"sklearn.metrics.confusion_matrix",
"numpy.concatenate",
"tensorflow.TFRecordReader",
"tensorflow.train.batch",
"sklearn.metrics.classification_report",
"tensorflow.decode_raw",
"tensorflow.ConfigProto",
"tensorflow.initialize_all_variables",
"ten... | Model_Code/train_dnn_002.py | [(16, 'tensorflow.placeholder', 'tf.placeholder', (['tf.int32'], {}), True, 'import tensorflow as tf\n'), (17, 'tensorflow.placeholder', 'tf.placeholder', (['tf.int32'], {}), True, 'import tensorflow as tf\n'), (18, 'tensorflow.placeholder', 'tf.placeholder', (['tf.int32'], {}), True, 'import tensorflow as tf\n'), (19,... |
Brian-ZhenLiu/CNN_models | 7cc646b181d86facf19b4129762504ea7b8f1409 | import tensorflow as tf
import os
#from PIL import Image
import random
import numpy as np
from datetime import datetime
from sklearn.metrics import confusion_matrix
from sklearn.metrics import classification_report
slim = tf.contrib.slim
global first
first = True
classnum=12
testnum = tf.placeholder(t... | [
"tensorflow.FixedLenFeature",
"tensorflow.cast",
"sklearn.metrics.confusion_matrix",
"numpy.concatenate",
"tensorflow.TFRecordReader",
"tensorflow.train.batch",
"sklearn.metrics.classification_report",
"tensorflow.decode_raw",
"tensorflow.ConfigProto",
"tensorflow.initialize_all_variables",
"ten... | Model_Code/train_dnn_004.py | [(16, 'tensorflow.placeholder', 'tf.placeholder', (['tf.int32'], {}), True, 'import tensorflow as tf\n'), (17, 'tensorflow.placeholder', 'tf.placeholder', (['tf.int32'], {}), True, 'import tensorflow as tf\n'), (18, 'tensorflow.placeholder', 'tf.placeholder', (['tf.int32'], {}), True, 'import tensorflow as tf\n'), (19,... |
danielgordon10/tensorflow | 395cfc42ee3c5842f5383f4049674c012998b133 | # Copyright 2016 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.contrib.distributions.python.ops.distribution_util.pick_vector",
"tensorflow.python.ops.math_ops.range",
"tensorflow.python.ops.array_ops.rank",
"tensorflow.python.ops.check_ops.assert_rank",
"tensorflow.python.ops.array_ops.concat",
"tensorflow.python.ops.array_ops.slice",
"tensorflow.pytho... | tensorflow/contrib/distributions/python/ops/shape.py | [(446, 'tensorflow.python.framework.ops.convert_to_tensor', 'ops.convert_to_tensor', (['x'], {'name': '"""x"""'}), False, 'from tensorflow.python.framework import ops\n'), (449, 'tensorflow.python.framework.tensor_util.constant_value', 'tensor_util.constant_value', (['x'], {}), False, 'from tensorflow.python.framework ... |
danielgordon10/tensorflow | 395cfc42ee3c5842f5383f4049674c012998b133 | # 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.get_variable",
"tensorflow.nn.dynamic_rnn",
"numpy.asarray",
"tensorflow.global_variables",
"tensorflow.train.AdamOptimizer",
"numpy.random.randint",
"tensorflow.nn.seq2seq.model_with_buckets",
"tensorflow.Graph",
"tensorflow.nn.seq2seq.one2many_rnn_seq2seq",
"tensorflow.get_collection... | tensorflow/python/kernel_tests/seq2seq_test.py | [(770, 'tensorflow.test.main', 'tf.test.main', ([], {}), True, 'import tensorflow as tf\n'), (586, 'tensorflow.set_random_seed', 'tf.set_random_seed', (['(111)'], {}), True, 'import tensorflow as tf\n'), (587, 'random.seed', 'random.seed', (['(111)'], {}), False, 'import random\n'), (588, 'numpy.random.seed', 'np.rando... |
vishwas1234567/tensor2tensor | d62e2ee1b069d3d9b327d4d2dd6f9e50b7e62bb3 | # coding=utf-8
# Copyright 2019 The Tensor2Tensor 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... | [
"numpy.log",
"tensorflow.Print",
"tensorflow.zeros",
"tensorflow.cast",
"tensorflow.floor",
"tensorflow.zeros_like",
"tensorflow.variable_scope",
"tensorflow.add_to_collection"
] | tensor2tensor/models/research/glow.py | [(32, 'tensor2tensor.utils.contrib.framework', 'contrib.framework', ([], {}), False, 'from tensor2tensor.utils import contrib\n'), (33, 'tensor2tensor.utils.contrib.framework', 'contrib.framework', ([], {}), False, 'from tensor2tensor.utils import contrib\n'), (42, 'tensor2tensor.layers.common_hparams.basic_params1', '... |
andreandradecosta/Adversarial_Autoencoder | 255a5cc021a46d9f8320a8608f15370d3e89e29e | import tensorflow as tf
import numpy as np
import datetime
import os
import argparse
import matplotlib.pyplot as plt
from matplotlib import gridspec
from tensorflow.examples.tutorials.mnist import input_data
# Get the MNIST data
mnist = input_data.read_data_sets('./Data', one_hot=True)
# Parameters
input_dim = 784
n_... | [
"tensorflow.nn.softmax_cross_entropy_with_logits",
"tensorflow.concat",
"tensorflow.cast",
"numpy.concatenate",
"numpy.random.randn",
"tensorflow.train.AdamOptimizer",
"tensorflow.summary.scalar",
"numpy.random.randint",
"numpy.reshape",
"numpy.arange",
"tensorflow.summary.image",
"numpy.eye",... | semi_supervised_adversarial_autoencoder.py | [(11, 'tensorflow.examples.tutorials.mnist.input_data.read_data_sets', 'input_data.read_data_sets', (['"""./Data"""'], {'one_hot': '(True)'}), False, 'from tensorflow.examples.tutorials.mnist import input_data\n'), (27, 'tensorflow.placeholder', 'tf.placeholder', ([], {'dtype': 'tf.float32', 'shape': '[batch_size, inpu... |
pcmoritz/analytics-zoo | 4d9f1eb6ccbf58d49dd5dce41b491c0f76107c31 | #
# 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.Graph",
"tensorflow.as_dtype",
"tensorflow.cast",
"tensorflow.placeholder",
"numpy.dtype",
"numpy.float32",
"tensorflow.get_default_graph",
"numpy.array",
"tensorflow.add_to_collection"
] | pyzoo/zoo/pipeline/api/net/tf_dataset.py | [(67, 'zoo.util.nest.flatten', 'nest.flatten', (['tensors'], {}), False, 'from zoo.util import nest\n'), (133, 'bigdl.util.common.get_node_and_core_number', 'get_node_and_core_number', ([], {}), False, 'from bigdl.util.common import get_node_and_core_number, callBigDlFunc\n'), (199, 'zoo.util.nest.flatten', 'nest.flatt... |
mabounassif/t3f | 28acf14812481f6a47ea6dbedeb55048e2e6203b | import numpy as np
import tensorflow as tf
from t3f.tensor_train import TensorTrain
from t3f.tensor_train_batch import TensorTrainBatch
from t3f.tensor_train_base import TensorTrainBase
from t3f import shapes
def _validate_input_parameters(is_tensor, shape, **params):
"""Internal function for validating input para... | [
"numpy.abs",
"numpy.sqrt",
"tensorflow.zeros",
"tensorflow.ones",
"tensorflow.eye",
"numpy.ones",
"numpy.concatenate",
"numpy.append",
"tensorflow.name_scope",
"numpy.any",
"numpy.prod",
"numpy.insert",
"numpy.array",
"numpy.vstack",
"tensorflow.random_normal"
] | t3f/initializers.py | [(84, 'numpy.array', 'np.array', (['shape'], {}), True, 'import numpy as np\n'), (87, 'numpy.ones', 'np.ones', (['(num_dims + 1)'], {}), True, 'import numpy as np\n'), (110, 'numpy.array', 'np.array', (['shape'], {}), True, 'import numpy as np\n'), (113, 'numpy.ones', 'np.ones', (['(num_dims + 1)'], {}), True, 'import ... |
mabounassif/t3f | 28acf14812481f6a47ea6dbedeb55048e2e6203b | import tensorflow as tf
from t3f.tensor_train_base import TensorTrainBase
from t3f import shapes
class TensorTrain(TensorTrainBase):
"""Represents a Tensor Train object (a TT-tensor or TT-matrix).
t3f represents a Tensor Train object as a tuple of TT-cores.
"""
def __init__(self, tt_cores, shape=None, tt_r... | [
"tensorflow.convert_to_tensor",
"tensorflow.TensorShape",
"tensorflow.matmul",
"tensorflow.einsum",
"tensorflow.name_scope"
] | t3f/tensor_train.py | [(157, 't3f.shapes.clean_raw_shape', 'shapes.clean_raw_shape', (['shape'], {}), False, 'from t3f import shapes\n'), (215, 'tensorflow.TensorShape', 'tf.TensorShape', (['tt_ranks'], {}), True, 'import tensorflow as tf\n'), (51, 't3f.shapes.clean_raw_shape', 'shapes.clean_raw_shape', (['shape'], {}), False, 'from t3f imp... |
leopauly/Observation-Learning-Simulations | 462c04a87c45aae51537b8ea5b44646afa31d3a5 | import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow import gfile
import imageio
import pickle
import scipy.misc
import sys
from IPython.display import HTML
import imageio
import argparse
def transform(image, resize_height=36, resize_width=64):
cropped_image = scipy.misc.imres... | [
"tensorflow.concat",
"tensorflow.nn.conv2d_transpose",
"tensorflow.nn.l2_loss",
"tensorflow.train.AdamOptimizer",
"tensorflow.nn.conv2d",
"numpy.arange",
"tensorflow.nn.moments",
"tensorflow.nn.deconv2d",
"tensorflow.truncated_normal_initializer",
"tensorflow.ConfigProto",
"tensorflow.reset_defa... | ablations_code/ablations.py | [(20, 'tensorflow.maximum', 'tf.maximum', (['x', '(leak * x)'], {}), True, 'import tensorflow as tf\n'), (488, 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Run ablations on models"""'}), False, 'import argparse\n'), (497, 'numpy.load', 'np.load', (['args.data_location'], {}), True, 'im... |
jaesik817/svpg_tensorflow | ef8323af45bcb4f7c06588b4ee4ac8ec478b6027 | import gym
import itertools
import matplotlib
import numpy as np
import sys
import tensorflow as tf
import collections
import sklearn.pipeline
import sklearn.preprocessing
from sklearn.kernel_approximation import RBFSampler
from svpg import SVPG
###################
# parameters
###################
ENV_NAME="Mountai... | [
"numpy.mean",
"tensorflow.train.AdamOptimizer",
"tensorflow.Variable",
"numpy.reshape",
"tensorflow.layers.dense",
"tensorflow.subtract",
"tensorflow.reset_default_graph",
"tensorflow.contrib.distributions.Normal",
"tensorflow.Session",
"tensorflow.random_normal_initializer",
"numpy.zeros",
"s... | svpg_cont_action/tmp.py | [(47, 'numpy.zeros', 'np.zeros', (['n_particles'], {'dtype': 'object'}), True, 'import numpy as np\n'), (358, 'tensorflow.reset_default_graph', 'tf.reset_default_graph', ([], {}), True, 'import tensorflow as tf\n'), (360, 'tensorflow.Variable', 'tf.Variable', (['(0)'], {'name': '"""global_step"""', 'trainable': '(False... |
TheSeriousProgrammer/Keras_QuickNet_SSD | 30c3c7ac8a2c05cc60fb4635a3f954c45e46108a | from typing import List
import itertools
import collections
import tensorflow as tf
import numpy as np
from utils.misc import *
SSDBoxSizes = collections.namedtuple('SSDBoxSizes', ['min', 'max'])
SSDSpec = collections.namedtuple('SSDSpec', ['feature_map_size', 'shrinkage', 'box_sizes', 'aspect_ratios'])
d... | [
"tensorflow.convert_to_tensor",
"tensorflow.math.argmax",
"tensorflow.constant",
"numpy.sqrt",
"numpy.clip",
"tensorflow.math.reduce_max",
"tensorflow.less",
"tensorflow.shape",
"tensorflow.ones_like",
"tensorflow.expand_dims",
"tensorflow.gather",
"numpy.array"
] | utils/priors.py | [(8, 'collections.namedtuple', 'collections.namedtuple', (['"""SSDBoxSizes"""', "['min', 'max']"], {}), False, 'import collections\n'), (10, 'collections.namedtuple', 'collections.namedtuple', (['"""SSDSpec"""', "['feature_map_size', 'shrinkage', 'box_sizes', 'aspect_ratios']"], {}), False, 'import collections\n'), (77... |
lshengjian/rlstudy | 263bf68c94867551002ff0b02441c67b02ebe8ef | import numpy as np
import tensorflow as tf
#from gym import Discrete
from rlstudy.common.utils import conv, fc, conv_to_fc, batch_to_seq, seq_to_batch
from rlstudy.common.distributions import make_pdtype
#from rlstudy.common.input import observation_input
from gym.spaces import Discrete, Box
def nature_cnn(unscaled_im... | [
"numpy.sqrt",
"tensorflow.cast",
"tensorflow.placeholder",
"tensorflow.one_hot",
"tensorflow.to_float",
"tensorflow.variable_scope"
] | rlstudy/a2c/policies.py | [(19, 'rlstudy.common.utils.conv_to_fc', 'conv_to_fc', (['h3'], {}), False, 'from rlstudy.common.utils import conv, fc, conv_to_fc, batch_to_seq, seq_to_batch\n'), (13, 'tensorflow.cast', 'tf.cast', (['unscaled_images', 'tf.float32'], {}), True, 'import tensorflow as tf\n'), (24, 'rlstudy.common.distributions.make_pdty... |
derdav3/tf-sparql | 6d3fe6e3b6824a4cd5468a243829b71f5b0952f2 | # Copyright 2016 Google Inc.
#
# 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.contrib.layers.python.layers.utils.constant_value",
"tensorflow.logging.warning",
"tensorflow.nn.batch_normalization",
"tensorflow.get_variable",
"tensorflow.python.training.moving_averages.assign_moving_average",
"tensorflow.zeros_initializer",
"tensorflow.nn.normalize_moments",
"tensorfl... | ml_models/nn/batch_norm.py | [(119, 'nn.util.check_initializers', 'util.check_initializers', (['initializers', 'self.POSSIBLE_INITIALIZER_KEYS'], {}), False, 'from nn import util\n'), (195, 'tensorflow.contrib.layers.python.layers.utils.smart_cond', 'utils.smart_cond', (['use_batch_stats', 'build_batch_stats', 'build_moving_stats'], {}), False, 'f... |
1212Prajwol-Pdl/SmartProcessAnalytics | b25b6e922e19cc61cfb9eb96395ad177af1daf71 | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 23 17:52:31 2019
@author: Weike (Vicky) Sun vickysun@mit.edu/weike.sun93@gmail.com
(c) 2020 Weike Sun, all rights reserved
"""
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 4 09:15:46 2018
@author: weiksun
@comment: this file conta... | [
"tensorflow.nn.dynamic_rnn",
"tensorflow.get_variable",
"tensorflow.reduce_sum",
"numpy.squeeze",
"tensorflow.nn.l2_loss",
"tensorflow.contrib.rnn.BasicRNNCell",
"tensorflow.train.AdamOptimizer",
"numpy.size",
"tensorflow.reset_default_graph",
"numpy.insert",
"tensorflow.Session",
"tensorflow.... | Code-SPA/RNN_feedback.py | [(35, 'numpy.zeros', 'np.zeros', (['[batch_size, batch_partition_length, dx]'], {'dtype': 'np.float32'}), True, 'import numpy as np\n'), (36, 'numpy.zeros', 'np.zeros', (['[batch_size, batch_partition_length, dy]'], {'dtype': 'np.float32'}), True, 'import numpy as np\n'), (37, 'numpy.zeros', 'np.zeros', (['[batch_size,... |
brandondutra/cloudml-samples | 3d483593c070c4acd4a9648dbfd7db2be6524583 | #!/usr/bin/env python
#
# Copyright 2018 Google Inc. 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.python.saved_model.loader.load",
"tensorflow.python.framework.ops.Graph",
"tensorflow.Session"
] | molecules/predict.py | [(105, 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), False, 'import argparse\n'), (153, 'apache_beam.options.pipeline_options.PipelineOptions', 'PipelineOptions', (['pipeline_args'], {}), False, 'from apache_beam.options.pipeline_options impor... |
blahster/tf-models | eaa4a000ef8e5f094764c42a590bb1c49b7b6f7c | # 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.device",
"tensorflow.concat",
"tensorflow.gfile.DeleteRecursively",
"tensorflow.gfile.Exists",
"tensorflow.global_variables",
"tensorflow.train.ExponentialMovingAverage",
"tensorflow.gfile.MakeDirs",
"tensorflow.app.flags.DEFINE_string",
"tensorflow.app.flags.DEFINE_boolean",
"tensorfl... | tutorials/image/cifar10/cifar10_multi_gpu_train.py | [(54, 'tensorflow.app.flags.DEFINE_string', 'tf.app.flags.DEFINE_string', (['"""train_dir"""', '"""/tmp/cifar10_train"""', '"""Directory where to write event logs and checkpoint."""'], {}), True, 'import tensorflow as tf\n'), (57, 'tensorflow.app.flags.DEFINE_integer', 'tf.app.flags.DEFINE_integer', (['"""max_steps"""'... |
smarthi/tensorflow | 55b01593515817992821423fec19733bca91c918 | # Copyright 2016 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.contrib.learn.python.learn.datasets.base.Datasets",
"tensorflow.python.platform.gfile.Exists",
"tensorflow.contrib.learn.python.learn.datasets.base.load_csv_without_header",
"tensorflow.contrib.learn.python.learn.datasets.base.shrink_csv",
"tensorflow.contrib.learn.python.learn.datasets.base.may... | tensorflow/contrib/learn/python/learn/datasets/text_datasets.py | [(35, 'os.path.join', 'os.path.join', (['data_dir', '"""dbpedia_csv/train.csv"""'], {}), False, 'import os\n'), (36, 'os.path.join', 'os.path.join', (['data_dir', '"""dbpedia_csv/test.csv"""'], {}), False, 'import os\n'), (64, 'tensorflow.contrib.learn.python.learn.datasets.base.load_csv_without_header', 'base.load_csv... |
smarthi/tensorflow | 55b01593515817992821423fec19733bca91c918 | # Copyright 2016 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.contrib.layers.python.layers.feature_column.embedding_column",
"tensorflow.python.training.ftrl.FtrlOptimizer",
"tensorflow.python.training.server_lib.ClusterSpec",
"tensorflow.contrib.learn.python.learn.datasets.base.load_iris",
"tensorflow.contrib.layers.python.layers.feature_column.sparse_col... | tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined_benchmark_test.py | [(225, 'tensorflow.python.platform.test.main', 'test.main', ([], {}), False, 'from tensorflow.python.platform import test\n'), (58, 'tensorflow.contrib.learn.python.learn.estimators.estimator_test_utils.assert_in_range', 'estimator_test_utils.assert_in_range', (['(0.9)', '(1.0)', '"""auc"""', 'metrics'], {}), False, 'f... |
thodan/epos | d67657bbb06da5a6adb8a035a2f58fc305e396f7 | # 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 applicable ... | [
"tensorflow.multiply",
"tensorflow.nn.sigmoid",
"tensorflow.transpose",
"tensorflow.reduce_mean",
"tensorflow.truncated_normal_initializer",
"tensorflow.squeeze",
"tensorflow.variable_scope",
"tensorflow.tile"
] | external/slim/nets/s3dg.py | [(31, 'tensorflow.truncated_normal_initializer', 'tf.truncated_normal_initializer', (['(0.0)', 'stddev'], {}), True, 'import tensorflow as tf\n'), (132, 'tensorflow.tile', 'tf.tile', (['weights', 'tile_multiples'], {}), True, 'import tensorflow as tf\n'), (133, 'tensorflow.nn.sigmoid', 'tf.nn.sigmoid', (['weights'], {}... |
okojoalg/Creative-Adversarial-Networks | 7f06f395b9f317f9235dc8c60c7b385cd6530471 | # Copyright 2016 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.reshape",
"tensorflow.compat.v1.variable_scope",
"tensorflow.expand_dims"
] | slim/nets/dcgan.py | [(33, 'math.log', 'log', (['width', '(2)'], {}), False, 'from math import log\n'), (82, 'tensorflow.compat.v1.variable_scope', 'tf.compat.v1.variable_scope', (['scope'], {'values': '[inputs]', 'reuse': 'reuse'}), True, 'import tensorflow as tf\n'), (149, 'math.log', 'log', (['final_size', '(2)'], {}), False, 'from math... |
dhirajpatnaik16297/text-gan-tensorflow | fb9897ee55e8d674a16c6041a2c1fb67abad131b | """ TensorFlow Layers
Convenience functions but Input and Output should be tensors.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from tensorflow.contrib import seq2seq
_phase = tf.Variable(False, name='phase', trainable=Fals... | [
"tensorflow.convert_to_tensor",
"tensorflow.cond",
"tensorflow.nn.dynamic_rnn",
"tensorflow.zeros",
"tensorflow.reduce_sum",
"tensorflow.cast",
"tensorflow.orthogonal_initializer",
"tensorflow.nn.sigmoid_cross_entropy_with_logits",
"tensorflow.contrib.rnn.BasicRNNCell",
"tensorflow.make_template",... | layers.py | [(13, 'tensorflow.Variable', 'tf.Variable', (['(False)'], {'name': '"""phase"""', 'trainable': '(False)', 'collections': '[tf.GraphKeys.LOCAL_VARIABLES]'}), True, 'import tensorflow as tf\n'), (25, 'tensorflow.floor', 'tf.floor', (['random_tensor'], {}), True, 'import tensorflow as tf\n'), (32, 'tensorflow.convert_to_t... |
aglitoiu/pennylane | fd99be754d55bbb919aadbbbdff70e40fbe3bcbf | # Copyright 2018-2021 Xanadu Quantum Technologies Inc.
# 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... | [
"tensorflow.keras.backend.floatx",
"tensorflow.__version__.split",
"tensorflow.TensorShape",
"tensorflow.unstack",
"tensorflow.shape",
"tensorflow.stack"
] | pennylane/qnn/keras.py | [(236, 'inspect.signature', 'inspect.signature', (['qnode.func'], {}), False, 'import inspect\n'), (286, 'tensorflow.unstack', 'tf.unstack', (['inputs'], {}), True, 'import tensorflow as tf\n'), (288, 'tensorflow.stack', 'tf.stack', (['reconstructor'], {}), True, 'import tensorflow as tf\n'), (24, 'tensorflow.__version... |
shengfuintel/tensorflow | 5828e285209ff8c3d1bef2e4bd7c55ca611080d5 | # Copyright 2016 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.ops.device",
"tensorflow.python.ops.rnn_cell.LSTMCell",
"tensorflow.contrib.rnn.python.ops.lstm_ops.LSTMBlockCell",
"tensorflow.python.ops.control_flow_ops.group",
"tensorflow.contrib.rnn.python.ops.core_rnn.static_rnn",
"tensorflow.python.framework.ops.get_collection",
"ten... | tensorflow/contrib/cudnn_rnn/python/kernel_tests/cudnn_rnn_ops_benchmark.py | [(176, 'tensorflow.python.platform.test.main', 'test.main', ([], {}), False, 'from tensorflow.python.platform import test\n'), (75, 'tensorflow.python.client.session.Session', 'session.Session', ([], {}), False, 'from tensorflow.python.client import session\n'), (76, 'tensorflow.python.ops.variables.global_variables_in... |
FeynmanDNA/singa-auto | e96982adc689335a323a5a32d03b23942e01d09f | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | [
"tensorflow.get_variable",
"tensorflow.concat",
"tensorflow.contrib.keras.initializers.he_normal",
"tensorflow.control_dependencies",
"numpy.asarray",
"tensorflow.stack",
"tensorflow.nn.max_pool",
"tensorflow.global_variables",
"tensorflow.equal",
"tensorflow.cast",
"tensorflow.minimum",
"tens... | examples/models/image_classification/TfEnas.py | [(37, 'collections.namedtuple', 'namedtuple', (['"""_Model"""', "['train_dataset_init_op', 'pred_dataset_init_op', 'train_op', 'summary_op',\n 'pred_probs', 'pred_corrects', 'train_corrects', 'step',\n 'vars_assign_op', 'ph', 'var_phs']"], {}), False, 'from collections import namedtuple\n'), (41, 'collections.nam... |
vikatelis/baselines | 668abf167f54317dca7795588c61f1055a4d017f | import os
import numpy as np
import tensorflow as tf
from collections import deque
def sample(logits):
noise = tf.random_uniform(tf.shape(logits))
return tf.argmax(logits - tf.log(-tf.log(noise)), 1)
def cat_entropy(logits):
a0 = logits - tf.reduce_max(logits, 1, keepdims=True)
ea0 = tf.exp(a0)
z0... | [
"tensorflow.concat",
"tensorflow.reduce_sum",
"tensorflow.stack",
"tensorflow.tanh",
"numpy.mean",
"tensorflow.nn.conv2d",
"numpy.linalg.svd",
"numpy.reshape",
"tensorflow.nn.moments",
"tensorflow.squeeze",
"tensorflow.square",
"tensorflow.trainable_variables",
"tensorflow.matmul",
"tensor... | baselines/a2c/utils.py | [(12, 'tensorflow.exp', 'tf.exp', (['a0'], {}), True, 'import tensorflow as tf\n'), (13, 'tensorflow.reduce_sum', 'tf.reduce_sum', (['ea0', '(1)'], {'keepdims': '(True)'}), True, 'import tensorflow as tf\n'), (89, 'tensorflow.split', 'tf.split', ([], {'axis': '(1)', 'num_or_size_splits': '(2)', 'value': 's'}), True, 'i... |
Shyonokaze/FCN_STEM | 5ffb4f4bcea12646694e48246b7c2b0566cc120a | from __future__ import print_function
import tensorflow as tf
import numpy as np
import TensorflowUtils as utils
import read_MITSceneParsingData as scene_parsing
import datetime
import BatchDatsetReader as dataset
from six.moves import xrange
import os.path as osp
FLAGS = tf.flags.FLAGS
tf.flags.DEFINE_integer("batc... | [
"tensorflow.stack",
"numpy.squeeze",
"tensorflow.cast",
"numpy.mean",
"tensorflow.train.AdamOptimizer",
"tensorflow.flags.DEFINE_float",
"tensorflow.summary.scalar",
"tensorflow.summary.image",
"tensorflow.squeeze",
"tensorflow.add",
"tensorflow.Session",
"tensorflow.trainable_variables",
"t... | FCN.py | [(14, 'tensorflow.flags.DEFINE_integer', 'tf.flags.DEFINE_integer', (['"""batch_size"""', '"""2"""', '"""batch size for training"""'], {}), True, 'import tensorflow as tf\n'), (15, 'tensorflow.flags.DEFINE_string', 'tf.flags.DEFINE_string', (['"""logs_dir"""', '"""E:\\\\work\\\\01-Myproject\\\\imag_division\\\\FCN.tens... |
larsmaaloee/BIVA | e47201113d779c6ea1245875714101b2bbfcbdae |
import tensorflow as tf
import warnings
def conv2d(x, dim=(32, [3, 3], [1, 1]), pad='SAME', scope="conv2d", training=True, ema=None, init=False, bias_initializer=tf.constant_initializer(0.)):
num_filters, filter_size, stride = dim
with tf.variable_scope(scope):
V = tf.get_variable('V', shape=list(fil... | [
"tensorflow.get_variable",
"tensorflow.reduce_sum",
"tensorflow.layers.dropout",
"tensorflow.nn.moments",
"tensorflow.square",
"tensorflow.random_normal_initializer",
"tensorflow.nn.l2_normalize",
"tensorflow.matmul",
"tensorflow.shape",
"tensorflow.exp",
"tensorflow.nn.tanh",
"tensorflow.redu... | layers/_neural.py | [(6, 'tensorflow.constant_initializer', 'tf.constant_initializer', (['(0.0)'], {}), True, 'import tensorflow as tf\n'), (70, 'tensorflow.split', 'tf.split', (['out', '(2)', '(3)'], {}), True, 'import tensorflow as tf\n'), (71, 'tensorflow.sigmoid', 'tf.sigmoid', (['h_stack2'], {}), True, 'import tensorflow as tf\n'), (... |
zhengknight/tensorpack | 726747313fb2f189dd195d32087897b16a23be0a | # -*- coding: utf-8 -*-
# File: optimizer.py
import tensorflow as tf
from contextlib import contextmanager
from .gradproc import FilterNoneGrad, GradientProcessor
__all__ = ['apply_grad_processors', 'ProxyOptimizer',
'PostProcessOptimizer', 'VariableAssignmentOptimizer',
'AccumGradOptimizer']
... | [
"tensorflow.cond",
"tensorflow.get_variable",
"tensorflow.assign_add",
"tensorflow.control_dependencies",
"tensorflow.Variable",
"tensorflow.assign",
"tensorflow.mod",
"tensorflow.global_variables_initializer",
"tensorflow.zeros_like",
"tensorflow.train.GradientDescentOptimizer",
"tensorflow.nam... | tensorpack/tfutils/optimizer.py | [(207, 'tensorflow.get_variable', 'tf.get_variable', (['"""x"""'], {'shape': '[6]'}), True, 'import tensorflow as tf\n'), (209, 'tensorflow.train.GradientDescentOptimizer', 'tf.train.GradientDescentOptimizer', (['(0.01)'], {}), True, 'import tensorflow as tf\n'), (213, 'tensorflow.Session', 'tf.Session', ([], {}), True... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.