Skip to content
This repository has been archived by the owner on Jan 29, 2021. It is now read-only.

Training error #46

Open
f-e-l-i-x opened this issue Jan 25, 2018 · 2 comments
Open

Training error #46

f-e-l-i-x opened this issue Jan 25, 2018 · 2 comments
Labels

Comments

@f-e-l-i-x
Copy link

f-e-l-i-x commented Jan 25, 2018

Hi,

Training using the training branch causes the following error:

sudo ./train.sh -d '/####/sessions/2018_01_22__10_31_06_PM' -n "#model" -m categorical
Using TensorFlow backend.
[ 28 9 9 115 40 77 169 2578 1721 1616 1751 1648 1759 1105
380]
[-30. -26.02 -22.04 -18.06 -14.08 -10.1 -6.12 -2.14 1.84 5.82
9.8 13.78 17.76 21.74 25.72 29.7 ]
Input shape: (99, 132, 3)

Layer (type) Output Shape Param #

conv2d_1 (Conv2D) (None, 48, 64, 24) 1824

conv2d_2 (Conv2D) (None, 22, 30, 32) 19232

conv2d_3 (Conv2D) (None, 9, 13, 64) 51264

conv2d_4 (Conv2D) (None, 7, 11, 64) 36928

flatten_1 (Flatten) (None, 4928) 0

dense_1 (Dense) (None, 100) 492900

dropout_1 (Dropout) (None, 100) 0

dense_2 (Dense) (None, 50) 5050

dropout_2 (Dropout) (None, 50) 0

angle_out (Dense) (None, 15) 765

Total params: 607,963
Trainable params: 607,963
Non-trainable params: 0

None
Best model saved in /#/model-model-adam-100-50-Thu Jan 25 14:16:50 2018.h5
2018-01-25 14:16:52.415660: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
Epoch 1/200
Traceback (most recent call last):
File "/home/flx/projects/burro-trainer/burro/burro/train.py", line 38, in
main()
File "/home/flx/projects/burro-trainer/burro/burro/train.py", line 35, in main
train_categorical(data_dir, model_name)
File "/home/flx/projects/burro-trainer/burro/burro/trainers/trainer.py", line 101, in train_categorical
callbacks=[tb, model_cp, e_stop])
File "/usr/local/lib/python2.7/dist-packages/keras/legacy/interfaces.py", line 87, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 1117, in fit_generator
initial_epoch=initial_epoch)
File "/usr/local/lib/python2.7/dist-packages/keras/legacy/interfaces.py", line 87, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 1840, in fit_generator
class_weight=class_weight)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 1559, in train_on_batch
check_batch_axis=True)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 1234, in _standardize_user_data
exception_prefix='input')
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 140, in _standardize_input_data
str(array.shape))
ValueError: Error when checking input: expected conv2d_1_input to have shape (None, 99, 132, 3) but got array with shape (256, 120, 160, 3)


keras version is 2.0.6
tensorflow is 1.4.1

I am pretty clueless here

Felix

@f-e-l-i-x
Copy link
Author

f-e-l-i-x commented Jan 25, 2018

I edited /home/####/burro-trainer/burro/burro/trainers/trainer.py

remove: input_shape=(99-config.camera.crop_top - config.camera.crop_bottom, 132, 3)
add: input_shape=(120,160,3)

That seems to work for now

@yconst
Copy link
Owner

yconst commented Jan 25, 2018

Yea the input shape is hardcoded for now. Needs to read from settings. Keep in mind that this is in two locations in trainer.py: One in line 37 and one in 108 for classification and regression correspondingly

@yconst yconst added the bug label Jan 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants