llSourcell / How_to_simulate_a_self_driving_car

This is the code for "How to Simulate a Self-Driving Car" by Siraj Raval on Youtube
430 stars 305 forks source link

car-behavioral-cloning #39

Open 15snehalgugale opened 5 years ago

15snehalgugale commented 5 years ago

how to resolve this error

Sn_drive.py:127: UserWarning: Update your Conv2D call to the Keras 2 API: Conv2D(24, (5, 5), strides=(2, 2), activation="elu") cnn.add(Conv2D(24, 5, 5, activation='elu', subsample=(2, 2))) Sn_drive.py:128: UserWarning: Update your Conv2D call to the Keras 2 API: Conv2D(36, (5, 5), strides=(2, 2), activation="elu") cnn.add(Conv2D(36, 5, 5, activation='elu', subsample=(2, 2))) Sn_drive.py:129: UserWarning: Update your Conv2D call to the Keras 2 API: Conv2D(48, (5, 5), strides=(2, 2), activation="elu") cnn.add(Conv2D(48, 5, 5, activation='elu', subsample=(2, 2))) Sn_drive.py:130: UserWarning: Update your Conv2D call to the Keras 2 API: Conv2D(64, (3, 3), activation="elu") cnn.add(Conv2D(64, 3, 3, activation='elu')) Sn_drive.py:131: UserWarning: Update your Conv2D call to the Keras 2 API: Conv2D(64, (3, 3), activation="elu") cnn.add(Conv2D(64, 3, 3, activation='elu')) Traceback (most recent call last): File "C:\Users\Dell\Anaconda3\envs\car-behavioral-cloning\lib\site-packages\tensorflow\python\framework\ops.py", line 1628, in _create_c_op c_op = c_api.TF_FinishOperation(op_desc) tensorflow.python.framework.errors_impl.InvalidArgumentError: Dimension 0 in both shapes must be equal, but are 28224 and 1152. Shapes are [28224,100] and [1152,100]. for 'Assign_10' (op: 'Assign') with input shapes: [28224,100], [1152,100].

During handling of the above exception, another exception occurred:

David-Un-ger commented 5 years ago

you need to input the kernel_size as a tupel (5,5)

--> cnn.add(Conv2D(48, (5, 5), strides=(2, 2), activation="elu"))