Comments (15)
You have to change last fully connected layer to:
net = tflearn.fully_connected(net, 10, activation='softmax')
In your example you seems to have 10 classes and not 2, so you need your softmax layer to have a 10 output dimension.
from tflearn.
in that line you have to change input_dim by your dictionary size (total number of different ids):
net = tflearn.embedding(net, input_dim=20000, output_dim=128)
from tflearn.
I guess it should be np.max(trainX)+1
from tflearn.
Can you tell what are these numbers? I thought they were ids? I think your main issue here is parsing your data.
from tflearn.
Please can you tell what does these data mean? It would be easier to understand what you are actually trying to do. I mean, these integers are an id (that represent words or whatever)? or are they real values?
from tflearn.
I see, first you can normalize your data by assigning an id (from 0 to your total number of event) for every event. After you can apply the embedding. But note that if you total number of event is too large, it will be very slow, so you can try to find some ways to reduce your data dimension (keep only events occurring more than X times, or apply a PCA transformation, etc...)
from tflearn.
oh, your problem is not about number of rows, but about your embedding layer dimensions, you have to first normalize your data and give them ids (0 to total number of event). What is your total number of distinct events?
from tflearn.
I I modified but it is generating the following error
from tflearn.
that i understood by looking at the error itself. But what exactly that dictionary size (total number different ids) with respect to my data set.
from tflearn.
generating the following error
Segmentation fault (core dumped)
from tflearn.
What np.max(trainX)+1
is returning? Maybe your dictionary size is too large..
from tflearn.
np.max(trainX)+1 returning 1930563585. How to solve this..
from tflearn.
when i use print(np.max(trainX)+1), it returns 1930563585.
reading and parsing code is given below
//for reading csv file
data = pd.read_csv('Train.csv')
X = data.iloc[:,1:1805] //all columns
y = data.iloc[:,0] // only first clumn - class label
X_train, X_test, y_train, y_test = train_test_split(X, y,test_size=0.2,random_state=42) // using scikit learn train_test_split
// for converting into list of values
print("Preprocessing")
X_train1 = X_train.values.T.tolist()
X_test1 = X_test.values.tolist()
y_train1 = y_train.values.T.tolist()
y_test1 = y_test.values.tolist()
Sequence padding
trainX = pad_sequences(X_train1, maxlen=200, value=0.)
testX = pad_sequences(X_test1, maxlen=200, value=0.)
Converting labels to binary vectors
trainY = to_categorical(y_train, nb_classes=0)
testY = to_categorical(y_test, nb_classes=0)
Then finally model creation
from tflearn.
The above code is for reading and parsing my dataset. Is there any problem in that?
from tflearn.
I reduced my feature set now. I have 2000 row and 20 24 columns. Then also it is showing same error
from tflearn.
Related Issues (20)
- No swish activation function? HOT 1
- HELLO? ANYBODY HOME? HOT 1
- Syntax warnings due to comparison of literals using is
- Error in TF2.0... Any ideas? HOT 3
- #001 'unicodeescape' code can't decode bytes in position 2-3: truncated \UXXXXXXXX escape HOT 1
- Update required HOT 1
- Not working with tensorflow 2.3.1 HOT 5
- Import error
- ValueError: Cannot feed value of shape (61,) for Tensor 'InputData/X:0', which has shape '(?, 61)' HOT 1
- Examples
- Xception Example model
- def variance_scaling in initializations.py tries to call deprecated class
- LSTM stateful?
- why i got same number with Alexnet ? HOT 1
- Why tflearn disables executing eagerly ? HOT 2
- OSS License compatibility question
- tflearn import issue HOT 5
- Pillow 10 breaks tflearn import HOT 2
- Requesting Review for pull request #1176
- Use github.com/apssouza22/chatflow as a conversational layer. It would enable actual API requests to be carried out from natural language inputs.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tflearn.