Skip to content

Run train.py ERROR #53

@kaikaigood

Description

@kaikaigood

Hi,foamliu:

  1. When “loss=overall_loss”, "pretrained_path = None" and "num_gpu=1" are set, an error occurs when running “train.py”. The error situation is as follows:
  • code: final.compile(optimizer='nadam', loss=overall_loss, target_tensors=[decoder_target])
  • error: Traceback (most recent call last):
    File "C:\Users\Administrator\anaconda3\envs\tensorflow1.15\lib\site-packages\tensorflow_core\python\client\session.py", line 1365, in _do_call
    return fn(*args)
    File "C:\Users\Administrator\anaconda3\envs\tensorflow1.15\lib\site-packages\tensorflow_core\python\client\session.py", line 1350, in _run_fn
    target_list, run_metadata)
    File "C:\Users\Administrator\anaconda3\envs\tensorflow1.15\lib\site-packages\tensorflow_core\python\client\session.py", line 1443, in _call_tf_sessionrun
    run_metadata)
    tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.
    (0) Invalid argument: Incompatible shapes: [8,320,320,0] vs. [0,320,320,3]
    [[{{node loss/refinement_pred_loss/sub_2}}]]
    [[loss/mul/_1021]]
    (1) Invalid argument: Incompatible shapes: [8,320,320,0] vs. [0,320,320,3]
    [[{{node loss/refinement_pred_loss/sub_2}}]]
    0 successful operations.
    0 derived errors ignored.
  1. When “loss=alpha_prediction_loss”is set, Training can run normally.

  2. overall_loss=0.5* alpha_prediction_loss(y_true, y_pred) + 0.5* compositional_loss(y_true, y_pred), so I doubt whether it is caused by the problem of compositional_loss.

I wonder if you have encountered this problem during training?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions