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
package scala.lms | |
package common | |
import simulacrum._ | |
trait Ints2 extends Base { | |
@typeclass trait Num[A]{ | |
@op("+") def plus(x:A, y: A): A | |
} |
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
def __ifThenElse[A:Rep, B](cond: Boolean, thenp: => A, elsep: => B)(implicit pos: SourceContext, mB: Lift[B,A]): A | |
abstract class AbstractIfThenElse[T] extends Def[T] { | |
val cond: Exp[scala.Boolean] | |
val thenp: Block[T] | |
val elsep: Block[T] | |
} | |
case class IfThenElse[T:Typ](cond: Exp[Boolean], thenp: Block[T], elsep: Block[T]) extends AbstractIfThenElse[T] | |
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
scala> trait Exp[T] { def p = 1 } | |
defined trait Exp | |
scala> trait Expr { type E[T] <: Exp[T] } | |
warning: there was one feature warning; re-run with -feature for details | |
defined trait Expr | |
scala> object G extends Expr { type E[T] = Exp[T]; def e:E[Any] = new Exp[Any]{} } | |
defined object G |
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
test("4") { | |
trait Linp4 extends Matrices with BoolAlgebra { | |
val det: Matrix[X] => X = toplevel("det", { (a: Matrix[X]) => | |
requires(a.rows == a.cols) | |
a.reflectMutableInput | |
requires(a.rows == a.cols) | |
val order = a.rows | |
if (order == 1) | |
a(0, 0) | |
else { |
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
package org.deeplearning4j.rl4j; | |
import org.deeplearning4j.rl4j.gym.space.Box; | |
import org.deeplearning4j.rl4j.learning.ILearning; | |
import org.deeplearning4j.rl4j.learning.sync.qlearning.QLearning; | |
import org.deeplearning4j.rl4j.learning.sync.qlearning.discrete.QLearningDiscreteDense; | |
import org.deeplearning4j.rl4j.mdp.gym.GymEnv; | |
import org.deeplearning4j.rl4j.network.dqn.DQNFactoryStdDense; | |
import org.deeplearning4j.rl4j.policy.DQNPolicy; |
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
Xcursor.theme: Vanilla-DMZ-AA | |
Xcursor.size: 22 | |
URxvt*termName: rxvt | |
URxvt.saveLines: 32767 | |
URxvt*scrollstyle: plain | |
URxvt*scrollBar_right: true |
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
package org.deeplearning4j.rl4j; | |
import org.deeplearning4j.nn.api.OptimizationAlgorithm; | |
import org.deeplearning4j.nn.conf.MultiLayerConfiguration; | |
import org.deeplearning4j.nn.conf.NeuralNetConfiguration; | |
import org.deeplearning4j.nn.conf.Updater; | |
import org.deeplearning4j.nn.conf.layers.DenseLayer; | |
import org.deeplearning4j.nn.conf.layers.OutputLayer; | |
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork; | |
import org.deeplearning4j.nn.weights.WeightInit; |
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
package org.deeplearning4j.rl4j; | |
import org.deeplearning4j.nn.api.OptimizationAlgorithm; | |
import org.deeplearning4j.nn.conf.MultiLayerConfiguration; | |
import org.deeplearning4j.nn.conf.NeuralNetConfiguration; | |
import org.deeplearning4j.nn.conf.Updater; | |
import org.deeplearning4j.nn.conf.layers.DenseLayer; | |
import org.deeplearning4j.nn.conf.layers.OutputLayer; | |
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork; | |
import org.deeplearning4j.nn.weights.WeightInit; |
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
package org.deeplearning4j.rl4j; | |
import org.deeplearning4j.nn.api.OptimizationAlgorithm; | |
import org.deeplearning4j.nn.conf.MultiLayerConfiguration; | |
import org.deeplearning4j.nn.conf.NeuralNetConfiguration; | |
import org.deeplearning4j.nn.conf.Updater; | |
import org.deeplearning4j.nn.conf.layers.DenseLayer; | |
import org.deeplearning4j.nn.conf.layers.OutputLayer; | |
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork; | |
import org.deeplearning4j.nn.weights.WeightInit; |
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
package org.deeplearning4j.rl4j; | |
/** | |
* @author rubenfiszel ([email protected]) on 8/9/16. | |
*/ | |
import org.deeplearning4j.nn.gradient.Gradient; | |
import org.nd4j.linalg.dataset.api.iterator.DataSetIterator; | |
import org.deeplearning4j.datasets.iterator.impl.ListDataSetIterator; | |
import org.deeplearning4j.nn.api.OptimizationAlgorithm; |