File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
components/testdata/module_file
experimental/templates/taxi/models/keras_model Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ def _build_keras_model(
240
240
output = tf .keras .layers .Dense (1 , activation = 'sigmoid' )(
241
241
tf .keras .layers .concatenate ([deep , wide ])
242
242
)
243
- output = tf .squeeze ( output , - 1 )
243
+ output = tf .keras . layers . Reshape (( 1 ,))( output )
244
244
245
245
model = tf .keras .Model (input_layers , output )
246
246
model .compile (
@@ -365,4 +365,4 @@ def run_fn(fn_args: fn_args_utils.FnArgs):
365
365
model , tf_transform_output
366
366
),
367
367
}
368
- model . save (fn_args .serving_model_dir , save_format = 'tf' , signatures = signatures )
368
+ tf . saved_model . save (model , fn_args .serving_model_dir , signatures = signatures )
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
import tensorflow as tf
16
+ import pytest
16
17
17
18
from tfx .experimental .templates .taxi .models .keras_model import model
18
19
19
20
21
+ @pytest .mark .xfail (run = False , reason = "_build_keras_model is not compatible with Keras3." )
20
22
class ModelTest (tf .test .TestCase ):
21
23
22
24
def testBuildKerasModel (self ):
You can’t perform that action at this time.
0 commit comments