python - how to set correct batch_size and steps_per_epoch in keras?
问题描述
I have 20000 RGB images. I set batch_Size = 1
(due to GPU capacity). So now does it mean the model weights are changing with one-by-one pictures or it depends on the steps_per_epoch
?
How should I set the steps_per_epoch
and epochs for using all of 20000 images to be involved in training in different epochs?
解决方案
Yes, the weights are updated after each batch.
The steps_per_epoch
should be the number of datapoints (20000 in your case) divided by the batch size. Therefore steps_per_epoch
will also be 20000 if the batch size is 1.
推荐阅读
- swift - Swift 导航栏标题显示为黑色而不是白色
- python - 按索引总和对 NumPy 数组的元素进行分组
- android - TextClock 导致 ScrollView 跳转 - Android Studio
- java - QueryDsl 中是否有方法 count(if) 查询?
- ruby-on-rails - 为什么我只在 CircieCI 上收到 webpacker 错误?
- spring-boot - 使用 Spring Initializr 的新项目不在浏览器中运行
- git - git日期规范格式文档?
- performance - 用表情符号替换 textarea 中的字符串 | VueJS
- javascript - React-Native Redux 在数组中创建数组
- python - 这是一个正确的基于类的 django 视图吗?