Hmm... I'm not sure I see a way to utilize Keras optimizers since the only two signatures I'm seeing are for "__saved_model_init_op" and a "tensorflow/serving/predict" method. And there are functions "__call__", "_default_save_signature", and "call_and_return_all_conditional_losses". Is that what you would expect to be seeing? I do have "experimental_training" enabled.
I may be able to do the training on the Rust side using the `Optimizer` trait, but it seems to require a list of all variables to be optimized. Is that available somewhere, like Python's "trainable_variables" on `Model`?
The script defining the model is
here.
And here is the saved_model_cli output in case it's helpful:
MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:
signature_def['__saved_model_init_op']:
The given SavedModel SignatureDef contains the following input(s):
The given SavedModel SignatureDef contains the following output(s):
outputs['__saved_model_init_op'] tensor_info:
dtype: DT_INVALID
shape: unknown_rank
name: NoOp
Method name is:
signature_def['serving_default']:
The given SavedModel SignatureDef contains the following input(s):
inputs['1d_features'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 14)
name: serving_default_1d_features:0
inputs['is_enemy_belligerent'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 121)
name: serving_default_is_enemy_belligerent:0
inputs['is_neutral'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 121)
name: serving_default_is_neutral:0
inputs['is_observed'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 121)
name: serving_default_is_observed:0
The given SavedModel SignatureDef contains the following output(s):
outputs['action_value_00'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:0
outputs['action_value_01'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:1
outputs['action_value_02'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:2
outputs['action_value_03'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:3
outputs['action_value_04'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:4
outputs['action_value_05'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:5
outputs['action_value_06'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:6
outputs['action_value_07'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:7
outputs['action_value_08'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:8
outputs['action_value_09'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:9
outputs['action_value_10'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:10
outputs['action_value_11'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:11
outputs['action_value_12'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:12
outputs['action_value_13'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:13
outputs['action_value_14'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:14
outputs['action_value_15'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:15
outputs['action_value_16'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:16
outputs['action_value_17'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:17
outputs['action_value_18'] tensor_info:
dtype: DT_DOUBLE
shape: (-1, 1)
name: StatefulPartitionedCall:18
Method name is: tensorflow/serving/predict
WARNING:tensorflow:From /home/josh/Projects/Umpire/venv/lib/python3.8/site-packages/tensorflow/python/ops/resource_variable_ops.py:1813: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
Defined Functions:
Function Name: '__call__'
Option #1
Callable with:
Argument #1
DType: list
Value: [TensorSpec(shape=(None, 14), dtype=tf.float64, name='1d_features'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='is_enemy_belligerent'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='is_observed'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='is_neutral')]
Argument #2
DType: bool
Value: True
Argument #3
DType: NoneType
Value: None
Option #2
Callable with:
Argument #1
DType: list
Value: [TensorSpec(shape=(None, 14), dtype=tf.float64, name='inputs/0'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='inputs/1'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='inputs/2'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='inputs/3')]
Argument #2
DType: bool
Value: True
Argument #3
DType: NoneType
Value: None
Option #3
Callable with:
Argument #1
DType: list
Value: [TensorSpec(shape=(None, 14), dtype=tf.float64, name='1d_features'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='is_enemy_belligerent'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='is_observed'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='is_neutral')]
Argument #2
DType: bool
Value: False
Argument #3
DType: NoneType
Value: None
Option #4
Callable with:
Argument #1
DType: list
Value: [TensorSpec(shape=(None, 14), dtype=tf.float64, name='inputs/0'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='inputs/1'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='inputs/2'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='inputs/3')]
Argument #2
DType: bool
Value: False
Argument #3
DType: NoneType
Value: None
Function Name: '_default_save_signature'
Option #1
Callable with:
Argument #1
DType: list
Value: [TensorSpec(shape=(None, 14), dtype=tf.float64, name='1d_features'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='is_enemy_belligerent'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='is_observed'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='is_neutral')]
Function Name: 'call_and_return_all_conditional_losses'
Option #1
Callable with:
Argument #1
DType: list
Value: [TensorSpec(shape=(None, 14), dtype=tf.float64, name='inputs/0'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='inputs/1'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='inputs/2'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='inputs/3')]
Argument #2
DType: bool
Value: True
Argument #3
DType: NoneType
Value: None
Option #2
Callable with:
Argument #1
DType: list
Value: [TensorSpec(shape=(None, 14), dtype=tf.float64, name='1d_features'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='is_enemy_belligerent'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='is_observed'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='is_neutral')]
Argument #2
DType: bool
Value: False
Argument #3
DType: NoneType
Value: None
Option #3
Callable with:
Argument #1
DType: list
Value: [TensorSpec(shape=(None, 14), dtype=tf.float64, name='1d_features'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='is_enemy_belligerent'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='is_observed'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='is_neutral')]
Argument #2
DType: bool
Value: True
Argument #3
DType: NoneType
Value: None
Option #4
Callable with:
Argument #1
DType: list
Value: [TensorSpec(shape=(None, 14), dtype=tf.float64, name='inputs/0'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='inputs/1'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='inputs/2'), TensorSpec(shape=(None, 121), dtype=tf.float64, name='inputs/3')]
Argument #2
DType: bool
Value: False
Argument #3
DType: NoneType
Value: None