LostTech.TensorFlow : API Documentation

Type Model

Namespace tensorflow.keras

Parent Network

Interfaces IModel

`Model` groups layers into an object with training and inference features.

There are two ways to instantiate a `Model`:

1 - With the "functional API", where you start from `Input`, you chain layer calls to specify the model's forward pass, and finally you create your model from inputs and outputs: 2 - By subclassing the `Model` class: in that case, you should define your layers in `__init__` and you should implement the model's forward pass in `call`. If you subclass `Model`, you can optionally have a `training` argument (boolean) in `call`, which you can use to specify a different behavior in training and inference:
Show Example
import tensorflow as tf 

inputs = tf.keras.Input(shape=(3,)) x = tf.keras.layers.Dense(4, activation=tf.nn.relu)(inputs) outputs = tf.keras.layers.Dense(5, activation=tf.nn.softmax)(x) model = tf.keras.Model(inputs=inputs, outputs=outputs)

Properties

Public properties

PythonFunctionContainer activity_regularizer get; set;

object activity_regularizer_dyn get; set;

bool built get; set;

object dtype get;

object dtype_dyn get;

bool dynamic get;

object dynamic_dyn get;

IList<Node> inbound_nodes get;

object inbound_nodes_dyn get;

IList<object> input get;

object input_dyn get;

object input_mask get;

object input_mask_dyn get;

IList<object> input_names get; set;

IList<object> input_shape get;

object input_shape_dyn get;

object input_spec get; set;

object input_spec_dyn get;

IList<object> inputs get; set;

IList<Layer> layers get;

object layers_dyn get;

object loss get; set;

IList<object> loss_functions get; set;

IList<double> loss_weights get; set;

IList<object> losses get;

object losses_dyn get;

IList<object> metrics get;

Returns the model's metrics added using `compile`, `add_metric` APIs.

object metrics_dyn get;

Returns the model's metrics added using `compile`, `add_metric` APIs.

IList<object> metrics_names get;

Returns the model's display labels for all outputs.

object metrics_names_dyn get;

Returns the model's display labels for all outputs.

object name get;

object name_dyn get;

object name_scope get;

object name_scope_dyn get;

IList<object> non_trainable_variables get;

object non_trainable_variables_dyn get;

IList<object> non_trainable_weights get;

object non_trainable_weights_dyn get;

object optimizer get; set;

IList<object> outbound_nodes get;

object outbound_nodes_dyn get;

IList<object> output get;

object output_dyn get;

object output_mask get;

object output_mask_dyn get;

IList<object> output_names get; set;

object output_shape get;

object output_shape_dyn get;

IList<object> outputs get; set;

object predict_function get; set;

object PythonObject get;

Nullable<bool> run_eagerly get; set;

Settable attribute indicating whether the model should run eagerly.

Running eagerly means that your model will be run step by step, like Python code. Your model might run slower, but it should become easier for you to debug it by stepping into individual layer calls.

By default, we will attempt to compile your model to a static graph to deliver the best execution performance.

object run_eagerly_dyn get; set;

Settable attribute indicating whether the model should run eagerly.

Running eagerly means that your model will be run step by step, like Python code. Your model might run slower, but it should become easier for you to debug it by stepping into individual layer calls.

By default, we will attempt to compile your model to a static graph to deliver the best execution performance.

string sample_weight_mode get; set;

IList<Tensor> sample_weights get;

object sample_weights_dyn get;

IList<object> state_updates get;

object state_updates_dyn get;

bool stateful get;

object stateful_dyn get;

ValueTuple<object> submodules get;

object submodules_dyn get;

bool supports_masking get; set;

object test_function get; set;

Nullable<double> total_loss get; set;

object train_function get; set;

bool trainable get; set;

object trainable_dyn get; set;

object trainable_variables get;

object trainable_variables_dyn get;

IList<object> trainable_weights get;

object trainable_weights_dyn get;

IList<object> updates get;

object updates_dyn get;

object variables get;

object variables_dyn get;

IList<object> weights get;

object weights_dyn get;