当前位置:网站首页>AUTO sharding policy will apply DATA sharding policy as it failed to apply FILE sharding policy
AUTO sharding policy will apply DATA sharding policy as it failed to apply FILE sharding policy
2022-06-26 15:36:00 【there2belief】
使用tf.distribute.MirroredStrategy()時,出現警告:
AUTO sharding policy will apply DATA sharding policy as it failed to apply FILE sharding policy because of the following reason: Did not find a shardable source, walked to a node which is not a dataset
代碼如下:
strategy = tf.distribute.MirroredStrategy()
with strategy.scope():
keras_model = build_model()
train_datagen = ImageDataGenerator()
training_img_generator = train_datagen.flow_from_directory(
input_path,
target_size=(image_size, image_size),
batch_size=batch_size,
class_mode="categorical",
)
train_dataset = tf.data.Dataset.from_generator(
lambda: training_img_generator,
output_types=(tf.float32, tf.float32),
output_shapes=([None, image_size, image_size, 3], [None, len(image_classes)])
)
# similar for validation_dataset = ...
keras_model.fit(
train_dataset,
steps_per_epoch=train_steps_per_epoch,
epochs=epoch_count,
validation_data=validation_dataset,
validation_steps=validation_steps_per_epoch,
)Now this seem to work, the model is trained as usual. However, during training I get the following warning message, when using a mirrored strategy:
AUTO sharding policy will apply DATA sharding policy as it failed to apply FILE sharding policy because of the following reason: Did not find a shardable source, walked to a node which is not a dataset
嘗試解决但無效
So I added the following lines between creating the data sets and calling fit():
options = tf.data.Options()
options.experimental_distribute.auto_shard_policy = tf.data.experimental.AutoShardPolicy.DATA
train_dataset.with_options(options)
validation_dataset.with_options(options)However, I still get the same warning.
This leads me to these two questions:
- What do I need to do in order to get rid of this warning?
- Even more important: Why is TF not able to split the dataset with the default
AutoShardPolicy.FILEpolicy, since I am using thousands of images per class in the input folder?
边栏推荐
- 如何配置使用新的单线激光雷达
- Don't remove custom line breaks on reformat
- selenium chrome 禁用js 禁用图片
- Vsomeip3 dual computer communication file configuration
- 学习内存屏障
- Comparative analysis of restcloud ETL and kettle
- 数据库-序列
- [CEPH] cephfs internal implementation (IV): how is MDS started-- Undigested
- Unity C # e-learning (10) -- unitywebrequest (1)
- 买股票通过券商经理的开户二维码开户资金是否安全?想开户炒股
猜你喜欢

How to load the contour CAD drawing of the engineering coordinate system obtained by the designer into the new earth

Restcloud ETL extracting dynamic library table data

效率超级加倍!pycharm十个小技巧就是这么神

Lexin AWS IOT expresslink module achieves universal availability

10 minutes to understand bim+gis fusion, common BIM data formats and characteristics

Use of abortcontroller
![[CEPH] cephfs internal implementation (I): Concept -- undigested](/img/5c/ca666118848b4f3042b834fb79d27f.png)
[CEPH] cephfs internal implementation (I): Concept -- undigested

查词翻译类应用使用数据接口api总结

【ceph】CephFS 内部实现(二):示例--未消化

HW安全响应
随机推荐
【C语言练习——打印空心上三角及其变形】
一键分析硬件/IO/全国网络性能脚本(强推)
【TcaplusDB知识库】TcaplusDB系统用户组介绍
[C language practice - printing hollow upper triangle and its deformation]
English语法_形容词/副词3级 - 原级句型
Notes on brushing questions (19) -- binary tree: modification and construction of binary search tree
一键安装gcc脚本
音视频学习(一)——PTZ控制原理
【TcaplusDB知识库】TcaplusDB单据受理-创建游戏区介绍
nanoPi Duo2连接wifi
One click analysis hardware /io/ national network performance script (strong push)
【ceph】CephFS 内部实现(四):MDS是如何启动的?--未消化
TCP/IP协议竟然有这么多漏洞?
5 figures illustrate the container network
音视频学习(二)——帧率、码流和分辨率
MongoDB系列之Window环境部署配置
【ceph】mkdir|mksnap流程源码分析|锁状态切换实例
Learning memory barrier
Lexin AWS IOT expresslink module achieves universal availability
# 粒子滤波 PF——三维匀速运动CV目标跟踪(粒子滤波VS扩展卡尔曼滤波)