简体   繁体   中英

How can I implement in a transfer learning and fine-tuning for my tensorflow model?

I had a pre-trained model(tensorflow model) which was trained using data from publicly available data set. I had meta file and ckpt file. I'd like to train my tensorflow model using new data from privately obtained data set. I have small dataset, so I'd like to fine-tune my model according to 'Strategy 2' or 'Strategy 3'.

  • Strategy 2: Train some layers and leave the others frozen.
  • Strategy 3: Freeze the convolutional base.

Reference site: https://towardsdatascience.com/transfer-learning-from-pre-trained-models-f2393f124751

However, I couldn't find sample code which is implemented in a transfer learning and fine-tuning for tensorflow model. There are many examples with keras model. How can I implement in a transfer learning and fine-tuning for my tensorflow model?

如果您不必使用 Tensorflow 的功能,您也可以使用带有 Tensorflow 2.0 的 tf.keras 模块的示例代码。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM