[英]Keras Transfer Learning
Let's say that I wanted to train a ConvNet to tell me if in a photo it is raining or not, how will the procedures be?假设我想训练一个 ConvNet 来告诉我照片中是否下雨,程序将如何?
Given that I have two train variables, trainX
and trainY
, the trainX
will be the photo and trainY
will be the labels (eg rain
or no-rain
).鉴于我有两个火车变量, trainX
和trainY
, trainX
将是照片, trainY
将是标签(例如rain
或no-rain
)。
The goal of the network is to output the "right" answer.网络的目标是输出“正确”的答案。 The question is: do I just need to run the model.predict()
function and expect valid results?问题是:我是否只需要运行model.predict()
函数并期望得到有效结果?
Thank you for any help in advance.提前感谢您的任何帮助。
1) Build your CNN Model: Layers, Activation-Functions... 1) 构建您的 CNN 模型:层、激活函数...
2) Train it with your existing trainX
and trainY
-Dataset. 2) 使用您现有的trainX
和trainY
-Dataset trainY
训练。 (use Augmentation to get better results in the end) (最终使用Augmentation获得更好的结果)
3) Validate with another Dataset, lets say they are called: testX
and testY
3) 使用另一个数据集进行验证,假设它们被称为: testX
和testY
4) Modify the settings of your Model until your accuracy and loss are high enough for what you need them... 4)修改模型的设置,直到您的准确度和损失足够高以满足您的需要...
5) enjoy your CNN 5)享受你的CNN
This could help you on your way: Building a CNN with Keras这可以为您提供帮助: 使用 Keras 构建 CNN
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.