Questions tagged [tflearn]

1

votes
0

answer
1k

Views

InvalidArgumentError: Retval[0] does not have value is Thrown when Using tflearn Trainer

I followed this example on using tflearn trainer and coded this: image_paths, labels = dataset_utils.read_dataset_list('../test/dummy_labels_file.txt') data_dir = '../test/dummy_data/' images = dataset_utils.read_images(data_dir=data_dir, image_paths=image_paths, image_extension='png') print('Done r...
Rocket Pingu
1

votes
2

answer
101

Views

Cannot feed value of shape (64, 7) for Tensor 'targets/Y:0', which has shape '(?,)'

I'm working on Kaggle's fer2013 dataset. Here's a link to the dataset. I'm using TFLearn framework, I convert the Labels(7 class labels) to hot_shot and everything works fine until I run it in the networks and I get the error: Cannot feed value of shape (64, 7) for Tensor 'targets/Y:0', which has...
Mahmoud S. Ahmed
1

votes
1

answer
98

Views

TFLearn RNN output is always constant - New to TFLearn

GOAL: I am trying to develop a NN model that is capable of learning some unknown non-linear quadcopter drone dynamics. The end purpose is for this model to be used inside of a Genetic Algorithm tool I wrote that will tune my drone's control system to achieve a desired response. The GA needs a 'blac...
Brandon Braun
1

votes
0

answer
212

Views

TF Learn & TF: Which output node to use when freezing a graph? - Python

I currently have a binary image classifier. This is for my undergraduate dissertation, so any help would be very much appreciated. The model performs well when I am loading and using the model as the '.model' file within the kernel. What I want, is to freeze the graph and deploy the classifier to a...
Aaron
1

votes
1

answer
84

Views

Binary classification, prediction is 0

I am training to create CNN to play geometry dash. I use AlexNet, which is little bit modified to produce output between -1 to 1. When output> 0 then it should jump. When output< 0 then it should do nothing. My training data are 80x60 gray images pair with value -1 or 1 , which indicates, what it sh...
lukas kiss
1

votes
1

answer
29

Views

Training and validation samples are not what I have

I'm having a weird issue. I'm trying to train a convolutional neural network (CNN) using 376 images. I have set around 80% of the images for training and around 20% for validation, as follows: train = train_data[:300] test = train_data[300:] When I run the program however, I get the following: Train...
Simplicity
1

votes
0

answer
100

Views

Index is out of bounds when training a CNN

So I have gathered a dataset of 100,000 inputs which consist of in-game frames (element [0]) and movements by the player (element [1]) (W, A, D). This dataset will be used to train a convolutional neural network, so an 'AI' would be able to navigate throughout the environment on its own. The dataset...
hurkaperpa
1

votes
0

answer
843

Views

Running out of memory in Keras with smaller CNN

Hello everyone I'm having a weird problem. I got data that is the image and the output which is the joystick info and keyboard. The model that I don't have problems running out of memory(and crashing) is inception_v3 which is so much complex than a simple CNN(for that reason I think it's weird). htt...
Manu
1

votes
0

answer
61

Views

tflearn - fasttext word vector error in embedding layer

I am using fasttext word embeddings to create word vectors for sentences for a sentiment analysis binary classifier. Fasttext vectors have both negative and positive numbers. My embedding layer is net = embedding(net, input_dim=20000, output_dim=num_hidden) However I get the error, InvalidArgument...
rbb
1

votes
0

answer
127

Views

Attempt at K-fold (10-fold) cross validation for supervised learning of DNN network in python using tflearn

I'd like some confirmation on whether or not my implementation of doing supervised learning via 10-fold cross validation on a DNN network in python using tflearn is correct. The code runs and gets some pretty good results with training_accuracy reaching 95.6% and validation accuracy to 98.4% but I a...
1

votes
1

answer
318

Views

Tflearn ValueError: Shape (256, ?) must have rank at least 3

print(network.shape ) # ( ? , 256, 2, 128 ) network = reshape(network,[-1,256,256]) print(network.shape) # ( ? , 256, 256 ) batch_Size,time_stamp,features network = bidirectional_rnn(network, GRUCell(32 ), GRUCell(32) ) I am trying to code a CRNN using tflearn, this is the log i get : File 'data...
sumit
1

votes
0

answer
25

Views

Generator for `model.fit()` Input rather than Collection? (training data too large for memory)

tf-learn models' fit function can be passed training and test data like so: model = tflearn.DNN(nn) model.fit({'input': X_train}, {'targets': Y_train}, n_epoch=10, validation_set=( {'input': X_test}, {'targets': Y_test} )) where nn is the definition of a model. However, what if the collections such...
lo tolmencre
1

votes
1

answer
208

Views

Does tflearn.models.dnn.DNN automatically turn off dropout layers and batch normalization when predicting?

I'm quite new to Neural Networks, which is why I've decided to use Tflearn because it is quite intuitive. However I couldn't find an answer to my question. The tflearn documentation gives the following example for letting a deep neural network predict something: network = ... model = DNN(network) mo...
uhu123
1

votes
1

answer
271

Views

LSTM and labels

Lets start off with 'I know ML cannot predict stock markets better than monkeys.' But I just want to go through with it. My question is a theretical one. Say I have date, open, high, low, close as columns. So I guess I have 4 features, open, high, low, close. 'my_close' is going to be my label(a...
J T
1

votes
1

answer
70

Views

Exception in thread Thread-5: TypeError: only integer scalar arrays can be converted to a scalar index

Recently I was evaluating a tflearn model using it's model.evaluate(test_X, test_y) method with the test data and there I am getting below exception Exception in thread Thread-5: Traceback (most recent call last): File '/Users/vishwas.abhyankar/miniconda3/lib/python3.6/threading.py', line 916, in _b...
1

votes
0

answer
196

Views

Save and Load Model as .pb Using TFLearn?

I've trained DNN model using tflearn and saved it as checkpoint file, and the model performed well. I need to freeze the model so I can use it on android device later. I've been searching a way to freeze my model directly from TFLearn but apparently tflearn hasn't provided such function as of now so...
kucinghitam
1

votes
0

answer
28

Views

Prediction is slower when model is loaded than if it is fited during the process

I have a strange issue, the DNN.predict method is quite slower when I load my model's weight than when I train with the fit method. I've also noted that when I run a prediction over a batch of images, it's getting faster and faster to predict. Here is my code class Reseau(object): def init(self, img...
Arlhal
1

votes
0

answer
36

Views

How to generate sentences in char-level chatbot?

I am trying to implement a char-based Chatbot in Turkish. I am using TFLearn's text generation example on this link. I edited the string_to_semi_redundant_sequences function, since I want to create a chatbot. Originally, this model produces single char for a sequence of chars, so X keeps one-hot-vec...
uAxis
1

votes
0

answer
81

Views

Exception in thread Thread-2: Python Machine Learning Error : list out of range Tensorflow

I'm trying to make a classifier for my data. But as a newbie in Machine Learning and Python stuff, I keep getting a strange error which I can't figure out. My code is CODE from sklearn.preprocessing import OneHotEncoder import tensorflow as tf import numpy as np import scipy.io as cio import os imp...
Farukh Khan
1

votes
1

answer
38

Views

how to print feature vector shape after each layer in CNN

My CNN model architecture is as follows: def model_a(x_train): input_batch = tflearn.layers.core.input_data(shape=(None, x_train.shape[1], x_train.shape[2], x_train.shape[3])) input_batch=tflearn.layers.normalization.batch_normalization(input_batch) network = tflearn.layers.conv.conv_2d(input_batch,...
Susmita Saha
1

votes
0

answer
24

Views

Is it possible to plot a loss, accuracy or validation curve while using tflearn instead of using tensorboard?

I am using tflearn, and I am trying to plot some curves by using mathplotlib. I am not using tf.Session (There is an example on that but I cant use that solution) and I don't want to visualise it in tensorboard. I was wondering if there was a way. Would it be possible to get the network structure a...
Patrick Adjei
1

votes
1

answer
1.2k

Views

Cannot Save or Load Models With TensorFlow & TFLEARN

I'm going through the Titanic tutorial from here. After completeing it I wanted to save the model and then load it up later. After saving it I get a warning saying: TensorFlow's V1 checkpoint format has been deprecated. WARNING:tensorflow:Consider switching to the more efficient V2 format: When I...
Ravash Jalil
1

votes
1

answer
458

Views

Use V2 checkpoint for TFLearn (TensorFlow) r0.12.1

Is there a way to tell TFLearn to save checkpoints in the V2 format? I am using the current (r0.12.1) release of TensorFlow. If you follow a simple example, such as: https://www.tensorflow.org/tutorials/tflearn/ You will get flooded with: WARNING:tensorflow:****************************************...
JeffHeaton
1

votes
1

answer
1.4k

Views

How to load and retrain tflean model

I am trying DNN- RNN on a text data set. It is a simple dummy data and I think the code can be used with most of text data. However I am getting error when I am trying to load the trained model and then retrain it. Please tell me If I am doing it wrong. def convert_docs(documents,no_class=2,MAX_DOC...
Karan Kothari
1

votes
2

answer
137

Views

When I used tflearn to predict a test case, it says “Cannot feed value of shape (32, 32, 3) for Tensor u'input/X:0', which has shape '(?, 32, 32, 3)”

(X,Y),(test_x,test_y)=cifar.load_data(one_hot=True) X=X.reshape([-1,32,32,3]) test_x=test_x.reshape([-1,32,32,3]) convnet=input_data(shape=[None,32,32,3],name='input') convnet=conv_2d(convnet,32,3,activation='relu') convnet=max_pool_2d(convnet,2) convnet=conv_2d(convnet,64,3,activation='relu') convn...
Rakshit Kitchloo
1

votes
1

answer
2.3k

Views

Tflearn training batch error says “ object of type 'Tensor' has no len()”

I am new to tensorflow. I am using Tflearn to train my images to classify eye state. For initial period, right now, i have 400 training images and 200 validating images. I am using image_preloader to take custom image input in my script. I think it loads image successfully shows: tflearn.data_utils....
dp01
1

votes
1

answer
92

Views

Computing sum of sequence - Recurrent network

I have been trying to implement a recurrent network to compute the sum of a sequence of numbers. I plan to try to make it accept variable length sequences but to start off the input length is fixed at 5. Example: [1,2,3,4,5] = 15 The problem I am encountering is that once it converges, or at least t...
ericwenn
1

votes
1

answer
453

Views

tflearn label encoding with large number of classes

I am trying to adapt the Convolutional Neural Net example of tflearn to do a classification with ~12000 distinct class labels and more than 1 million training examples. The number of labels is apparently a problem in terms of memory consumption when one-hot encoding them. I first map my string label...
cookiedealer
1

votes
1

answer
282

Views

How to display recall and precision in TFLearn?

I'm quiet new with tflearn. I did a cnn classifier, which classifies in 17 different classes. I run the code without any problem, and it shows me the accuracy and the loss. I was wondering how can I display the recall and precision for each class. My code is based in the example of CNN classifier to...
Imanol Uría
1

votes
1

answer
584

Views

Tensorflow Executor failed to create kernel. Unimplemented: Cast string to float is not supported

I'm trying to build a custom CNN classifier for a load of cancer images (.png) using Tensorflow 1.1.0 and TFLearn 0.3.1 by largely following someone else's CNN classifier here, however when I try to fit my model Tensorflow is throwing out the following errors: W tensorflow/core/framework/op_kernel.c...
jhole89
1

votes
1

answer
139

Views

Access Model Training History in TFLearn?

I want to save train and validation loss in csv files in tflearn, and then reload it like we do in keras with history to plot graphs. Please help me
Arbish
1

votes
2

answer
496

Views

Shaping data for linear regression with TFlearn

I'm trying to expand the tflearn example for linear regression by increasing the number of columns to 21. from trafficdata import X,Y import tflearn print(X.shape) #(1054, 21) print(Y.shape) #(1054,) # Linear Regression graph input_ = tflearn.input_data(shape=[None,21]) linear = tflearn.single_unit(...
Tom Rijntjes
1

votes
1

answer
240

Views

Python TFlearn - Loss too high

After fixing my problem of shape of input I ran my program, the problem is that the total loss printed by the program is way too high (if I compare it for example to the one from the quickstart tutorial). My goal is to predict the congestion of future entry by using past data (I have more than 10M o...
Eric Godard
1

votes
2

answer
486

Views

Does tf.one_hot() supports SparseTensor as indices parameter?

I would like to ask whether tf.one_hot() function supports SparseTensor as the 'indices' parameter. I want to do a multi-label classification (each example has multiple labels) which requires to calculate a cross_entropy loss. I try to directly put the SparseTensor in the 'indices' parameter but it...
Mickey J. Shen
1

votes
1

answer
116

Views

Not able to run tflearn

When i run import tflearn in my python3 interpreter. I get the following error. Traceback (most recent call last): File '', line 1, in File '/home/abc/app/neural_network/tflearn.py', line 2, in from tflearn.layers.conv import conv_2d,max_pool_2d ImportError: No module named 'tflearn.layers'; 'tfle...
Falcon
1

votes
1

answer
236

Views

Tflearn ranking documents with a neural network without softmax output layer

I have a vanilla feed forward neural network (2 hidden layers and a softmax output layer) that does text classification. It is implemented with tflearn. What softmax does is that it converts the output to a density probability distribution in order to determine to which one is the most probable clas...
Ivan
1

votes
1

answer
37

Views

deleting columns in tflearn producing strange output

I am using tflearn and I am using the following code to load my csv file... data, labels = load_csv('/home/eric/Documents/Speed Dating Data.csv', target_column=0, categorical_labels=False) Here is a snippet of my csv file (there are a lot more columns)... I want to remove a specific column. For exam...
Bolboa
1

votes
1

answer
186

Views

ValueError: Cannot feed value of shape (64, 200, 75) for Tensor 'TargetsData/Y:0', which has shape '(200, 75)'

I know this is a dumb question but I cant seem to figure it out. I feed in a numpy array of (?,200,75) and get this error: ValueError: Cannot feed value of shape (64, 200, 75) for Tensor 'TargetsData/Y:0', which has shape '(200, 75)' Here is my code: import numpy as np import tflearn print('loading...
Orrin Naylor
1

votes
1

answer
352

Views

Multi-label prediction using DNN

I'm trying to predict several labels for a given text. It works well for a single label, but I don't know how to implement confidence score for multi-label prediction. I have data in the following denormalized format: ┌────┬──────────┬────────┐ │...
Kertis van Kertis
1

votes
1

answer
513

Views

Install tflearn using pip3 on ubuntu correctly

I have seen lot of answers regarding installation on tflearn using pip but none have helped me. I am using python3 and tensorflow (1.0.0), tensorflow-tensorboard (1.5.0) and tflearn (0.3.2). If I install tflearn it says 'cant import tflearn it isn't installed' or something like that but then I unins...
Asim

View additional questions