Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: axes don't match array #3

Open
tamBou opened this issue May 23, 2019 · 0 comments
Open

ValueError: axes don't match array #3

tamBou opened this issue May 23, 2019 · 0 comments

Comments

@tamBou
Copy link

tamBou commented May 23, 2019

Hi,
This code works fine for a convolutional neural network but when I try it with the deep neural network below:

_**************************
import pandas as pd
from keras import layers
from keras.models import Sequential
from keras.layers import Dense
from keras.callbacks import EarlyStopping

train_df = pd.read_csv('./data/hourly_wages_data.csv')
train_X = train_df.drop(['wage_per_hour'], axis=1)
train_y = train_df[['wage_per_hour']]

n_cols = train_X.shape[1]

model= Sequential()
model.add(layers.Dense(200, activation='relu', input_shape=(n_cols,)))
model.add(layers.Dense(200, activation='relu'))
model.add(layers.Dense(200, activation='relu'))
model.add(layers.Dense(1, activation = 'softmax'))

model.compile(optimizer='adam', metrics=['accuracy'],loss='mean_squared_error')

model.fit(train_X, train_y, validation_split=0.2, epochs=30, batch_size=70)_


When I use the mvNCCheck, I get this error :

_/usr/local/bin/ncsdk/Controllers/Parsers/TensorFlowParser/Convolution.py:47: SyntaxWarning: assertion is always true, perhaps remove parentheses?
assert(False, "Layer type not supported by Convolution: " + obj.type)
mvNCCheck v02.00, Copyright @ Intel Corporation 2017

****** Info: No Weights provided. inferred path: TF_Model/tf_model.data-00000-of-00001******
TF_Model/tf_model.meta
2019-05-23 16:07:34.948186: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
No Bias
No Bias
No Bias
No Bias
Fusing DeptwiseConv + Pointwise Convolution into plain Convolution
Fusing Add and Batch after Convolution
Traceback (most recent call last):
File "/usr/local/bin/mvNCCheck", line 239, in
quit_code = check_net(args.network, args.image, args.inputnode, args.outputnode, args.nshaves, args.inputsize, args.weights, args)
File "/usr/local/bin/mvNCCheck", line 206, in check_net
load_ret = load_network(args, parser, myriad_config)
File "/usr/local/bin/ncsdk/Controllers/Scheduler.py", line 83, in load_network
input_data, expected_result = p.calculateReference(arguments)
File "/usr/local/bin/ncsdk/Controllers/Parsers/TensorFlow.py", line 545, in calculateReference
nhwc_to_nchw_transpozition)
File "/home/tam/.local/lib/python3.5/site-packages/numpy/core/fromnumeric.py", line 639, in transpose
return _wrapfunc(a, 'transpose', axes)
File "/home/tam/.local/lib/python3.5/site-packages/numpy/core/fromnumeric.py", line 56, in wrapfunc
return getattr(obj, method)(*args, **kwds)
ValueError: axes don't match array

Is it normal? Could you help me please resolving this issue.
Thank you in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant