Yaoi Dirty
Yaoi Dirty

Reputation: 109

TensorFlow: Convolution Neural Network with non-image input

I am interested in using Tensorflow for training my data for binary classification based on CNN.

Now I wonder about how to set the filter value, number of output nodes in the convolution process.

I have read many tutorials and example. However, most of them use image data and I cannot compare it with my data that is customer data, not pixel.

So could you suggest me about this issue?

Upvotes: 7

Views: 6822

Answers (4)

I_Al-thamary
I_Al-thamary

Reputation: 4043

You have to reshape the data to be 4d. In this example, I have only 4 column.

x_train = np.reshape(x_train, (x_train.shape[0],2, 2,1))
x_test = np.reshape(x_test, (x_test.shape[0],2,2, 1))

This is a good example to use none image data https://github.com/fengjiqiang/LSTM-Wind-Speed-Forecasting You just need to change the following :

prediction_cols

feature_cols

features

and dataload

Upvotes: 2

Dat Bui
Dat Bui

Reputation: 19

You might use one of following classes:

  • class Dataset: Represents a potentially large set of elements.

  • class FixedLengthRecordDataset: A Dataset of fixed-length records
    from one or more binary files.

  • class Iterator: Represents the state of iterating through a Dataset.
  • class TFRecordDataset: A Dataset comprising records from one or more TFRecord files.
  • class TextLineDataset: A Dataset comprising lines from one or more
    text files.

Tutorial

official documentation

Upvotes: 0

dm5
dm5

Reputation: 350

If you data varies in time or space then you can use CNN,I am currently working with EEG data set which varies in time.Also you can refer to this paper http://www.nlpr.ia.ac.cn/english/irds/People/lwang/M-MCG_EN/Publications/2015/YD2015ACPR.pdf were the input data(Which is not an image) is presented as an image to the CNN.

Upvotes: 5

anati
anati

Reputation: 274

This tutorial for text :

Here !

Upvotes: 1

Related Questions