Skip to content

Update datanway.py#5

Open
SNBQT wants to merge 1 commit into
cnichkawde:masterfrom
SNBQT:patch-1
Open

Update datanway.py#5
SNBQT wants to merge 1 commit into
cnichkawde:masterfrom
SNBQT:patch-1

Conversation

@SNBQT
Copy link
Copy Markdown

@SNBQT SNBQT commented Dec 18, 2018

fix below ValueError:

match_cosine_1 (MatchCosine) (None, 5) 0 flatten_1[0][0]
flatten_1[1][0]
flatten_1[2][0]
flatten_1[3][0]
flatten_1[4][0]
flatten_1[5][0]
input_2[0][0]

Total params: 112,448
Trainable params: 111,936
Non-trainable params: 512


Traceback (most recent call last):
File "matchingnetwork.py", line 71, in
epochs=10,batch_size=32,verbose=1)
File "/usr/local/lib/python3.5/dist-packages/keras/engine/training.py", line 952, in fit
batch_size=batch_size)
File "/usr/local/lib/python3.5/dist-packages/keras/engine/training.py", line 789, in _standardize_user_data
exception_prefix='target')
File "/usr/local/lib/python3.5/dist-packages/keras/engine/training_utils.py", line 138, in standardize_input_data
str(data_shape))
ValueError: Error when checking target: expected match_cosine_1 to have shape (5,) but got array with shape (1,)

fix below ValueError:

match_cosine_1 (MatchCosine)    (None, 5)            0           flatten_1[0][0]
                                                                 flatten_1[1][0]
                                                                 flatten_1[2][0]
                                                                 flatten_1[3][0]
                                                                 flatten_1[4][0]
                                                                 flatten_1[5][0]
                                                                 input_2[0][0]
==================================================================================================
Total params: 112,448
Trainable params: 111,936
Non-trainable params: 512
__________________________________________________________________________________________________
Traceback (most recent call last):
  File "matchingnetwork.py", line 71, in <module>
    epochs=10,batch_size=32,verbose=1)
  File "/usr/local/lib/python3.5/dist-packages/keras/engine/training.py", line 952, in fit
    batch_size=batch_size)
  File "/usr/local/lib/python3.5/dist-packages/keras/engine/training.py", line 789, in _standardize_user_data
    exception_prefix='target')
  File "/usr/local/lib/python3.5/dist-packages/keras/engine/training_utils.py", line 138, in standardize_input_data
    str(data_shape))
ValueError: Error when checking target: expected match_cosine_1 to have shape (5,) but got array with shape (1,)
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

Successfully merging this pull request may close these issues.

1 participant