Run the following
$ sudo apt install gcc gdb build-essential codeblocks
import tensorflow as tf | |
mnist = tf.keras.datasets.mnist | |
(x_train, y_train), (x_test, y_test) = mnist.load_data() | |
x_train, x_test = x_train / 255.0, x_test / 255.0 | |
model = tf.keras.models.Sequential([ | |
tf.keras.layers.Flatten(input_shape=(28, 28)), | |
tf.keras.layers.Dense(128, activation='relu'), | |
tf.keras.layers.Dense(16, activation='relu'), | |
tf.keras.layers.Dropout(0.2), | |
tf.keras.layers.Dense(10) |
import tensorflow as tf | |
# Loading the data | |
mnist = tf.keras.datasets.mnist | |
(x_train,y_train),(x_test,y_test) = | |
mnist.load_data() | |
# Preprocessing - Normalization | |
x_train, x_test = x_train / 255.0, x_test / 255.0 | |
# Build the network |
FROM node:14.15.4-slim | |
WORKDIR /app | |
# Ensures tzinfo doesn't ask for region info. | |
ENV DEBIAN_FRONTEND noninteractivesdsd | |
RUN apt-get update && apt-get install -y wget \ | |
xz-utils \ | |
dumb-init \ |
<html> | |
<script | |
src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@latest"> | |
</script> | |
<script lang="js"> | |
async function readCSV() { | |
const csvUrl = 'iris.csv'; | |
const trainingData = tf.data.csv(csvUrl, { | |
columnConfigs: { | |
species: { |
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options | |
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full. | |
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}… | |
Getting help: | |
-h — print basic options | |
-h long — print more options | |
-h full — print all options (including all format and codec specific options, very long) |
rank_0_tensor = tf.constant(4) | |
print(rank_0_tensor) | |
tf.Tensor(4, shape=(), dtype=int32) | |
rank_1_tensor = tf.constant([2.0, 3.0, 4.0]) | |
print(rank_1_tensor) | |
rank_2_tensor = tf.constant([[1, 2], | |
[3, 4], | |
[5, 6]], dtype=tf.float16) |
>>> import tensorflow as tf | |
>>> a = tf.constant(2) | |
>>> a | |
<tf.Tensor: shape=(), dtype=int32, numpy=2> | |
>>> b = tf.constant(3) | |
>>> c = tf.constant(5) | |
>>> | |
>>> tf.add(a, b) | |
<tf.Tensor: shape=(), dtype=int32, numpy=5> | |
>>> tf.subtract(a, b) |
>>> tf.reduce_mean([a, b, c]) | |
<tf.Tensor: shape=(), dtype=int32, numpy=3> | |
>>> tf.reduce_sum([a, b, c]) | |
<tf.Tensor: shape=(), dtype=int32, numpy=10> | |
>>> matrix1 = tf.constant([[1., 2.], [3., 4.]]) | |
>>> matrix2 = tf.constant([[5., 6.], [7., 8.]]) | |
>>> tf.matmul(matrix1, matrix2) | |
<tf.Tensor: shape=(2, 2), dtype=float32, |
def model(X): | |
ŷ = processing(X) | |
return ŷ | |
def doML(X,y): | |
while(!ModeIsGood): | |
predicted = model(X) | |
error = minimize(predicted - y) | |
if( almostEquals(predicted , y) ): | |
ModeIsGood = true |