Skip to content

Instantly share code, notes, and snippets.

@reisepass
Created July 28, 2015 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reisepass/38c2b29f0b1bb53e27a9 to your computer and use it in GitHub Desktop.
Save reisepass/38c2b29f0b1bb53e27a9 to your computer and use it in GitHub Desktop.
error happens on aws but not locally
/*
Exception in thread "main" java.lang.ClassCastException: breeze.linalg.Transpose cannot be cast to breeze.linalg.ImmutableNumericOps
at ch.ethz.dalab.dissolve.optimization.SolverUtils$.objectiveFunction(SolverUtils.scala:52)
at ch.ethz.dalab.dissolve.optimization.DBCFWSolverTuned.ch$ethz$dalab$dissolve$optimization$DBCFWSolverTuned$$evaluateModel$1(DBCFWSolverTuned.scala:237)
at ch.ethz.dalab.dissolve.optimization.DBCFWSolverTuned$$anonfun$optimize$1.apply$mcZI$sp(DBCFWSolverTuned.scala:375)
at ch.ethz.dalab.dissolve.optimization.DBCFWSolverTuned$$anonfun$optimize$1.apply(DBCFWSolverTuned.scala:359)
at ch.ethz.dalab.dissolve.optimization.DBCFWSolverTuned$$anonfun$optimize$1.apply(DBCFWSolverTuned.scala:359)
at scala.collection.immutable.Stream.takeWhile(Stream.scala:803)
at ch.ethz.dalab.dissolve.optimization.DBCFWSolverTuned.optimize(DBCFWSolverTuned.scala:358)
at ch.ethz.dalab.dissolve.classification.StructSVMWithDBCFW.trainModel(StructSVMWithDBCFW.scala:24)
at ch.ethz.dalab.dissolve.examples.neighbourhood.runMSRC$.runStuff(runMSRC.scala:760)
at ch.ethz.dalab.dissolve.examples.neighbourhood.runMSRC$.main(runMSRC.scala:67)
at ch.ethz.dalab.dissolve.examples.neighbourhood.runMSRC.main(runMSRC.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.spark.deploy.SparkSubmit$.launch(SparkSubmit.scala:358)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:75)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
*/
def objectiveFunction(w: Vector[Double],
b_alpha: Double,
lambda: Double): Double = {
// Return the value of f(alpha)
0.5 * lambda * (w.t * w) - b_alpha //<------ This is line 52.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment