Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// REFERENCES: | |
// http://ffmpeg.org/doxygen/trunk/doc_2examples_2decoding__encoding_8c-example.html | |
// https://blinkingblip.wordpress.com/2011/10/08/decoding-and-playing-an-audio-stream-using-libavcodec-libavformat-and-libao/ | |
extern "C" { | |
#include <stdio.h> | |
#include <libavcodec/avcodec.h> | |
#include <libavformat/avformat.h> | |
#include <libavutil/avutil.h> | |
#include <ao/ao.h> |
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
#!/bin/sh | |
in_1_fname=./wavefile1.wav | |
in_2_fname=./wavefile2.wav | |
out_fname=./out.wav | |
threshold=-50dB | |
pause=1.5 # seconds | |
ffmpeg -loglevel verbose -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
FROM ubuntu:16.04 | |
MAINTAINER Craig Citro <[email protected]> | |
# Pick up some TF dependencies | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
build-essential \ | |
curl \ | |
libfreetype6-dev \ | |
libpng12-dev \ |
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 tensorflow/tensorflow:1.12.0-devel-gpu-py3 | |
RUN apt-get update / | |
&& apt-get install git -y | |
# TensorBoard | |
EXPOSE 6006 | |
# IPython | |
EXPOSE 8888 |
This file has been truncated, but you can view the full file.
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
node { | |
name: "global_step/Initializer/zeros" | |
op: "Const" | |
attr { | |
key: "_class" | |
value { | |
list { | |
s: "loc:@global_step" | |
} | |
} |
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 tensor2tensor.models import transformer | |
import tensorflow as tf | |
hparams = transformer.transformer_base() | |
encoder = transformer.TransformerEncoder(hparams, mode=tf.estimator.ModeKeys.TRAIN) | |
#x = <your inputs, which should be of shape [batch_size, timesteps, 1, hparams.hidden_dim]> | |
#y = encoder({"inputs": x}) | |
# model_fn_body(features) |
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
PROBLEM=sentiment_imdb_characters | |
MODEL=transformer_encoder | |
HPARAMS=transformer_base_single_gpu | |
DATA_DIR=$HOME/t2t_data | |
TMP_DIR=/tmp/t2t_datagen | |
TRAIN_DIR=$HOME/t2t_train/$PROBLEM/$MODEL-$HPARAMS | |
BATCH_SIZE=512 | |
mkdir -p $DATA_DIR $TMP_DIR |
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
PROBLEM=sentiment_imdb_characters | |
MODEL=transformer_encoder | |
HPARAMS=transformer_base | |
DATA_DIR=$HOME/t2t_data | |
TMP_DIR=/tmp/t2t_datagen | |
TRAIN_DIR=$HOME/t2t_train/$PROBLEM/$MODEL-$HPARAMS | |
BATCH_SIZE=2048 | |
WORKER_GPU=2 | |
TRAIN_STEPS=500000 |
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
@echo off | |
pushd %~dp0 | |
set image_path="%CD%\BACKGROUND_IMAGE.jpg" | |
set output_video_path="%~dpn1.mp4" | |
echo "PREPARING OUTPUT: %output_video_path%" | |
ffmpeg -loop 1 -i "%image_path%" -i "%~1" -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest "%output_video_path%" |
OlderNewer