start new:
tmux
start new with session name:
tmux new -s myname
from tensorflow import keras | |
from tensorflow.keras.preprocessing.image import load_img | |
from tensorflow.keras import Model | |
from tensorflow.keras.callbacks import EarlyStopping, ModelCheckpoint, ReduceLROnPlateau | |
from tensorflow.keras.models import load_model | |
from tensorflow.keras.optimizers import Adam | |
from tensorflow.keras.preprocessing.image import ImageDataGenerator | |
from tensorflow.keras.layers import Input, Conv2D, Conv2DTranspose, MaxPooling2D, concatenate, Dropout,BatchNormalization | |
from tensorflow.keras.layers import Conv2D, Concatenate, MaxPooling2D | |
from tensorflow.keras.layers import UpSampling2D, Dropout, BatchNormalization |
# src: https://www.kaggle.com/aglotero/another-iou-metric | |
def iou_metric(y_true_in, y_pred_in, print_table=False): | |
labels = y_true_in | |
y_pred = y_pred_in | |
true_objects = 2 | |
pred_objects = 2 | |
intersection = np.histogram2d(labels.flatten(), y_pred.flatten(), bins=(true_objects, pred_objects))[0] |
I hereby claim:
To claim this, I am signing this object:
import java.time.Instant | |
import shapeless._ | |
import simulacrum._ | |
import scala.concurrent.duration.FiniteDuration | |
import scala.language.implicitConversions | |
import scala.concurrent.duration._ | |
@typeclass | |
trait Timed[A] { | |
def getInstant(a: A): Instant |
import cats.derived._, eq._, legacy._ | |
import cats.implicits._ | |
case class Foo(a: String, b: Int) | |
case class Bar(c: Boolean) | |
Foo("a", 0) === Foo("b", 0) // compile | |
Foo("a", 0) === Bar(true) // does not compile | |
Foo("a", 0) == Bar(true) // compile with warning |
import ml.combust.mleap.runtime.{LeapFrame, LocalDataset, Row} | |
import ml.combust.mleap.runtime.types.{DoubleType, StructField, StructType, TensorType} | |
import ml.combust.mleap.tensor.Tensor | |
import resource._ | |
import ml.combust.mleap.runtime.MleapSupport._ | |
import scala.collection.JavaConverters._ | |
import com.google.common.jimfs.{Configuration, Jimfs} | |
import ml.combust.bundle.BundleFile | |
import java.nio.file.{FileSystems, Files} |
import java.util.concurrent._ | |
import akka.dispatch.{Dispatcher, ExecutorServiceDelegate} | |
import config.Config | |
import helpers.ScalaLogger | |
class ExecutionContextMonitor()(implicit metricsService: MetricsClient, config: Config) { | |
private val log = ScalaLogger.get(this.getClass) | |
private val scheduler = Executors.newSingleThreadScheduledExecutor() |