Skip to content

ConvNeXt models missing gradients when compiling with jit_compile=True #759

Open
@ianstenbit

Description

@ianstenbit

Example error:

WARNING:tensorflow:Gradients do not exist for variables 
['convnext_xlarge_stage_0_block_0_depthwise_conv/kernel:0', 'convnext_xlarge_stage_0_block_1_depthwise_conv/kernel:0', 'convnext_xlarge_stage_0_block_2_depthwise_conv/kernel:0', 'convnext_xlarge_stage_1_block_0_depthwise_conv/kernel:0', 'convnext_xlarge_stage_1_block_1_depthwise_conv/kernel:0', 'convnext_xlarge_stage_1_block_2_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_0_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_1_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_2_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_3_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_4_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_5_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_6_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_7_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_8_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_9_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_10_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_11_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_12_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_13_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_14_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_15_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_16_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_17_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_18_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_19_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_20_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_21_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_22_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_23_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_24_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_25_depthwise_conv/kernel:0', 'convnext_xlarge_stage_2_block_26_depthwise_conv/kernel:0', 'convnext_xlarge_stage_3_block_0_depthwise_conv/kernel:0', 'convnext_xlarge_stage_3_block_1_depthwise_conv/kernel:0', 'convnext_xlarge_stage_3_block_2_depthwise_conv/kernel:0'] 
when minimizing the loss. If you're using `model.compile()`, did you forget to provide a `loss`argument?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions