This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.file.Paths | |
import org.eclipse.jgit.lib._ | |
import org.eclipse.jgit.api._ | |
import org.eclipse.jgit.revwalk._ | |
import org.eclipse.jgit.treewalk._ | |
import org.eclipse.jgit.diff._ | |
val repo: Repository | |
val git: Git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class Grammar(V: Set[Char], | |
Σ: Set[Char], | |
P: List[(Char, String)], | |
S: Char) | |
object CYK { | |
def cartesian(as: Array[Char], bs: Array[Char]): Array[String] = { | |
for {a <- as; b <- bs} yield (a.toString + b.toString) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import better.files.File | |
import org.deeplearning4j.models.embeddings.loader.WordVectorSerializer | |
import org.deeplearning4j.models.paragraphvectors.ParagraphVectors | |
import org.deeplearning4j.models.sequencevectors.interfaces.SequenceIterator | |
import org.deeplearning4j.models.sequencevectors.sequence.Sequence | |
import org.deeplearning4j.models.word2vec.VocabWord | |
import org.nd4j.linalg.ops.transforms.Transforms | |
object Doc2VecIMDB extends App { | |
val vec = new ParagraphVectors.Builder() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.IllegalArgumentException: Length is >= Integer.MAX_VALUE: lengthLong() must be called instead | |
at org.nd4j.linalg.api.ndarray.BaseNDArray.length(BaseNDArray.java:4269) | |
at org.nd4j.linalg.api.ndarray.BaseNDArray.muli(BaseNDArray.java:1550) | |
at org.nd4j.linalg.api.ndarray.BaseNDArray.muli(BaseNDArray.java:3418) | |
at org.deeplearning4j.plot.Tsne.x2p(Tsne.java:260) | |
at org.deeplearning4j.plot.Tsne.calculate(Tsne.java:106) | |
at org.deeplearning4j.plot.BarnesHutTsne.fit(BarnesHutTsne.java:431) | |
at org.deeplearning4j.plot.BarnesHutTsne.fit(BarnesHutTsne.java:641) | |
java.lang.IllegalArgumentException: Length is >= Integer.MAX_VALUE: lengthLong() must be called instead |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16/08/17 14:41:17 INFO HFileOutputFormat2: detected MapR table /mapr/dev-hadoop01-samham/firstaid/Developer1/tables/rescoredDocPref, switching to BulkLoadRecordWriter | |
16/08/17 14:41:17 ERROR Executor: Exception in task 0.0 in stage 2.2 (TID 514) | |
java.lang.LinkageError: loader constraint violation: when resolving method "com.mapr.fs.jni.MapRPut.<init>(Ljava/lang/Object;Lcom/mapr/fs/jni/MapRCallBackQueue;)V" the class loader (instance of org/apache/spark/util/MutableURLClassLoader) of the current class, com/mapr/fs/hbase/PutConverter, and the class loader (instance of sun/misc/Launcher$ExtClassLoader) for the method's defining class, com/mapr/fs/jni/MapRPut, have different Class objects for the type com/mapr/fs/jni/MapRCallBackQueue used in the signature | |
at com.mapr.fs.hbase.PutConverter.createMapRPut(PutConverter.java:124) | |
at com.mapr.fs.hbase.PutConverter.sortedKeyValuesToMapRPut(PutConverter.java:106) | |
at com.mapr.fs.hbase.BulkLoadRecordWriter.appendRow(BulkLoadRecordWriter.java:123) | |
at com.mapr.fs.hbase. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File "encoder_sentences_softmax.py", line 374, in <module> | |
save_model(model) | |
File "encoder_sentences_softmax.py", line 92, in save_model | |
nn_model.save_weights(MODEL_PATH, overwrite=True) | |
File "C:\Anaconda2\envs\firstaid\lib\site-packages\keras\engine\topology.py", line 2332, in save_weights | |
dtype=val.dtype) | |
File "C:\Anaconda2\envs\firstaid\lib\site-packages\h5py\_hl\group.py", line 108, in create_dataset | |
self[name] = dset | |
File "h5py\_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (C:\Minonda\conda-bld\work\h5py\_objects.c:2696) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File "C:\Anaconda2\envs\firstaid\lib\site-packages\keras\models.py", line 661, in fit_generator | |
max_q_size=max_q_size) | |
File "C:\Anaconda2\envs\firstaid\lib\site-packages\keras\engine\training.py", line 1314, in fit_generator | |
self._make_train_function() | |
File "C:\Anaconda2\envs\firstaid\lib\site-packages\keras\engine\training.py", line 672, in _make_train_function | |
trainable_weights = collect_trainable_weights(self) | |
File "C:\Anaconda2\envs\firstaid\lib\site-packages\keras\engine\training.py", line 249, in collect_trainable_weights | |
weights += collect_trainable_weights(sublayer) | |
File "C:\Anaconda2\envs\firstaid\lib\site-packages\keras\engine\training.py", line 257, in collect_trainable_weights | |
weights.sort(key=lambda x: x.name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.IllegalStateException: Unable to get number of of columns for a non 2d matrix | |
at org.nd4j.linalg.api.ndarray.BaseNDArray.columns(BaseNDArray.java:3443) | |
at org.nd4j.linalg.dataset.DataSet.merge(DataSet.java:117) | |
at org.deeplearning4j.spark.impl.multilayer.IterativeReduceFlatMap.call(IterativeReduceFlatMap.java:85) | |
at org.deeplearning4j.spark.impl.multilayer.IterativeReduceFlatMap.call(IterativeReduceFlatMap.java:49) | |
at org.apache.spark.api.java.JavaRDDLike$$anonfun$fn$5$1.apply(JavaRDDLike.scala:160) | |
at org.apache.spark.api.java.JavaRDDLike$$anonfun$fn$5$1.apply(JavaRDDLike.scala:160) | |
at org.apache.spark.rdd.RDD$$anonfun$14.apply(RDD.scala:634) | |
at org.apache.spark.rdd.RDD$$anonfun$14.apply(RDD.scala:634) | |
at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:35) |