Git Product home page Git Product logo

Comments (11)

pprivulet avatar pprivulet commented on July 21, 2024 4

Hey
I solved the problem following your instructions, thank you very much.

from research.

pprivulet avatar pprivulet commented on July 21, 2024

Have you solved this problem?
I have got the same problem as you.

from research.

gpavlov2016 avatar gpavlov2016 commented on July 21, 2024

Yes, at some point in a new release of keras the order of parameters of input_shape and output_shape was changed. To solve this we need to make two adjustments:

  1. input_shape=(ch, row, col) == > input_shape=(row, col, ch) (line 28 in train_steering_model.py)
    the same for output_shape
  2. flip the input data accordingly - add two lines after line 17 and before line 18 in train_steering_model.py:
    X = numpy.swapaxes(X, 2, 3)
    X = numpy.swapaxes(X, 3, 4)

from research.

skywong1230 avatar skywong1230 commented on July 21, 2024

Hey, I solved the problem following your instructions, then another problem is appear:
After I trained the steering model, then use the following command to visualize the results:
"./view_steering_model.py ./outputs/steering_model/steering_angle.json"

It got errors:
Exception: Error when checking : expected lambda_input_1 to have shape (None, 160, 320, 3) but got array with shape (1, 3, 160, 320)

We need to modify the code in "view_steering_model.py" to slove the problem?

from research.

pprivulet avatar pprivulet commented on July 21, 2024

Yes, we have to change the code near the line 113 and 114 according to above instructions.
Good luck.

from research.

skywong1230 avatar skywong1230 commented on July 21, 2024

Yes, thank you! I have changed the code near line 115,

Before:
predicted_steers = model.predict(img[None, :, :, :].transpose(0, 3, 1, 2))[0][0]

After:
predicted_steers = model.predict(img[None, :, :, :].transpose(0, 1, 2, 3))[0][0]

Than, it works. Thank you.

from research.

cakeinspace avatar cakeinspace commented on July 21, 2024

hey can you tell me what the line from utils import load, save is doing and more importantly how i can install utils

from research.

sunny1986 avatar sunny1986 commented on July 21, 2024

@gpavlov2016 Your solution works for me too but ran into another issue.

Using TensorFlow backend.
Epoch 1/200
Traceback (most recent call last):
File "train_steering_model.py", line 70, in
nb_val_samples=1000
File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 895, in fit_generator
pickle_safe=pickle_safe)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 1444, in fit_generator
'or (x, y). Found: ' + str(generator_output))
Exception: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None

Any ideas why I might be seeing this?

from research.

sunny1986 avatar sunny1986 commented on July 21, 2024

I was able to figure out that I didn't include numpy in my imports in the train_steering_model.py file and hence it was giving me the above error....
However now I am running into the same issue as #27 and my training gets killed even before the 2nd epoch is done. Any ideas or suggestions will be very helpful.
FYI - I don't think I have a powerful machine on which I am running this on as this seems to be aresource issue. What are the minimum system requirements for me to have it train successfully?

from research.

pandamax avatar pandamax commented on July 21, 2024

same problem occurred

from research.

ahmedyahia3393 avatar ahmedyahia3393 commented on July 21, 2024

in the view steering model.py file
I found his error (ValueError: bad marshal data (unknown type code)) result when trying to execute the view steering model.py
here is the result from the cmd prompt

Traceback (most recent call last):
File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\utils\generic_utils.py
", line 229, in func_load
raw_code = codecs.decode(code.encode('ascii'), 'base64')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe0' in position 46:
ordinal not in range(128)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "view_steering_model.py", line 94, in
model = model_from_json(json.load(jfile))
File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\models.py", line 349,
in model_from_json
return layer_module.deserialize(config, custom_objects=custom_objects)
File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\layers_init_.py", l
ine 55, in deserialize
printable_module_name='layer')
File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\utils\generic_utils.py
", line 144, in deserialize_keras_object
list(custom_objects.items())))
File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\models.py", line 1349,
in from_config
layer = layer_module.deserialize(conf, custom_objects=custom_objects)
File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\layers_init_.py", l
ine 55, in deserialize
printable_module_name='layer')
File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\utils\generic_utils.py
", line 144, in deserialize_keras_object
list(custom_objects.items())))
File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\layers\core.py", line
711, in from_config
function = func_load(config['function'], globs=globs)
File "C:\Users\lenovo\Anaconda3\lib\site-packages\keras\utils\generic_utils.py
", line 234, in func_load
code = marshal.loads(raw_code)
ValueError: bad marshal data (unknown type code)

from research.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.