当前位置: 首页>>代码示例>>Java>>正文


Java MultiDataSetPreProcessor类代码示例

本文整理汇总了Java中org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor的典型用法代码示例。如果您正苦于以下问题:Java MultiDataSetPreProcessor类的具体用法?Java MultiDataSetPreProcessor怎么用?Java MultiDataSetPreProcessor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


MultiDataSetPreProcessor类属于org.nd4j.linalg.dataset.api包,在下文中一共展示了MultiDataSetPreProcessor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setPreProcessor

import org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor; //导入依赖的package包/类
@Override
public void setPreProcessor(MultiDataSetPreProcessor preProcessor) { throw new UnsupportedOperationException("Not Implemented"); }
 
开发者ID:IsaacChanghau,项目名称:NeuralNetworksLite,代码行数:3,代码来源:CorpusIterator.java

示例2: setPreProcessor

import org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor; //导入依赖的package包/类
@Override
public void setPreProcessor(MultiDataSetPreProcessor preProcessor) {
    this.preProcessor = preProcessor;
}
 
开发者ID:deeplearning4j,项目名称:nd4j,代码行数:5,代码来源:TestMultiDataSetIterator.java

示例3: getPreProcessor

import org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor; //导入依赖的package包/类
@Override
public MultiDataSetPreProcessor getPreProcessor() {
    return this.preProcessor;
}
 
开发者ID:deeplearning4j,项目名称:nd4j,代码行数:5,代码来源:TestMultiDataSetIterator.java

示例4: getTrainIterator

import org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor; //导入依赖的package包/类
/**
 * This method returns train iterator instance
 *
 * @return
 */
public MultiDataSetIterator getTrainIterator() {
    return new MultiDataSetIterator() {
        @Override
        public MultiDataSet next(int num) {
            throw new UnsupportedOperationException("To be implemented yet");
        }

        @Override
        public void setPreProcessor(MultiDataSetPreProcessor preProcessor) {
            backedIterator.setPreProcessor(preProcessor);
        }

        @Override
        public MultiDataSetPreProcessor getPreProcessor() {
            return backedIterator.getPreProcessor();
        }

        @Override
        public boolean resetSupported() {
            return backedIterator.resetSupported();
        }

        @Override
        public boolean asyncSupported() {
            return backedIterator.asyncSupported();
        }

        @Override
        public void reset() {
            resetPending.set(true);
        }

        @Override
        public boolean hasNext() {
            if (resetPending.get()) {
                if (resetSupported()) {
                    backedIterator.reset();
                    counter.set(0);
                    resetPending.set(false);
                } else
                    throw new UnsupportedOperationException("Reset isn't supported by underlying iterator");
            }

            val state = backedIterator.hasNext();
            if (state && counter.get() < numTrain)
                return true;
            else
                return false;
        }

        @Override
        public MultiDataSet next() {
            counter.incrementAndGet();
            val p = backedIterator.next();

            if (counter.get() == 1 && firstTrain == null) {
                // first epoch ever, we'll save first dataset and will use it to check for equality later
                firstTrain = (org.nd4j.linalg.dataset.MultiDataSet) p.copy();
                firstTrain.detach();
            } else if (counter.get() == 1) {
                // epoch > 1, comparing first dataset to previously stored dataset. they should be equal
                int cnt = 0;
                for (val c: p.getFeatures())
                    if (!c.equalsWithEps(firstTrain.getFeatures()[cnt++], 1e-5))
                        throw new ND4JIllegalStateException("First examples do not match. Randomization was used?");
            }

            return p;
        }

        @Override
        public void remove() {
            throw new UnsupportedOperationException();
        }
    };
}
 
开发者ID:deeplearning4j,项目名称:deeplearning4j,代码行数:82,代码来源:MultiDataSetIteratorSplitter.java

示例5: getTestIterator

import org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor; //导入依赖的package包/类
/**
 * This method returns test iterator instance
 *
 * @return
 */
