These are chat archives for deeplearning4j/deeplearning4j

27th
Sep 2018
João Batista
@ioannisbaptista
Sep 27 2018 00:00
Hello @AlexDBlack, just updated the issue #6472
tranva
@tranva
Sep 27 2018 08:19
GravesBidirectionalLSTM.Builder()
is deprecation
Alex Black
@AlexDBlack
Sep 27 2018 08:20
the whole class is deprecated. Read the javadoc, details are there
tranva
@tranva
Sep 27 2018 08:25
is there any example for Bidirectional?
is this true?
            .layer(0, new Bidirectional.Builder(Mode.ADD, new LSTM.Builder().activation(Activation.TANH).nIn(this.vectorSize).nOut(10).build()).build())
*correct
Alex Black
@AlexDBlack
Sep 27 2018 08:27
that's essentialy equivalent to GravesBidirectionalLSTM, yes
Josaped Moreno
@androuino
Sep 27 2018 08:59
Hi, I was doing this https://gist.github.com/androuino/f93f0239e8c2f459fa46962c5f4b52e7 but I'm not sure If I'm missing/messed up something with hyperparameters or with my datasets because it's throwing me an error of org.nd4j.linalg.exception.ND4JIllegalStateException: New shape length doesn't match original length: [65] vs [6760]. Original shape: [8, 5, 13, 13] New Shape: [13, 5]. I am using here the CNN conf from Darknet19 class itself. Thanks.
Alex Black
@AlexDBlack
Sep 27 2018 09:14
check the network output shapes vs. your label shapes
without looking at things in detail, that's probably the cause
(for future reference, we almost always need the full stack trace, not just one line, to debug this stuff)
Josaped Moreno
@androuino
Sep 27 2018 09:15
thanks
Exception in thread "main" org.nd4j.linalg.exception.ND4JIllegalStateException: New shape length doesn't match original length: [65] vs [6760]. Original shape: [8, 5, 13, 13] New Shape: [13, 5]
    at org.nd4j.linalg.api.ndarray.BaseNDArray.reshape(BaseNDArray.java:4296)
    at org.nd4j.linalg.api.ndarray.BaseNDArray.reshape(BaseNDArray.java:4356)
    at org.nd4j.linalg.api.ndarray.BaseNDArray.reshape(BaseNDArray.java:4659)
    at org.deeplearning4j.nn.layers.LossLayer.getLabels2d(LossLayer.java:370)
    at org.deeplearning4j.nn.layers.LossLayer.getGradientsAndDelta(LossLayer.java:151)
    at org.deeplearning4j.nn.layers.LossLayer.backpropGradient(LossLayer.java:143)
    at org.deeplearning4j.nn.graph.vertex.impl.LayerVertex.doBackward(LayerVertex.java:143)
    at org.deeplearning4j.nn.graph.ComputationGraph.calcBackpropGradients(ComputationGraph.java:2427)
    at org.deeplearning4j.nn.graph.ComputationGraph.computeGradientAndScore(ComputationGraph.java:1319)
    at org.deeplearning4j.nn.graph.ComputationGraph.computeGradientAndScore(ComputationGraph.java:1280)
    at org.deeplearning4j.optimize.solvers.BaseOptimizer.gradientAndScore(BaseOptimizer.java:178)
    at org.deeplearning4j.optimize.solvers.StochasticGradientDescent.optimize(StochasticGradientDescent.java:60)
    at org.deeplearning4j.optimize.Solver.optimize(Solver.java:54)
    at org.deeplearning4j.nn.graph.ComputationGraph.fit(ComputationGraph.java:1104)
    at org.deeplearning4j.nn.graph.ComputationGraph.fit(ComputationGraph.java:1050)
    at org.deeplearning4j.nn.graph.ComputationGraph.fit(ComputationGraph.java:944)
    at org.deeplearning4j.examples.convolution.objectdetection.HouseNumberDetection.main(HouseNumberDetection.java:172)
Alex Black
@AlexDBlack
Sep 27 2018 09:16
ok, that helps
darknet 19 has a loss layer
you want a Yolo2OutputLayer by the looks of it?
you can add it using the transfer learning API, but be careful of the output shapes again
(read the Yolo2OutputLayer javadoc carefully)
Josaped Moreno
@androuino
Sep 27 2018 09:19
ah, thanks, I'll work on it.
Foodyborris
@Foodyborris
Sep 27 2018 09:46
Hi all, just lurking here for a bit while I learn.
Ahmed Elkayesh
@localmaxima
Sep 27 2018 11:45
@AlexDBlack The javadoc of InMemoryStatsStorage says " * Internally, this implementation uses {@link MapDBStatsStorage}"...but I don't see how, could you please guide me?
Alex Black
@AlexDBlack
Sep 27 2018 11:47
It did at one point, the javadoc looks like it just wasn't changed when it was changed to no longer use MapDB
Ahmed Elkayesh
@localmaxima
Sep 27 2018 11:48
Ok. Thanks.
Alex Black
@AlexDBlack
Sep 27 2018 11:48
I've fixed that in a branch I'm working on, it'll be merged soon
Ahmed Elkayesh
@localmaxima
Sep 27 2018 11:52
May I ask a favor? :-)
-In RemoteReceiverModule.java renaming statsStorage to statsStorageRouter
-In TrainModule:161 ,please verify if the second part of the if condition is not redundant "if (sse.getEventType() == StatsStorageListener.EventType.PostStaticInfo && StatsListener.TYPE_ID.equals(sse.getTypeID()))"
Ahmed Elkayesh
@localmaxima
Sep 27 2018 12:00
Sorry if this sounds silly but I am a bit confused between what counts as StatsStorage like InMemoryStatsStorge and routers like StatsStorageRouter...I could be wrong so feel free to ignore my comment if not relevant.
Alex Black
@AlexDBlack
Sep 27 2018 12:02
StatsStorage extends StatsStorageRouter
the latter is for "put" operations - i.e., "do something with this" - for example send it across the network
the former also has the ability to query what is stored
as for the rest - if you think there's a problem, open an !issue or send us a pull request - I'm not going to look at it right now :)
Ahmed Elkayesh
@localmaxima
Sep 27 2018 12:04
Ok, thank you
HGuillemet
@HGuillemet
Sep 27 2018 16:28
Slightly out of topic question, but the answer interests me for another project around Java and imaging : why the dl4j team has chosen to use OpenCV from JavaCPP presets instead of the Java interface provided by OpenCV ?
ChrisN
@chrisvnicholson
Sep 27 2018 18:23
@saudet ^^ can answer that
Patriks Misāns
@MeSans
Sep 27 2018 19:49
Heyo, i remember there being a kick-ass glossary at https://deeplearning4j.org/glossary.html, but looks like it's been moved/deleted. Anyone got a link to where it is now or an html copy of it?
ChrisN
@chrisvnicholson
Sep 27 2018 21:28
@MeSans a lot of the material that's not specifically DL4J documentation has been moved to the skymind wiki: https://skymind.ai/wiki/glossary
Patriks Misāns
@MeSans
Sep 27 2018 21:36
@chrisvnicholson Just what i was looking foor. Thanks man
ChrisN
@chrisvnicholson
Sep 27 2018 21:43
cheers
@/all another great blog post on DL4J from Klevis Ramo: http://ramok.tech/2018/09/27/convolution-in-java/
Samuel Audet
@saudet
Sep 27 2018 22:48
@HGuillemet it's not as efficient and misses a lot of features, but JavaCV still bundles the official API, you can still use it if you want