You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

color_print.py 331 B

1234567891011121314151617
  1. from rich import print
  2. def red_print(text):
  3. print(f"[red]{text}[/red]")
  4. def green_print(text):
  5. print(f"[green]{text}[/green]")
  6. def yellow_print(text):
  7. print(f"[yellow]{text}[/yellow]")
  8. def blue_print(text):
  9. print(f"[blue]{text}[/blue]")
  10. if __name__ == "__main__":
  11. yellow_print("This is red text.")

冻结ViT-B/32版本的CLIP模型中的全部图像层,用Adan优化器训练模型,训练100个epoch,每隔5个epoch对模型进行保存;完成CLIP模型训练后,运行test_clip.py用测试集中的数据和自定义的提示词对保存的模型进行测试,选取测试精度最好的模型和对应的提示词,运行predict.py文件,选择“min_loss.pth”模型,提交官方系统测试,top1的精度是0.6788。

Contributors (1)