Skip to content

Cannot fetch Cifar10 DataSet #10148

Closed
Closed
@Se00n00

Description

@Se00n00

Issue Description

Please describe our issue, along with:

  • expected behavior
  • encountered behavior

`public static void main(String[] args) throws Exception {
int BATCHSIZE = 128;
Cifar10DataSetIterator Train = new Cifar10DataSetIterator(BATCHSIZE, DataSetType.TRAIN);
Cifar10DataSetIterator Test = new Cifar10DataSetIterator(BATCHSIZE, DataSetType.TEST);

    DataNormalization normalizer = new NormalizerMinMaxScaler(0,1);
    normalizer.fit(Train);
    Train.setPreProcessor(normalizer);
    Test.setPreProcessor(normalizer);

    INDArray Train_X = Train.next().getFeatures();
    INDArray Train_Y = Train.next().getLabels();

    INDArray Test_X = Test.next().getFeatures();
    INDArray Test_Y = Test.next().getLabels();

    System.out.println(Arrays.toString(Train_X.shape()));
    System.out.println(Arrays.toString(Train_Y.shape()));
    System.out.println(Arrays.toString(Test_X.shape()));
    System.out.println(Arrays.toString(Test_Y.shape()));

}
`

Exception in thread "main" java.lang.RuntimeException: Could not download CIFAR-10 at org.deeplearning4j.datasets.fetchers.Cifar10Fetcher.getRecordReader(Cifar10Fetcher.java:66) at org.deeplearning4j.datasets.iterator.impl.Cifar10DataSetIterator.<init>(Cifar10DataSetIterator.java:88) at org.deeplearning4j.datasets.iterator.impl.Cifar10DataSetIterator.<init>(Cifar10DataSetIterator.java:63) at Main.main(Main.java:100) Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://dl4jdata.blob.core.windows.net/datasets/cifar10_dl4j.v1.zip at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:2014) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1615) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:223) at java.base/java.net.URL.openStream(URL.java:1325) at org.apache.commons.io.FileUtils.copyURLToFile(FileUtils.java:1025) at org.deeplearning4j.datasets.fetchers.CacheableExtractableDataSetFetcher.downloadAndExtract(CacheableExtractableDataSetFetcher.java:65) at org.deeplearning4j.datasets.fetchers.CacheableExtractableDataSetFetcher.downloadAndExtract(CacheableExtractableDataSetFetcher.java:41) at org.deeplearning4j.datasets.fetchers.Cifar10Fetcher.getRecordReader(Cifar10Fetcher.java:63) ... 3 more

Version Information

Please indicate relevant versions, including, if relevant:

Deeplearning4j version : 1.0.0-M2.1
Platform information : Ubuntu 24.04.1 LTS

Additional Information

Where applicable, please also provide:

  • Full log or exception stack trace (ideally in a Gist: gist.github.com)
  • pom.xml file or similar (also in a Gist)

Contributing

If you'd like to help us fix the issue by contributing some code, but would
like guidance or help in doing so, please mention it!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions