Comments (4)
Hy @Aawesh
Can you help me to solve this error.?
2018-04-10 11:53:45.778484: I C:\tf_jenkins\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
Traceback (most recent call last):
File "D:/Sardar.Khan/Courses/TensorFlow Course/Building and Deploy Deep Learning/Ex_Files_TensorFlow/Exercise Files/03/Model/main.py", line 195, in
_, c = session.run([optimizer, loss], feed_dict={X: batch_x, Y: batch_y})
File "D:\Sardar.Khan\Courses\TensorFlow Course\Building and Deploy Deep Learning\Ex_Files_TensorFlow\Exercise Files\venv\lib\site-packages\tensorflow\python\client\session.py", line 905, in run
run_metadata_ptr)
File "D:\Sardar.Khan\Courses\TensorFlow Course\Building and Deploy Deep Learning\Ex_Files_TensorFlow\Exercise Files\venv\lib\site-packages\tensorflow\python\client\session.py", line 1113, in _run
str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (10, 1) for Tensor 'Placeholder_1:0', which has shape '(?, 6)'
Process finished with exit code 1
at this line..
_, c = session.run([optimizer, loss], feed_dict={X: batch_x, Y: batch_y})
with tf.Session() as session:
session.run(tf.global_variables_initializer())
for epoch in range(training_epochs):
for b in range(total_batches):
offset = (b * batch_size) % (train_y.shape[0] - batch_size)
batch_x = train_x[offset:(offset + batch_size), :, :, :]
batch_y = train_y[offset:(offset + batch_size), :]
_, c = session.run([optimizer, loss], feed_dict={X: batch_x, Y: batch_y})
cost_history = np.append(cost_history, c)
print("Epoch: ", epoch, " Training Loss: ",c, " Training Accuracy: ",session.run(accuracy, feed_dict={X: train_x, Y: train_y}))
print("Testing Accuracy:", session.run(accuracy, feed_dict={X: test_x, Y: test_y}))
from human-activity-recognition-using-cnn.
The error is this: ValueError: Cannot feed value of shape (10, 1) for Tensor 'Placeholder_1:0', which has shape '(?, 6)
You are trying to feed class labels array which has a shape of (10, 1) into a placeholder y with shape (None, 6). I would suggest try printing your class labels' numpy array and make sure placeholder and array have same shape.
Hope this helps.
from human-activity-recognition-using-cnn.
I follow the same tutorial given by you but its show this error.
from human-activity-recognition-using-cnn.
Make sure your data have all output labels equally. By equally I mean, the test data (after divided into training and testing) must contain all 6 labels (in your case). Don't just keep first 100 (for example) rows just like that for debugging purpose. Change the activity values. Let's say walking = 1, Jumping = 2, Running = 3, etc. The problem here is, all your test data contains only one output label. I have answered this on the blog as well. I hope this finds you well.
from human-activity-recognition-using-cnn.
Related Issues (20)
- The code runs for too long ?
- The predict is always Upstairs. HOT 1
- normalizing raw data in the App HOT 3
- Tensor Shape Issue HOT 4
- Exported Model Issue in Android HOT 3
- org.tensorflow.TensorFlowException: Op type not registered 'NonMaxSuppressionV3' in binary running on localhost. Make sure the Op and Kernel are registered in the binary running in this process. HOT 1
- Help!!!
- Tensorflow code does not work HOT 4
- CNN part error with too many indices for array HOT 4
- name is not in subgraph HOT 2
- Loss is not decreasing HOT 1
- Always UPSTAIRS HOT 4
- file does not exist in HOT 2
- change the name HOT 1
- model file? HOT 1
- Source code for Deploying the model on Android HOT 6
- The app can not run HOT 3
- inaccurate HOT 1
- when i run the code,there are some problems
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 human-activity-recognition-using-cnn.