Ensemble example - TypeError: 'map' object is not subscriptable
See original GitHub issueI’m running the examples with Python 3. I’ve managed to get most of them running so far.
The mnist ensemble example breaks with Python3 and I would appreciate any recommendations on how to fix it.
Traceback (most recent call last): File "hypetest/mnist_ensemble.py", line 68, in <module> preds =ensemble_model.predict(X_test) File "/opt/conda/lib/python3.5/site-packages/hyperas/ensemble.py", line 36, in predict nb_classes = predictions[0].shape[1] TypeError: 'map' object is not subscriptable
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
TypeError: 'map' object is not subscriptable in Python
The Python "TypeError: 'map' object is not subscriptable" occurs when we try to access a map object at a specific index. To solve...
Read more >TypeError: 'map' object is not subscriptable - Python [duplicate]
Because the map() function is just an iterable, it does nothing until you "consume" it.(https://docs.python.org/3/library/functions.html#map).
Read more >Fix TypeError: 'map' Object Is Not Subscriptable in Python
This tutorial demonstrates the cause of TypeError: map object is not subscriptable and the solutions to resolve this error in Python.
Read more >can we print map object in python Code Example - Code Grepper
You have to turn the map into a list or tuple first print(list(MapObject))
Read more >sklearn.preprocessing.FunctionTransformer
Examples using sklearn.preprocessing.FunctionTransformer: Feature transformations with ensembles of trees Feature transformations with ensembles of trees ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Do you want to create a pull request for this?
@YangBain please don’t use closed tickets for this. I’ve commented on your other issue. problem is on your side, I’m relatively sure.