yu4u / noise2noise

An unofficial and partial Keras implementation of "Noise2Noise: Learning Image Restoration without Clean Data"
MIT License
1.07k stars 237 forks source link

run error #47

Closed ssywzzc closed 4 years ago

ssywzzc commented 4 years ago

Excuse me, I run your program to report an error. I don't know what the problem is. Can you take a look at it? Thank you

File "F:/noise2noise/noise2noise-master/train.py", line 115, in main() File "F:/noise2noise/noise2noise-master/train.py", line 109, in main callbacks=callbacks) File "D:\Python\env\lib\site-packages\tensorflow\python\keras\engine\training.py", line 1433, in fit_generator steps_name='steps_per_epoch') File "D:\Python\env\lib\site-packages\tensorflow\python\keras\engine\training_generator.py", line 322, in model_iteration steps_name='validation_steps') File "D:\Python\env\lib\site-packages\tensorflow\python\keras\engine\training_generator.py", line 220, in model_iteration batch_data = _get_next_batch(generator, mode) File "D:\Python\env\lib\site-packages\tensorflow\python\keras\engine\training_generator.py", line 372, in _get_next_batch 'or (x, y). Found: ' + str(generator_output)) ValueError: Output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: [array([[[[ 26, 11, 0], [ 25, 0, 0], [ 9, 9, 13], ..., [ 30, 0, 23], [ 0, 50, 16], [ 0, 0, 41]],

    [[  7, 111,  48],
     [ 29, 109, 154],
     [ 20,  55,  50],
     ...,
     [ 61, 132, 202],
     [ 17, 174, 177],
     [114, 184, 172]],

    [[ 56, 142,  82],
     [ 60, 152, 141],
     [  0,  64,  45],
     ...,
     [ 44,  61,  97],
     [ 97,  88,   0],
     [  0,  50,  79]],

    ...,

    [[ 87,  80, 113],
     [ 80,  96,  78],
     [158,  79,  91],
     ...,
     [ 55,  72,  80],
     [ 40,  92,  59],
     [ 78,  85,  47]],

    [[ 38,  92,  24],
     [ 73, 108,  85],
     [ 58,  81,  27],
     ...,
     [  8,  29,  51],
     [ 51,  21,  24],
     [  0,  82,  57]],

    [[ 25,  14,   0],
     [ 26,   0,   0],
     [  3,   0,  54],
     ...,
     [ 18,  46,  41],
     [ 22,   0,  40],
     [  7,   0,   0]]]], dtype=uint8), array([[[[  6,   6,   6],
     [  6,   6,   6],
     [  6,   6,   6],
     ...,
     [  6,   6,   6],
     [  6,   6,   6],
     [  6,   6,   6]],

    [[ 25, 104,  84],
     [ 34, 150, 156],
     [ 22,  50,  76],
     ...,
     [ 34, 150, 156],
     [ 52, 168, 176],
     [ 83, 167, 149]],

    [[ 25, 104,  84],
     [ 23, 107, 143],
     [ 22,  50,  76],
     ...,
     [ 50, 109, 111],
     [ 49,  91,  46],
     [ 25,  75,  79]],

    ...,

    [[ 87, 103,  87],
     [ 87, 103,  87],
     [109, 111,  82],
     ...,
     [ 38,  41,  54],
     [ 39,  56,  55],
     [ 75,  54,  46]],

    [[ 80,  81,  51],
     [ 87,  88,  72],
     [ 81, 110,  79],
     ...,
     [ 25,  55,  55],
     [ 38,  41,  54],
     [ 25,  55,  55]],

    [[  6,   6,   6],
     [  6,   6,   6],
     [  6,   6,   6],
     ...,
     [  6,   6,   6],
     [  6,   6,   6],
     [  6,   6,   6]]]], dtype=uint8)]