Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model fails to save after training #21

Open
BWWS opened this issue Nov 3, 2022 · 0 comments
Open

Model fails to save after training #21

BWWS opened this issue Nov 3, 2022 · 0 comments

Comments

@BWWS
Copy link

BWWS commented Nov 3, 2022

Hi,

I am seeing the following error:

Training is finished!
Exporting model...
Traceback (most recent call last):
File "C:\TensorFlowObjectDetection\TFODCourse\Scaled_YOLOv4_tf2\train.py", line 382, in
main(args)
File "C:\TensorFlowObjectDetection\TFODCourse\Scaled_YOLOv4_tf2\train.py", line 374, in main
model = Yolov4(args, training=False)
File "C:\TensorFlowObjectDetection\TFODCourse\Scaled_YOLOv4_tf2\model\yolov4.py", line 11, in Yolov4
scaled_yolov4_csp_darknet53_outputs = scaled_yolov4_csp_darknet53(input,mode=args.model_type)
File "C:\TensorFlowObjectDetection\TFODCourse\Scaled_YOLOv4_tf2\model\CSPDarknet53.py", line 35, in scaled_yolov4_csp_darknet53
x = conv2d_bn_mish(x, 32, (3, 3), name="first_block")
File "C:\TensorFlowObjectDetection\TFODCourse\Scaled_YOLOv4_tf2\model\common.py", line 7, in conv2d_bn_mish
return x * tf.math.tanh(tf.math.softplus(x))
File "C:\TensorFlowObjectDetection\TFODCourse\tfod\lib\site-packages\tensorflow\python\util\traceback_utils.py", line 153, in error_handler
raise e.with_traceback(filtered_tb) from None
File "C:\TensorFlowObjectDetection\TFODCourse\tfod\lib\site-packages\keras\layers\core\tf_op_layer.py", line 119, in handle
return TFOpLambda(op)(*args, **kwargs)
File "C:\TensorFlowObjectDetection\TFODCourse\tfod\lib\site-packages\keras\utils\traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
OverflowError: Exception encountered when calling layer "tf.math.softplus" (type TFOpLambda).

Python int too large to convert to C long

Call arguments received by layer "tf.math.softplus" (type TFOpLambda):
• features=tf.Tensor(shape=(None, None, None, 32), dtype=float32)
• name=None

I still have the checkpoints saved and a temp_model_variables.h5 has been created but I am unable to convert these into a saved model.

Any advice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant