ImportError:无法使用TensorFlow深度学习colab导入名称“maxpool_2d”

ImportError:无法使用TensorFlow深度学习colab导入名称“maxpool_2d”,tensorflow,google-colaboratory,Tensorflow,Google Colaboratory,我是猫和狗分类器的初学者。我的代码如下: import tflearn from tflearn.layers.conv import conv_2d,maxpool_2d convnet=conv_2d(convent,32,5,activation='relu') convent=max_pool_2d(convent,5) 在GoogleColab中运行此程序时,我遇到了以下错误。请帮忙 它应该是max_pool_2d而不是maxpool_2d 您正在将convnet设置为传入的张量参数

我是猫和狗分类器的初学者。我的代码如下:

import tflearn
from tflearn.layers.conv import conv_2d,maxpool_2d
convnet=conv_2d(convent,32,5,activation='relu')
convent=max_pool_2d(convent,5)
在GoogleColab中运行此程序时,我遇到了以下错误。请帮忙

它应该是max_pool_2d而不是maxpool_2d 您正在将convnet设置为传入的张量参数,但之前没有声明它。 train_file=import zipfile with zipfile.ZipFiletrain_file,'r'as z:z.extractall-->表示未找到此类文件目录,且未定义train_数据……我该怎么办?
    ImportError                               
    <ipython-input-8-dc6c9fb9359a> in <module>()
      1 
      2 import tflearn
----> 3 from tflearn.layers.conv import conv_2d,maxpool_2d

     ImportError: cannot import name 'maxpool_2d'
     NameError                                 
     <ipython-input-64-4f4aec72da8c> in <module>()
----> 1 convnet=conv_2d(convent,32,5,activation='relu')
      2 convent=max_pool_2d(convent,5)
    NameError: name 'convent' is not defined
    NameError                                
    <ipython-input-4-be31c35783ac> in <module>()
----> 1 convnet = conv_2d(convnet, 64, 5, activation='relu')
      2 convent=max_pool_2d(convent,5)
    NameError: name 'conv_2d' is not defined