naturomics / CapsLayer

CapsLayer: An advanced library for capsule theory
Apache License 2.0
362 stars 117 forks source link

Performance issues in capslayer/data/datasets/cifar10/reader.py #50

Open DLPerf opened 3 years ago

DLPerf commented 3 years ago

Hello,I found a performance issue in the definition of __call__(self, batch_size, mode) , capslayer/data/datasets/cifar10/reader.py, dataset = dataset.map(parse_fun) was called without num_parallel_calls. I think it will increase the efficiency of your program if you add this.

The same issues also exist in dataset = dataset.map(parse_fun) , dataset = dataset.map(parse_fun), dataset = dataset.map(parse_fun)

Here is the documemtation of tensorflow to support this thing.

Looking forward to your reply. Btw, I am very glad to create a PR to fix it if you are too busy.