I am using TensorFlow 2.1.0-dev20191125
Unfortunately I can't compile a simple example with error:
"AttributeError: module 'tensorflow.python.framework.ops' has no attribute 'RegisterShape'"
My source code:
from tensorflow.python.framework import ops as _ops
_ops.RegisterShape("GRUBlockCell")(None)
Is it looks like incorrectly installed TF
?
Shape functions for core ops
were moved to C++ via REGISTER_OP(...).SetShapeFn(...)
. So you may have to first create/register your operation in C++
.
A detailed guide can be found in the official doumentation Here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.