Debug 路漫漫-10:AttributeError: 'Embedding' object has no attribute 'get_shape'

CNN的Embedding层报错:

报错:AttributeError: ‘Embedding‘ object has no attribute ‘get_shape‘

查了下是这个问题:

https://stackoverflow.com/questions/44285907/attributeerror-embedding-object-has-no-attribute-get-shape-with-tensorflow

即,在Embedding函数后面添加:input、output 即可。

Debug 路漫漫-10:AttributeError: 'Embedding' object has no attribute 'get_shape'

原文地址:https://www.cnblogs.com/shenxiaolin/p/11225051.html

时间: 2025-01-14 22:11:20

Debug 路漫漫-10:AttributeError: 'Embedding' object has no attribute 'get_shape'的相关文章

启动celery的时候提示:AttributeError: 'module' object has no attribute 'commit_manually'错误

1. 首先进入虚拟环境: ***:~/piaoshifu_object/epiao.piaoshifu.cn$ source /home/wyl/piaoshifu_virtualenv/epiaoenv/bin/activate (epiaoenv) ***:~/piaoshifu_object/epiao.piaoshifu.cn$ 2. 启动celery: ***:~/piaoshifu_object/epiao.piaoshifu.cn$ python manage.py celery

python3 AttributeError: 'NoneType' object has no attribute 'split'

1 from wsgiref.simple_server import make_server 2 3 def RunServer(environ, start_response): 4 start_response('200 ok',[('Content-Type','text/html')]) 5 return '<h1>Hello world</h1>' 6 7 if __name__ == '__main__': 8 httpd = make_server('127.0.0

flask_route错误:AttributeError: &#39;function&#39; object has no attribute &#39;route&#39;

问题: 路由完全正确,当只有一个名为home的函数处理这个路由时候,下一个路由处理函数,总是提示没有这个rotue属性 Traceback (most recent call last): File "E:/workspace/wei-move/manage.py", line 3, in <module> from app import app File "E:\workspace\wei-move\app\__init__.py", line 10,

AttributeError: &#39;str&#39; object has no attribute &#39;copy&#39;

在使用Python Networkx 中的relabel_nodes函数时,出现: AttributeError: 'str' object has no attribute 'copy' 找了半天也没发现错误出现在哪里,通过比较发现: 如果在定义图的类型时候使用G=nx.MultiDiGraph()就会出现这个错误,改为G=nx.Graph()错误消失. 目测是relabel_nodes函数不支持MultiDiGraph. 附: 1 def relabel_nodes(G, mapping,

TRACE nova AttributeError: &#39;module&#39; object has no attribute &#39;packs&#39; 解决办法

I got the following errors when I was deploying OpenStack with devstack. 2013-02-28 01:08:28 DEBUG nova.utils [-] backend <module 'nova.db.sqlalchemy.migration' from '/opt/stack /nova/nova/db/sqlalchemy/migration.pyc'> from (pid=27011) __get_backend

AttributeError: &#39;int&#39; object has no attribute &#39;log&#39;

我们有时候在对组数进行操作时候,偶尔会出现这个问题. 比如: #coding:utf-8 import pandas as pd import numpy as np if __name__ == '__main__': np.random.seed(0) df = pd.DataFrame(100 + np.random.randn(100).cumsum(), columns=['weight']) df['pct_change'] = df.weight.pct_change() df['

django错误笔记(xadmin)——AttributeError: &#39;Settings&#39; object has no attribute &#39;TEMPLATE_CONTEXT_PROCESSORS&#39;

使用Xadmin,执行makemigrations和migrate时运行报错提示: AttributeError: 'Settings' object has no attribute 'TEMPLATE_CONTEXT_PROCESSORS' 方法一: setting.py文件添加以下信息: TEMPLATE_CONTEXT_PROCESSORS = ( 'django.contrib.auth.context_processors.auth', 'django.core.context_pr

celery:Unrecoverable error: AttributeError(&quot;&#39;unicode&#39; object has no attribute &#39;iteritems&#39;)

环境描述 python2+django1.9下使用celery异步处理耗时请求. celery使用的是celery-with-redis这个第三方库,版本号为3.0. pip install celery-with-redis 这样安装会将redis.celery-with-redis.redis等一起同时安装. 错误描述 错误提示:Unrecoverable error: AttributeError("'unicode' object has no attribute 'iteritems'

Python错误:AttributeError: &#39;generator&#39; object has no attribute &#39;next&#39;解决办法

今天在学习生成器对象(generation object)运行以下代码时,遇到了一个错误: #定义生成器函数def liebiao(): for x in range(10): yield x#函数调用g = liebiao() #打印元素print(g.next())D:\>python test.pyTraceback (most recent call last): File "test.py", line 10, in <module> print(g.nex