成功解决AttributeError: module 'tensorflow.contrib.data' has no attribute 'TextLineDataset'
解决 成功 Data No Tensorflow module has attribute
2023-09-14 09:04:51 时间
成功解决AttributeError: module 'tensorflow.contrib.data' has no attribute 'TextLineDataset'
目录
解决问题
AttributeError: module 'tensorflow.contrib.data' has no attribute 'TextLineDataset'
解决思路
tensorflow版本问题导致的函数调用有变更。
(1)、tf.data.TextLineDataset():这个函数的输入是一个文件的列表,输出是一个dataset。dataset中的每一个元素就对应了文件中的一行。可以使用这个函数来读入CSV文件。
解决方法
将
旧版本的函数
改为
tf.data.TextLineDataset()
大功告成!哈哈!
相关文章
- EasyPlayer RTSP播放器OCX RegSvr32注册报错,DllRegisterServer调用失败,错误代码为0x80040200 解决方法
- linux fedora自带终端字体间距过大问题解决
- 成功解决ValueError: array must not contain infs or NaNs(花了好几个小时解决了这个最离奇的bug)
- 成功解决ValueError: Data is not binary and pos_label is not specified
- 成功解决CatBoostError: Invalid type for cat_feature cat_features must be integer or string, real number
- 成功解决ImportError: cannot import name ‘imresize‘
- 成功解决Ignoring invalid distribution -yqt5
- 成功解决ValueError: row index was 65536, not allowed by .xls format
- 成功解决tensorboard调用events.out.tfevents文件得到网址出现No dashboards are active for the current data set问题
- 成功解决ValueError: DataFrame.dtypes for label must be int, float or bool
- Maven项目错误解决小结
- 成功解决SyntaxError: future feature annotations is not defined
- 成功解决TypeError: unsupported operand type(s) for +: ‘float‘ and ‘NoneType‘
- 成功解决ValueError: pos_label=1 is not a valid label: array([‘0‘, ‘1‘], dtype=‘<U1‘)
- 成功解决 RecoveryYour PC/Device needs to be repairedThe Boot c onfiguration Data for your PC is missin
- 成功解决PermissionError: [Errno 13] Permission denied: ‘F:Filedata123.csv‘
- 成功解决ValueError: With n_samples=0, test_size=0.3 and train_size=None, the resulting train set will be
- 成功解决pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 48, saw 2
- 成功解决gensimutils.py:1209: UserWarning: detected Windows; aliasing chunkize to chunkize_serial warn
- 成功解决read_data_sets (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and wil
- 成功解决TypeError: Singleton array array('data_input/xgboost/data_RentListingInquries/RentListingInqurie
- 已解决urllib.error.HTTPError: HTTP Error 403: Forbidden
- Linux中Java图片生成中文乱码问题解决