Ekta Khanna created MADLIB-1335:
-----------------------------------
Summary: Add new param loss_compute_frequency to madlib_keras_fit()
Key: MADLIB-1335
URL: https://issues.apache.org/jira/browse/MADLIB-1335
Project: Apache MADlib
Issue Type: New Feature
Components: Deep Learning
Reporter: Ekta Khanna
Fix For: v1.16
As a data scientist, I want to specify how often to calculate loss/accuracy for
training and validation data (if provided), i.e, every n iterations
Interface
{code}
madlib_keras_fit(
source_table VARCHAR,
model VARCHAR,
dependent_varname VARCHAR,
independent_varname VARCHAR,
model_arch_table VARCHAR,
model_arch_id INTEGER,
compile_params VARCHAR,
fit_params VARCHAR,
num_iterations INTEGER,
use_gpu BOOLEAN,
validation_table VARCHAR,
loss_compute_frequency INTEGER <-------- NEW OPTIONAL PARAM
name VARCHAR,
description VARCHAR
{code}
where {{loss_compute_frequency}} is an optional parameter that means:
{code}
NULL - calculate loss/frequency only on final model after last iteration
(default)
n - calculate loss/frequency every n-th iteration and on final model after last
iteration
{code}
and {{loss_compute_frequency must be >=1 and <=num_iterations}}
Test cases to consider:
1) Set {{num_iterations = 12}} and leave {{loss_compute_frequency}} as default
and get 1 loss/accuracy value at end after 12 iterations
2) Set {{num_iterations = 12}} and set {{loss_compute_frequency = 5}} and get
loss/accuracy after 5th and 10th iterations and at end after 12 iterations
3) Set {{num_iterations = 12}} and set {{loss_compute_frequency = 99}} and get
1 loss/accuracy value at end after 12 iterations
4) Set {{loss_compute_frequency = 0}} and get an error
5) Set {{loss_compute_frequency = num_iterations+1}} and get an error
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)