Seq2Seqといえば、TensorFlowでの実装が有名で、英語とフランス語の大規模コーパスを使ってやるものが、よくチューニングされており便利です
しかし、この翻訳のタスクに最適化されており、一般的なものと言い難い感じで任意のタスクに変換して利用する際に少々不便を感じていました。
(TensorFlowのものは、自分で改造するにしても人に説明する際も、ちょっと面倒)
今回、Kerasで実装して、ある程度、うまく動作することを確認しました
javascript: document.querySelectorAll(".oax").forEach(function(e) {e.addEventListener("mouseenter", function() { e.parentNode.childNodes.forEach((e) => { e.classList.remove("active"); }); e.classList.add("active"); e.parentNode.firstElementChild.value = parseInt(e.id.slice(-1)) + 1}, false);}) |
FROM golang:alpine as builder | |
WORKDIR /app | |
#the following 2 steps are optional if your image does not already have the certificate | |
# package installed, golang:alpine now seems to have it. But a more base image could be missing it. | |
#RUN apk update && apk upgrade && apk add --no-cache ca-certificates | |
#RUN update-ca-certificates | |
ADD main.go /app/main.go | |
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags="-s -w" -installsuffix cgo -o app . | |
FROM scratch |
#!/bin/bash | |
# Have to redirect stderr to stdout here because slave.py uses stderr for output. | |
~/bin/slave.py list 2>&1 >/dev/null | grep beaker-slave- | while read slave; do | |
echo | |
echo "Checking status of $slave..." | |
# First, check if we can SSH into the host. If we can, then check the process and maybe shut down. | |
# This makes sure that we don't consider an SSH failure to be reason to shut down the node. | |
if ssh $slave echo < /dev/null; then |
rm -rf install_* | |
rm -rf output-* | |
# build simulator | |
./configure --prefix=`pwd`/install_i386 CFLAGS="-Ofast -mios-version-min=5.0" LDFLAGS="-flto" CC="xcrun -sdk iphonesimulator clang -arch i386" | |
make clean && make -j8 && make install | |
./configure --prefix=`pwd`/install_x86_64 CFLAGS="-Ofast -mios-version-min=5.0" LDFLAGS="-flto" CC="xcrun -sdk iphonesimulator clang -arch x86_64" | |
make clean && make -j8 && make install |
#!/usr/bin/env ruby | |
file = File.open("index.html", "r:iso-2022-jp:UTF-8") | |
content = file.read | |
all_html = <<HTML | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
<meta name="Author" content="Aoki Minero"> |