public MultiDataSetIterator getTestIterator() {
    return new MultiDataSetIterator() {
        @Override
        public MultiDataSet next(int num) {
            throw new UnsupportedOperationException("To be implemented yet");
        }

        @Override
        public void setPreProcessor(MultiDataSetPreProcessor preProcessor) {
            backedIterator.setPreProcessor(preProcessor);
        }

        @Override
        public MultiDataSetPreProcessor getPreProcessor() {
            return backedIterator.getPreProcessor();
        }

        @Override
        public boolean resetSupported() {
            return backedIterator.resetSupported();
        }

        @Override
        public boolean asyncSupported() {
            return backedIterator.asyncSupported();
        }


        @Override
        public void reset() {
            resetPending.set(true);
        }

        @Override
        public boolean hasNext() {
            val state = backedIterator.hasNext();
            if (state && counter.get() < numTrain + numTest)
                return true;
            else
                return false;
        }

        @Override
        public MultiDataSet next() {
            return backedIterator.next();
        }

        @Override
        public void remove() {
            throw new UnsupportedOperationException();
        }
    };
}
 
开发者ID:deeplearning4j,项目名称:deeplearning4j,代码行数:59,代码来源:MultiDataSetIteratorSplitter.java

示例6: getPreProcessor

import org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor; //导入依赖的package包/类
@Override
public MultiDataSetPreProcessor getPreProcessor() {
    return backedIterator.getPreProcessor();
}
 
开发者ID:deeplearning4j,项目名称:deeplearning4j,代码行数:5,代码来源:AsyncMultiDataSetIterator.java

示例7: getPreProcessor

import org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor; //导入依赖的package包/类
@Override
public MultiDataSetPreProcessor getPreProcessor() {
    return preProcessor;
}
 
开发者ID:deeplearning4j,项目名称:deeplearning4j,代码行数:5,代码来源:IteratorMultiDataSetIterator.java

示例8: setPreProcessor

import org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor; //导入依赖的package包/类
@Override
public void setPreProcessor(MultiDataSetPreProcessor preProcessor) {
    underlyingIterator.setPreProcessor(preProcessor);
}
 
开发者ID:deeplearning4j,项目名称:deeplearning4j,代码行数:5,代码来源:EarlyTerminationMultiDataSetIterator.java

示例9: getPreProcessor

import org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor; //导入依赖的package包/类
@Override
public MultiDataSetPreProcessor getPreProcessor() {
    return underlyingIterator.getPreProcessor();
}
 
开发者ID:deeplearning4j,项目名称:deeplearning4j,代码行数:5,代码来源:EarlyTerminationMultiDataSetIterator.java

示例10: getPreProcessor

import org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor; //导入依赖的package包/类
@Override
public MultiDataSetPreProcessor getPreProcessor() {
    return backingIterator.getPreProcessor();
}
 
开发者ID:deeplearning4j,项目名称:deeplearning4j,代码行数:5,代码来源:AsyncShieldMultiDataSetIterator.java

示例11: setPreProcessor

import org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor; //导入依赖的package包/类
@Override
public void setPreProcessor(MultiDataSetPreProcessor multiDataSetPreProcessor) {
    this.preProcessor = multiDataSetPreProcessor;
}
 
开发者ID:deeplearning4j,项目名称:deeplearning4j,代码行数:5,代码来源:MultiDataSetIteratorAdapter.java

示例12: getPreProcessor

import org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor; //导入依赖的package包/类
@Override
public MultiDataSetPreProcessor getPreProcessor() {
    return null;
}
 
开发者ID:deeplearning4j,项目名称:deeplearning4j,代码行数:5,代码来源:BenchmarkMultiDataSetIterator.java

示例13: preProcess

import org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor; //导入依赖的package包/类
@Override
public void preProcess(MultiDataSet multiDataSet) {
    for (MultiDataSetPreProcessor preProcessor : preProcessors) {
        preProcessor.preProcess(multiDataSet);
    }
}
 
开发者ID:deeplearning4j,项目名称:deeplearning4j,代码行数:7,代码来源:CombinedMultiDataSetPreProcessor.java

示例14: addPreProcessor

import org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor; //导入依赖的package包/类
/**
 * @param preProcessor to be added to list of preprocessors to be applied
 */
public Builder addPreProcessor(@NonNull MultiDataSetPreProcessor preProcessor) {
    preProcessors.add(preProcessor);
    return this;
}
 
开发者ID:deeplearning4j,项目名称:deeplearning4j,代码行数:8,代码来源:CombinedMultiDataSetPreProcessor.java

示例15: setPreProcessor

import org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor; //导入依赖的package包/类
@Override
public void setPreProcessor(MultiDataSetPreProcessor preProcessor) {
    // no-op
}
 
开发者ID:deeplearning4j,项目名称:deeplearning4j,代码行数:5,代码来源:VariableMultiTimeseriesGenerator.java


注:本文中的org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。