Skip to content

Instantly share code, notes, and snippets.

View rubenfiszel's full-sized avatar

Ruben Fiszel rubenfiszel

View GitHub Profile
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
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
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):
import com.scalakata._
import scala.reflect._
@instrument class Playground {
Prog.main()
}
import com.scalakata._
@instrument class Playground {
Prog.main()
}
trait Expr {
sealed trait Exp[T]
import com.scalakata._
@instrument class Playground {
Prog.main()
}
trait Expr {
sealed trait Exp[T]
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 = {
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 = {
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
package scala.lms
package common
import internal._
import java.io.PrintWriter
import scala.reflect.SourceContext
import scala.lms.internal.{GenericNestedCodegen, GenericFatCodegen, GenerationFailedException}