首页 > 解决方案 > AttributeError:模块“tf_util”没有属性“conv2d”

问题描述

当我在自己的数据集上运行 pointnet 代码时,我在“conv2d”上遇到了问题。我的张量流版本:1.8.0,cudatoolkit 9.0 cudnn 7.6.5。有人可以帮我吗?是版本问题吗?

/home/yanz/anaconda3/envs/env2/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/yanz/anaconda3/envs/env2/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/yanz/anaconda3/envs/env2/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:521: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/yanz/anaconda3/envs/env2/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:522: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/yanz/anaconda3/envs/env2/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:523: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/yanz/anaconda3/envs/env2/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:528: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
  File "train.py", line 253, in <module>
    main()
  File "train.py", line 74, in main
    pred = get_model(pointclouds_pl, is_training=is_training_pl, bn_decay=bn_decay)
  File "/home/yanz/PointNet/model.py", line 30, in get_model
    net = tf_util.conv2d(input_image, 64, [1, 4], padding='VALID', stride=[1, 1],
AttributeError: module 'tf_util' has no attribute 'conv2d'

标签: pythonpython-2.7tensorflow

解决方案


推荐阅读