deepgram / kur

Descriptive Deep Learning
Apache License 2.0
816 stars 107 forks source link

bug in version 0.6.0 when run `kur data mnist.yml`, and a fix proposed #56

Closed EmbraceLife closed 7 years ago

EmbraceLife commented 7 years ago

Error message:

(dlnd-tf-lab)  ->kur data mnist.yml
Traceback (most recent call last):
  File "/Users/Natsume/miniconda2/envs/dlnd-tf-lab/bin/kur", line 11, in <module>
    load_entry_point('kur', 'console_scripts', 'kur')()
  File "/Users/Natsume/Downloads/kur_road/kur/kur/__main__.py", line 396, in main
    sys.exit(args.func(args) or 0)
  File "/Users/Natsume/Downloads/kur_road/kur/kur/__main__.py", line 185, in prepare_data
    keys = sorted(batch.keys())
AttributeError: 'str' object has no attribute 'keys'

I fixed it in the following way, see whether this is acceptable:

replace original line 167-168

with the following lines:

    for k in provider:
        provider = provider[k]
        for batch in provider:
            break
ajsyp commented 7 years ago

Thanks for pointing this out! Fixed in 480d411.