Advertisement
Guest User

Untitled

a guest
Nov 1st, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. ValueError Traceback (most recent call last)
  2. <ipython-input-9-3b925296aca6> in <module>()
  3. 49
  4. 50 # Train the model, iterating on the data in batches of 32 samples
  5. ---> 51 model.fit(training_data, one_hot_labels, epochs=10, batch_size=32)
  6. 52
  7. 53 #model.fit(x_train, y_train, epochs=5, batch_size=32)
  8.  
  9. C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\keras\models.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, **kwargs)
  10. 865 class_weight=class_weight,
  11. 866 sample_weight=sample_weight,
  12. --> 867 initial_epoch=initial_epoch)
  13. 868
  14. 869 def evaluate(self, x, y, batch_size=32, verbose=1,
  15.  
  16. C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\keras\engine\training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, **kwargs)
  17. 1520 class_weight=class_weight,
  18. 1521 check_batch_axis=False,
  19. -> 1522 batch_size=batch_size)
  20. 1523 # Prepare validation data.
  21. 1524 do_validation = False
  22.  
  23. C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\keras\engine\training.py in _standardize_user_data(self, x, y, sample_weight, class_weight, check_batch_axis, batch_size)
  24. 1376 self._feed_input_shapes,
  25. 1377 check_batch_axis=False,
  26. -> 1378 exception_prefix='input')
  27. 1379 y = _standardize_input_data(y, self._feed_output_names,
  28. 1380 output_shapes,
  29.  
  30. C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\keras\engine\training.py in _standardize_input_data(data, names, shapes, check_batch_axis, exception_prefix)
  31. 130 ' to have ' + str(len(shapes[i])) +
  32. 131 ' dimensions, but got array with shape ' +
  33. --> 132 str(array.shape))
  34. 133 for j, (dim, ref_dim) in enumerate(zip(array.shape, shapes[i])):
  35. 134 if not j and not check_batch_axis:
  36.  
  37. ValueError: Error when checking input: expected dense_5_input to have 2 dimensions, but got array with shape (300, 20, 20, 3)
  38.  
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement