Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'filter' object is not subscriptable #43

Closed
ch1762 opened this issue Oct 27, 2019 · 2 comments
Closed

TypeError: 'filter' object is not subscriptable #43

ch1762 opened this issue Oct 27, 2019 · 2 comments

Comments

@ch1762
Copy link

ch1762 commented Oct 27, 2019

ch@adv:~/AdvBox/tutorials$ python mnist_tutorial_fgsm.py
Traceback (most recent call last):
  File "mnist_tutorial_fgsm.py", line 152, in <module>
    main()
  File "mnist_tutorial_fgsm.py", line 76, in main
    channel_axis=1)
  File "../advbox/models/paddle.py", line 103, in __init__
    param_grads)[0][1]
TypeError: 'filter' object is not subscriptable

@ch1762
Copy link
Author

ch1762 commented Oct 27, 2019

安装环境是(1)Anaconda2 5.2.0 64
(2)pip install tensorflow
(3)pip install keras
(4)pip install paddlepaddle
#import paddle.v2 会出错 直接import paddle就可以了

@ch1762 ch1762 closed this as completed Oct 27, 2019
@fcqfcq
Copy link

fcqfcq commented Nov 23, 2019

python3 和 python2 filter 返回性质不同
python2 -》** list**
python3 -》 一个filter对象

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants