DeepLearning/Model/Fit
fit model object to training data
Calling Sequence
Parameters
Options
Description
Details
Examples
Compatibility
mdl:-Fit(x, y, opts)
mdl
-
a Model object
x
list, Array, DataFrame, DataSeries, Matrix, or Vector; input data
y
list, Array, DataFrame, DataSeries, Matrix, or Vector; target data
batchsize = posint or none
Number of samples per gradient update. If unspecified, batchsize will default to 32.
epochs = nonnegint
Number of epochs to train the model. An epoch is an iteration over the entire x and y data provided.
The model is not trained for a number of iterations given by epochs, but merely until the epoch of index epochs is reached.
shuffle = truefalse
Whether or not to reshuffle the training data before each epoch.
Fit trains a Model on data for a fixed number of epochs.
The implementation of Fit uses the fit method from tf.keras.Model in the TensorFlow Python API. Consult the TensorFlow Python API documentation for tf.keras.Model for more information on its use during TensorFlow computations.
with⁡DeepLearning
AddMultiple,ApplyOperation,BatchNormalizationLayer,BidirectionalLayer,BucketizedColumn,CategoricalColumn,Classify,Concatenate,Constant,ConvolutionLayer,DNNClassifier,DNNLinearCombinedClassifier,DNNLinearCombinedRegressor,DNNRegressor,Dataset,DenseLayer,DropoutLayer,EinsteinSummation,EmbeddingLayer,Estimator,FeatureColumn,Fill,FlattenLayer,GRULayer,GatedRecurrentUnitLayer,GetDefaultGraph,GetDefaultSession,GetEagerExecution,GetVariable,GradientTape,IdentityMatrix,LSTMLayer,Layer,LinearClassifier,LinearRegressor,LongShortTermMemoryLayer,MaxPoolingLayer,Model,NumericColumn,OneHot,Ones,Operation,Optimizer,Placeholder,RandomTensor,ResetDefaultGraph,Restore,Save,Sequential,Session,SetEagerExecution,SetRandomSeed,SoftMaxLayer,SoftmaxLayer,Tensor,Variable,Variables,VariablesInitializer,Zeros
v1≔Vector⁡8,i↦i,datatype=float8
v1≔1.2.3.4.5.6.7.8.
v2≔Vector⁡8,−1.0,1.0,5.0,11.0,19.0,29.0,41.0,55.0,datatype=float8
v2≔−1.1.5.11.19.29.41.55.
model≔Sequential⁡DenseLayer⁡1,inputshape=1
model≔DeepLearning Model<keras.src.engine.sequential.Sequential object at 0x7f9113305790>
model:-Compile⁡optimizer=sgd,loss=mean_squared_error
model:-Fit⁡v1,v2,epochs=500
<Python object: <keras.src.callbacks.History object at 0x7f9112dfb890>>
model:-Evaluate⁡10,30
loss=1037.32287597656,accuracy=0.
The DeepLearning/Model/Fit command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
See Also
DeepLearning Overview
Download Help Document