TensorFlow,多阶段培训

时间:2017-02-28 20:45:21

标签: python tensorflow conv-neural-network

我希望拥有一个多层ConvNet,以便在每个阶段我只训练一层。我的代码草图如下所示:

def MyConvNet(training_phase, input):

    # conv1 structure
    ...
    # conv2 structure
    ...
    # conv3 structure
    ...

    if(training_phase == 1):
       return conv1_out
    if(training_phase == 2):
       return conv2_out
    if(training_phase == 3):
       return conv3_out

问题是此代码无效,我收到以下错误:

 ValueError: None values not supported.

如何在TensorFlow中实现实现多层ConvNet的功能,并能够在不同的训练阶段获得每一层的输出?

0 个答案:

没有答案