我的目标是从C++应用程序接口中获得一个包含所有可训练变量的名称列表。在Python语言中,这将通过tf.trainable_variables()来完成。 到目前为止,我尝试了这种方法。我有一个tensorflow::GraphDef对象,可以看到所有创建的节点,如下所示: for (int i = 0; i < graphDef.node_size(); i++) {
graphD
我有vgg19型号,我想微调一下.print("Number of layers in the base model: ", len(vgg_model.layers))
fine_tune_at = 100
# freeze all the layers before the `fine_tune_at
我现在正在一个定制的训练循环中训练一个模型。因此,我需要访问model.trainable_variables。但是,我的模型有keras.engine.sequential.Sequential object at 0x7fa284a24d30类型,而不是tensorflow.python.keras.engine.sequential.Sequential因此,当我试图获取可训练变量时,就会得到错误:
AttributeError