Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataSetIterator with NormalizerMinMaxScaler causes NullPointerException: toPreProcess #4214

Closed
iskanderuse opened this issue Oct 27, 2017 · 3 comments

Comments

@iskanderuse
Copy link

commented Oct 27, 2017

Issue Description

The following code throws the Exception:

NormalizerMinMaxScaler  preProcessor = new NormalizerMinMaxScaler(-1,1);

public void train(DataSetIterator iterator){
        preProcessor.fit(iterator);
        iterator.setPreProcessor(preProcessor);
        for( int i=0; i<nEpochs; i++ ){
            iterator.reset();
            network.fit(iterator);
        }
         iterator.reset();
        //--- Exception is here:
        RegressionEvaluation evaluation = network.evaluateRegression(iterator);
        System.out.println(evaluation.stats());
    }

Version Information

    <nd4j.version>0.9.1</nd4j.version>
    <dl4j.version>0.9.1</dl4j.version>
    OS Windows 10
Exception in thread "ADSI prefetch thread" java.lang.RuntimeException: java.lang.NullPointerException: toPreProcess
	at org.deeplearning4j.datasets.iterator.AsyncDataSetIterator$AsyncPrefetchThread.run(AsyncDataSetIterator.java:442)
Caused by: java.lang.NullPointerException: toPreProcess
	at org.nd4j.linalg.dataset.api.preprocessor.AbstractDataSetNormalizer.preProcess(AbstractDataSetNormalizer.java:113)
	at org.deeplearning4j.datasets.datavec.RecordReaderDataSetIterator.next(RecordReaderDataSetIterator.java:295)
	at org.deeplearning4j.datasets.datavec.RecordReaderDataSetIterator.next(RecordReaderDataSetIterator.java:393)
	at org.deeplearning4j.datasets.datavec.RecordReaderDataSetIterator.next(RecordReaderDataSetIterator.java:51)
	at org.deeplearning4j.datasets.iterator.AsyncDataSetIterator$AsyncPrefetchThread.run(AsyncDataSetIterator.java:417)

@Tschigger

This comment has been minimized.

Copy link

commented Oct 27, 2017

Possible duplicate of #3846.

AlexDBlack added a commit that referenced this issue Nov 25, 2017
AlexDBlack added a commit that referenced this issue Nov 27, 2017
AlexDBlack added a commit that referenced this issue Nov 27, 2017
AlexDBlack added a commit that referenced this issue Nov 29, 2017
@AlexDBlack

This comment has been minimized.

Copy link
Contributor

commented Nov 29, 2017

@AlexDBlack AlexDBlack closed this Nov 29, 2017

@lock

This comment has been minimized.

Copy link

commented Sep 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Sep 24, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.