-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
这个错是因为模型有问题吗? #1
Comments
把maxlen 改成510就可以了。 |
你好,请问这个keras-bert可以自由修改seq长度吗?感觉这样就只能是512了。 |
不好意思,第一个问题知道了,pad的时候选max已经是514了。傻了。 |
另外,model.fit_generator中的steps_per_epoch的参数感觉应该是len(train_D)//batch_size啊,毕竟每一个生成器产生一个batch数据 |
对 这个step有问题。 |
情感分类中,DATA_LIST = np.array(DATA_LIST)这一步会报错ValueError: setting an array element with a sequence,因为DATA_LIST原本是‘字符串+array’的形式,因此就不能再array了,不知道这个问题怎么解决,有大佬指点一下吗/ |
np.array(DATA_LIST, dtype=object) |
InvalidArgumentError: Incompatible shapes: [8,514,768] vs. [8,512,768]
[[{{node model_2/Embedding-Position/add}} = Add[T=DT_FLOAT, _class=["loc:@training/Adam/gradients/model_2/Embedding-Position/add_grad/Reshape"], _device="/job:localhost/replica:0/task:0/device:GPU:0"](model_2/Embedding-Token-Segment/add, model_2/Embedding-Position/Tile)]]
[[{{node metrics/acc_top2/Mean_1/_3259}} = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_21926_metrics/acc_top2/Mean_1", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
The text was updated successfully, but these errors were encountered: