DeepMatch
DeepMatch copied to clipboard
YoutubeDNN example run failed
output:
Input In [12], in
File ~/miniforge3/lib/python3.9/site-packages/deepmatch/models/youtubednn.py:56, in YoutubeDNN(user_feature_columns, item_feature_columns, num_sampled, user_dnn_hidden_units, dnn_activation, dnn_use_bn, l2_reg_dnn, l2_reg_embedding, dnn_dropout, output_activation, seed) 54 item_features = build_input_features(item_feature_columns) 55 item_inputs_list = list(item_features.values()) ---> 56 user_dnn_out = DNN(user_dnn_hidden_units, dnn_activation, l2_reg_dnn, dnn_dropout, 57 dnn_use_bn, output_activation=output_activation, seed=seed)(user_dnn_input) 59 item_index = EmbeddingIndex(list(range(item_vocabulary_size)))(item_features[item_feature_name]) 61 item_embedding_matrix = embedding_matrix_dict[ 62 item_feature_name]
File ~/miniforge3/lib/python3.9/site-packages/tensorflow/python/keras/engine/base_layer_v1.py:784, in Layer.call(self, *args, **kwargs)
781 try:
782 with autocast_variable.enable_auto_cast_variables(
783 self._compute_dtype_object):
--> 784 outputs = call_fn(cast_inputs, *args, **kwargs)
786 except errors.OperatorNotAllowedInGraphError as e:
787 raise TypeError('You are attempting to use Python control '
788 'flow in a layer that was not declared to be '
789 'dynamic. Pass dynamic=True
to the class '
790 'constructor.\nEncountered error:\n"""\n' +
791 str(e) + '\n"""')
File ~/miniforge3/lib/python3.9/site-packages/tensorflow/python/autograph/impl/api.py:692, in convert.
FailedPreconditionError: in user code:
File "/Users/tangzhenhua/miniforge3/lib/python3.9/site-packages/deepctr/layers/core.py", line 190, in call *
fc = self.activation_layers[i](fc, training=training)
File "/Users/tangzhenhua/miniforge3/lib/python3.9/site-packages/keras/engine/base_layer_v1.py", line 732, in __call__ **
base_layer_utils.create_keras_history(inputs)
File "/Users/tangzhenhua/miniforge3/lib/python3.9/site-packages/keras/engine/base_layer_utils.py", line 175, in create_keras_history
_, created_layers = _create_keras_history_helper(tensors, set(), [])
File "/Users/tangzhenhua/miniforge3/lib/python3.9/site-packages/keras/engine/base_layer_utils.py", line 251, in _create_keras_history_helper
constants[i] = backend.function([], op_input)([])
File "/Users/tangzhenhua/miniforge3/lib/python3.9/site-packages/keras/backend.py", line 4275, in __call__
fetched = self._callable_fn(*array_vals,
FailedPreconditionError: 2 root error(s) found.
(0) FAILED_PRECONDITION: Could not find variable dnn_4/bias0. This could mean that the variable has been deleted. In TF1, it can also mean the variable is uninitialized. Debug info: container=localhost, status error message=Container localhost does not exist. (Could not find resource: localhost/dnn_4/bias0)
[[{{node dnn_4/BiasAdd/ReadVariableOp}}]]
[[dnn_4/BiasAdd/ReadVariableOp/_9]]
(1) FAILED_PRECONDITION: Could not find variable dnn_4/bias0. This could mean that the variable has been deleted. In TF1, it can also mean the variable is uninitialized. Debug info: container=localhost, status error message=Container localhost does not exist. (Could not find resource: localhost/dnn_4/bias0)
[[{{node dnn_4/BiasAdd/ReadVariableOp}}]]
0 successful operations.
0 derived errors ignored.
Operating environment(运行环境):
- python version 3.9
- tensorflow version 2.8
- deepmatch version 0.2.0
- OS: mac Monterey 12.1
- CPU: M1 pro