question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ensemble example - TypeError: 'map' object is not subscriptable

See original GitHub issue

I’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:closed
  • Created 7 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
maxpumperlacommented, Nov 4, 2016

Do you want to create a pull request for this?

0reactions
maxpumperlacommented, Oct 20, 2017

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found