Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 15:29
    kwatters commented #6409
  • 13:28
    AlexDBlack edited #8098
  • 13:26
    AlexDBlack edited #8098
  • 13:15
    saudet commented #6409
  • 13:13
    saudet commented #6409
  • 12:52
    AlexDBlack edited #8098
  • 11:40
    codenamebob commented #6409
  • 11:03
    saudet commented #6409
  • 10:57
    saudet commented #6409
  • 10:15
    bobbylee90 commented #6409
  • 09:51
    linuxciscoarnaud commented #8110
  • 08:55
    AlexDBlack commented #8110
  • 08:42
    linuxciscoarnaud commented #8110
  • 07:44
    AlexDBlack commented #8110
  • 07:37
    linuxciscoarnaud commented #8110
  • 07:35
    linuxciscoarnaud commented #8110
  • 06:33
    AlexDBlack commented #8110
  • 06:13
    linuxciscoarnaud commented #8110
  • 02:42
    rnett closed #8085
  • 02:41
    rnett commented #8085
Eduardo Gonzalez
@wmeddie
You use them to analyze and transform data.
or… more specifically you use them as part of an transform (or analysis) process.
Gili Tzabari
@cowwoc
I thought I was supposed to use DataVec to convert input sentences into vectors and somehow feed them (in this format) into the model...?
Eduardo Gonzalez
@wmeddie
Yes you can do that too.
I just need to find a good example.
Gili Tzabari
@cowwoc
Right, because in that context I could not find a way to convert String (sentences) to vectors. I had a word2vec ready to do the mapping but couldn't find a way to provide this mapping to a Schema or Transformer.
Eduardo Gonzalez
@wmeddie
NLP is a weak spot in DataVec currently.
But I’m pretty sure we had something to do that.
Hmm… I’m not finding it, need to dig into my own computer one sec. I know I have something that uses datavec here somewhere.
Gili Tzabari
@cowwoc
Glad to hear I'm not crazy :) I posted https://stackoverflow.com/q/57566415/14731. You might want to provide a canonical answer there to help others who might come in the future.
Eduardo Gonzalez
@wmeddie
Ah found the transform I was thinking of: TextToTermIndexSequenceTransform
Such an easy name to search for >_<
Gili Tzabari
@cowwoc
:)
Right, so this will do vectorization but it sounds like it'll yield low accuracy because it does not use word2vec.
Eduardo Gonzalez
@wmeddie
Ah yes, but you can put those vectors into your model using an embedding layer.
Gili Tzabari
@cowwoc
Do you have an example showing how to do that?
Eduardo Gonzalez
@wmeddie
I do not.
yet
That has what I’m talking about.
The adding of the word2vec vectors into the model is in the line model.getLayer("embeddingEncoder").setParam("W", table)
And table is essentially the word2vec model with only the words present in the training set.
Gili Tzabari
@cowwoc
Do the input nodes take string as input...?
Eduardo Gonzalez
@wmeddie
no it takes an array of indicies. like [1, 5, 25, 100]
Gili Tzabari
@cowwoc
What do they signify?
Eduardo Gonzalez
@wmeddie
the words as you can see:
actionList=[DataAction(ConvertToSequence()), DataAction(TextToTermIndexSequenceTransform(wordIndexMap={=0, prepare=3510, lviv=2671, backbonejavascript=387, pipefitter=3399, zencart=5115, postman=3474, would=5041, brooklyn=536, …
Gili Tzabari
@cowwoc
There is a lot of code there so excuse me if I missed something... If I understand you correctly, you have a DataSetReader somewhere that reads the training set as text, maps them to integer indexes that denote the index of the word2vec row inserted into the embedded layer?
Eduardo Gonzalez
@wmeddie
exactly.
sean-reed
@sean-reed
I'm trying to import a Keras model with a custom activation function, which results in an exception "org.deeplearning4j.nn.modelimport.keras.exceptions.UnsupportedKerasConfigurationException: Unknown Keras activation function". Is there any way to define the model in Java and make it available so that the model can be imported?
Gili Tzabari
@cowwoc
@wmeddie If you get a chance, please post a self-contained example doing all of this because I have a hard time seeing all the pieces in the current form. For example, it's not clear to me how to look up which index/row a word ended up in.
Eduardo Gonzalez
@wmeddie
I will probably never get that chance… T__T
sean-reed
@sean-reed
*define the activation function I meant to say
Gili Tzabari
@cowwoc
@wmeddie Will the zepl link stay up forever? Or is there a risk of it getting deleted?
Eduardo Gonzalez
@wmeddie
Realized there’s a couple of PII in there so I’ll be taking it down.
Export it as a PDF if you want to save it.
Gili Tzabari
@cowwoc
:( Okay.
Eduardo Gonzalez
@wmeddie
Really need to add that to examples somewhere.
Maybe during my next vacation :-)
Gili Tzabari
@cowwoc
Yes please :) Should I file a bug report for this? Or will you do it?
Eduardo Gonzalez
@wmeddie
Feel free to add it as an issue to the examples repo.
That way it looks more real if people other than myself are asking for it.
Gili Tzabari
@cowwoc
@wmeddie Take a look at deeplearning4j/dl4j-examples#877 ... It sounds a big vague so I would appreciate you fleshing it out a bit.
Eduardo Gonzalez
@wmeddie
Thanks
Eduardo Gonzalez
@wmeddie
It could be possible though...
sean-reed
@sean-reed
@wmeddie ok thanks, I'll look into it
If the activation is it’s own layer and not an activation property of another layer.
And it supports doing the same thing for lambda layers too. Which I did not know.
sean-reed
@sean-reed
Great! thanks