ERROR in loading data

Joel Goldstick joel.goldstick at gmail.com
Tue Feb 4 11:47:40 EST 2020


On Tue, Feb 4, 2020 at 9:51 AM <laiba.zubair96 at gmail.com> wrote:
>
> #load the training and testing data, then scale it into the
>         # range [0, 1]
>         print("[INFO] loading  ADNI data...")
>         ((trainX, trainY), (testX, testY)) = '/content/gdrive/My Drive/3_Classes/'.loads_data()

What is the class of the .loads)data() method?  I don't think it is a
string representing a file path.  Look in the docs for .loads_data()
to see what you are doing wrong.  That looks like it might be a numpy
>         trainX = trainX.astype("float") / 255.0
>         testX = testX.astype("float") / 255.0
>
>         # initialize the label names for the  ADNI dataset
>         labelNames = ["outAD", "outCN", "outMCI"]
> When i try to run this code I got the following error.
>
> [INFO] loading  ADNI data...
> ---------------------------------------------------------------------------
> AttributeError                            Traceback (most recent call last)
> <ipython-input-8-fb9724017cc0> in <module>()
>       1 print("[INFO] loading  ADNI data...")
> ----> 2 ((trainX, trainY), (testX, testY)) = '/content/gdrive/My Drive/3_Classes/'.loads_data()
>       3 trainX = trainX.astype("float") / 255.0
>       4 testX = testX.astype("float") / 255.0
>       5
> --
> https://mail.python.org/mailman/listinfo/python-list



-- 
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays


More information about the Python-list mailing list