tensorflow

AttributeError: 'NoneType' object has no attribute '_inbound_nodes' Keras

给你一囗甜甜゛ 提交于 2021-01-27 18:51:19
问题 from Config import Config from FaceDetection.MTCNNDetect import MTCNNDetect import cv2 import tensorflow as tf import keras from keras import backend as K from keras.layers import Input, Lambda, Dense, Dropout, Convolution2D, MaxPooling2D, Flatten, Concatenate, concatenate from keras.models import Model face_detect = MTCNNDetect(model_path=Config.MTCNN_MODEL) from FaceRecognition.TensorflowGraph import FaceRecGraph from src.FaceAlignment import AlignCustom from FaceRecognition.FaceFeature

InvalidArgumentError: Received a label value of 8825 which is outside the valid range of [0, 8825) SEQ2SEQ model

这一生的挚爱 提交于 2021-01-27 18:48:30
问题 I have been trying to build RNN with Seq2Seq model from Udemy course called DeepLearning_NLP_Chatbot, and I followed him step by step, but I face when training an error: InvalidArgumentError : Received a label value of 8825 which is outside the valid range of [0, 8825). The dataset here. here is the data procesing dataset # Building a Chatbot with Deep NLP. # Importing the libraries. import numpy as np import tensorflow as tf import re import time # ---Data Processing---# #-------------------

Tensorflow every iteration of for loop gets slower and slower

别来无恙 提交于 2021-01-27 17:37:26
问题 I'm doing some evaluation for my algorithm where I'm comparing some generated images to a ground truth image by computing 3 different types of loss between the two images. The logic of the code is: I loop over all ground truth images For each ground truth image, I loop over the relevant generated images and check each against the ground truth image by computing 3 losses The running time of the code is increasing for each iteration as seen below. This makes it so the code can't finish running

Using weights initializer with tf.nn.conv2d

两盒软妹~` 提交于 2021-01-27 16:43:33
问题 When using tf.layers.conv2d , setting the initializer is easy, it can be done through its parameter. But what if I use tf.nn.conv2d ? I use this code. Is this equivalent to setting the kernel_initializer parameter in tf.layers.conv2d ? Although the program runs without errors, I don't know how to verify whether it does what it is expected do. with tf.name_scope('conv1_2') as scope: kernel = tf.get_variable(initializer=tf.contrib.layers.xavier_initializer(), shape=[3, 3, 32, 32], name='weights

Using weights initializer with tf.nn.conv2d

↘锁芯ラ 提交于 2021-01-27 16:38:07
问题 When using tf.layers.conv2d , setting the initializer is easy, it can be done through its parameter. But what if I use tf.nn.conv2d ? I use this code. Is this equivalent to setting the kernel_initializer parameter in tf.layers.conv2d ? Although the program runs without errors, I don't know how to verify whether it does what it is expected do. with tf.name_scope('conv1_2') as scope: kernel = tf.get_variable(initializer=tf.contrib.layers.xavier_initializer(), shape=[3, 3, 32, 32], name='weights

How to restore tensorflow v1.1.0 saved model in v1.13.1

你离开我真会死。 提交于 2021-01-27 16:08:46
问题 I'm trying to restore the pretrained model provided here and continue training on a different dataset. The pretrained models available there are trained on tensorflow_gpu-1.1.0. But I have tensorflow_gpu-1.13.1 . When I try restoring the model, I get the below error. NotFoundError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph

for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known

泪湿孤枕 提交于 2021-01-27 15:18:29
问题 On Kaggle, I am making a classifier for the MNIST dataset. For that, I followed the instructions from here. import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) import tensorflow as tf # Input data files are available in the "../input/" directory. # For example, running this (by clicking run or pressing Shift+Enter) will list the files in the input directory from subprocess import check_output print(check_output(["ls", "../input"]).decode(

How to restore tensorflow v1.1.0 saved model in v1.13.1

泄露秘密 提交于 2021-01-27 15:11:45
问题 I'm trying to restore the pretrained model provided here and continue training on a different dataset. The pretrained models available there are trained on tensorflow_gpu-1.1.0. But I have tensorflow_gpu-1.13.1 . When I try restoring the model, I get the below error. NotFoundError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph

DataType float32 for attr 'T' not in list of allowed values: int32, int64

孤街浪徒 提交于 2021-01-27 14:30:21
问题 I have considered these two posts(this and this), but they are not my problem and solution. I have the following code to create a feed forward network in tf: step = 500 fromState = 0 toState = 5000000 numOfState = (toState - fromState) / step numOfAction = 11 tf.reset_default_graph() inputs1 = tf.placeholder(shape=[1,numOfState], dtype = tf.float32) W = tf.Variable(tf.random_uniform([numOfState,4],0,0.01),) Qout = tf.matmul(inputs1,W) predict = tf.argmax(Qout,1) However, I've got the

bazel build tensorflow serving using with local downloaded tensorflow

删除回忆录丶 提交于 2021-01-27 14:10:14
问题 the tensorflow serving build denpend on large tensorflow; but i already build tensorflow successfully. so i want to use it. I do these things: I change the tensorflow serving WORKSPACE(org: https://github.com/tensorflow/serving/blob/master/WORKSPACE) workspace(name = "tf_serving") # To update TensorFlow to a new revision. # 1. Update the 'git_commit' args below to include the new git hash. # 2. Get the sha256 hash of the archive with a command such as... # curl -L https://github.com