解决 报错 TypeError: interleave() got an unexpected keyword argument ‘deterministic‘
程序员文章站
2022-06-13 10:03:32
...
运行相关tensorflow 训练调用 imagenet_input.py 代码,
num_parallel_calls=self.num_parallel_calls, deterministic=False) TypeError: interleave() got an unexpected keyword argument 'deterministic'
查看相关代码 提示 ImageNet input pipeline using tf.data.Dataset."""
调用了interleave 函数中有一项参数为deterministic
dataset = dataset.interleave(
fetch_dataset, cycle_length=self.num_parallel_calls,
num_parallel_calls=self.num_parallel_calls, deterministic=False)
于是查看使用的tensorflow 版本 可以看到该版本没有deterministic 这一项,于是去掉,可正常调用
interleave(
map_func, cycle_length=AUTOTUNE, block_length=1, num_parallel_calls=None
)
上一篇: 深度学习中batch_size设置大小在神经网络训练中的影响
下一篇: batch_size的理解
推荐阅读
-
报错解决Python Error fix-TypeError: _mean() got an unexpected keyword argument ‘dim‘
-
TypeError: softmax() got an unexpected keyword argument 'axis' 解决办法
-
Django报错:TypeError: render() got an unexpected keyword argument 'renderer'
-
TypeError: login() got an unexpected keyword argument 'template_name'
-
TypeError: filter() got an unexpected keyword argument
-
解决 报错 TypeError: interleave() got an unexpected keyword argument ‘deterministic‘
-
TypeError: __init__() got an unexpected keyword argument 'shape'
-
Django TypeError: render() got an unexpected keyword argument 'renderer'
-
TypeError: got an unexpected keyword argument ‘id‘
-
pyspark报错 TypeError: sample() got an unexpected keyword argument ‘n‘