Skip to content

Commit

Permalink
Minor test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexDBlack committed Jun 14, 2018
1 parent edbf0b6 commit fd42330
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -2,6 +2,8 @@

import org.datavec.api.records.reader.RecordReader;
import org.datavec.api.split.FileSplit;
import org.junit.Rule;
import org.junit.rules.TemporaryFolder;
import org.nd4j.linalg.io.ClassPathResource;
import org.datavec.image.recordreader.ImageRecordReader;
import org.deeplearning4j.BaseDL4JTest;
Expand Down Expand Up @@ -40,6 +42,9 @@
*/
public class ConvolutionLayerSetupTest extends BaseDL4JTest {

@Rule
public TemporaryFolder testDir = new TemporaryFolder();

@Test
public void testConvolutionLayerSetup() {
MultiLayerConfiguration.Builder builder = inComplete();
Expand Down Expand Up @@ -125,7 +130,9 @@ public void testMultiChannel() throws Exception {
@Test
public void testLRN() throws Exception {
List<String> labels = new ArrayList<>(Arrays.asList("Zico", "Ziwang_Xu"));
String rootDir = new ClassPathResource("lfwtest").getFile().getAbsolutePath();
File dir = testDir.newFolder();
new ClassPathResource("lfwtest/").copyDirectory(dir);
String rootDir = dir.getAbsolutePath();

RecordReader reader = new ImageRecordReader(28, 28, 3);
reader.initialize(new FileSplit(new File(rootDir)));
Expand Down

0 comments on commit fd42330

Please sign in to comment.