This file contains 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 spatial.dsl._ | |
import org.virtualized._ | |
import spatial.SpatialCompiler | |
import spatial.interpreter.Interpreter | |
import spatial.interpreter.Streams | |
import spatial.metadata._ | |
trait ParticleFilter extends SpatialStream { | |
val N: scala.Int = 10 |
This file contains 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
from __future__ import print_function | |
from keras import layers | |
from keras.layers import Activation | |
from keras.layers.normalization import BatchNormalization | |
from keras import models | |
from keras.datasets import cifar10 | |
from keras.utils import np_utils | |
from keras.callbacks import CSVLogger |
This file contains 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
from keras import layers | |
from keras.layers import Activation | |
from keras import models | |
def residual_network(x): | |
def resnet_conv(channels, kernel_size, strides, y): |
This file contains 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 com.scalakata._ | |
import scala.reflect._ | |
@instrument class Playground { | |
Prog.main() | |
} |
This file contains 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 com.scalakata._ | |
@instrument class Playground { | |
Prog.main() | |
} | |
trait Expr { | |
sealed trait Exp[T] |
This file contains 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 com.scalakata._ | |
@instrument class Playground { | |
Prog.main() | |
} | |
trait Expr { | |
sealed trait Exp[T] |
This file contains 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 Lambda[A:Rep, B:Rep](f: A => B) extends (A => B) { | |
val rA = rep[A] | |
val rB = rep[B] | |
type InternalB = rB.Internal | |
lazy val lambda: Exp[rA.Internal => InternalB] = doLambdaDef(f)(rA, rB) | |
def apply(arg:A):B = { |
This file contains 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 Lambda[A:Rep, B:Rep](f: A => B) extends (A => B) { | |
val rA = rep[A] | |
val rB = rep[B] | |
type InternalB = rB.Internal | |
lazy val lambda: Exp[rA.Internal => InternalB] = doLambdaDef(f)(rA, rB) | |
def apply(arg:A):B = { |
This file contains 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 numpy as np | |
np.random.seed(1337) # for reproducibility | |
from keras.preprocessing import sequence | |
from keras.models import Sequential | |
import as_keras_ds | |
import argparse | |
from keras.models import load_model | |
import sys | |
import os |
This file contains 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 internal._ | |
import java.io.PrintWriter | |
import scala.reflect.SourceContext | |
import scala.lms.internal.{GenericNestedCodegen, GenericFatCodegen, GenerationFailedException} | |
NewerOlder