Please enable JavaScript.
Coggle requires JavaScript to display documents.
Tensorflow - Coggle Diagram
Tensorflow
Introduction
-
-
Gradient
-
dy_dx = tape.gradient(y, x)
-
-
dataset = tf.data.Dataset.from_tensor_slices((df.values, target.values))
-
-
Merge models
merged = keras.layers.add([m1_layer, m2_layer])
model = keras.Model(inputs = , outputs = merged
keras.layers.substract, multiply, concatenate
Estimators API
feature_2 = tf.feature_column.categorical_column_with_vocabulary_list('feature',[vocab_list])
feature_list = tf.feature_column.numeric_column('image', shape = (784,)
-
feature_list = [feature_1, feature_2]
-
model = tf.estimator.DNNRegressor(feature_columns = feature_list, hidden_units = [])
model.train(input_fn, steps = 20)
-
-
Optimizer
-
opt.minimize(lambda: loss_function(params, features, targets), var_list = [params])
Callbacks
EarlyStopping(patience = 5, monitor = 'val_loss')
ModelCheckpoint('best_model.h5',save_best_only = True)
-
-
-
Visualize layer output
axs[0].matshow(pred_from_1st_layer[0,:,:,14], cmap = 'viridis')
Plot model structure
keras.utils.plot_model
plot_model(model, to_file='model.png')
-