tensorflow
专业混水
这个作者很懒,什么都没留下…
展开
-
Please initialize `Prune` with a supported layer. Layers should either be a `PrunableLayer` instance
对模型进行剪枝时出现错误:Please initialize `Prune` with a supported layer. Layers should either be a `PrunableLayer` instance, or should be supported by the PruneRegistry. You passed:1:找到prune_registry.py文件,如果是anacoda3,文件路径可能在:1)anaconda3/envs/tensorflow2_latest_p原创 2021-05-04 23:08:25 · 1148 阅读 · 2 评论 -
y_t_rank = len(y_t.shape.as_list()) AttributeError: ‘tuple‘ object has no attribute ‘shape‘’
在model.fit()的时候遇到了如下问题:Epoch 1/400Traceback (most recent call last): File "F:/code/MYSTUDY/MODEL_version0.0/comparsion/trainST.py", line 234, in <module> main() File "F:/code/MYSTUDY/MODEL_version0.0/comparsion/trainST.py", line 215, in mai原创 2021-03-13 14:42:27 · 1388 阅读 · 4 评论 -
TypeError: The following are legacy tf.layers.Layers: <tensorflow.python.keras.layers.legacy_rnn.r
在tensorflow2中使用tf.conpat.v1.nn.rnn_cell.BasicLSTMCell()出现错误:TypeError: The following are legacy tf.layers.Layers:To use keras as a framework (for instance using the Network, Model, or Sequential classes), please use the tf.keras.layers implementation原创 2021-03-04 12:38:22 · 1096 阅读 · 1 评论