how to fix fread error ?
Show older comments
Hello when l run the code above l got this error . l don't where is the error, my codes (.m) and training examples are in the same working directory.
*Error using fread
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in MNISTParser (line 3)
magic_number = fread(fp,1,'uint32',0,'b');
Error in MNIST_gen (line 2)
train_labels = MNISTParser('./MNIST/train-labels-idx1-ubyte');*
code 1 : MNIST_gen.m
...
**train_labels = MNISTParser('./MNIST/train-labels-idx1-ubyte');**
...
[Irrelevant code elided for brevity...dpb]
code2: MNISTParser.m
function res = MNISTParser(filename)
fp = fopen(filename,'r');
**magic_number = fread(fp,1,'uint32',0,'b');**
items_number = fread(fp,1,'uint32',0,'b');
...
[ditto]
Thanks for helps
Accepted Answer
More Answers (0)
Categories
Find more on Parallel Computing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!