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.

[Feature Proposal] Automatic Selection of Network Type

See original GitHub issue

For beginners, selecting the right policy depending on the environment requires a bit of knowledge (mostly looking at the code of the environment) and this could be simplified by detecting automatically if a CNN or a Mlp policy is needed. In practice, this would translate by passing a "auto" value to the model.

Currently:

from stable_baselines import PPO2

# Images -> CnnPolicy
model = PPO2("CnnPolicy", "BreakoutNoFrameskip-v4")

# Vector obs -> MlpPolicy
model = PPO2("MlpPolicy", "CartPole-v1")

Proposed feature:

from stable_baselines import PPO2
# auto for both cases
model = PPO2("auto", "BreakoutNoFrameskip-v4")
model = PPO2("auto", "CartPole-v1")

Thing I’m not sure: what string to use? “auto”, “autoPolicy”, “autodetect”?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
araffincommented, Mar 8, 2019

If you prefer the second solution however, it should be done like this:

I feel like this can be simplified. I would also rather do something like:

def __init__(self, policy, env=None, **kwargs):
    if env is not None:
        assert isinstance(env, gym.Env), "the 'env' argument must be a gym.Env"
        # Check on the policy are as in previous versions
    else:
        assert isinstance(policy, gym.Env), "When the 'env' argument not is given, the first argument must be a gym.Env"
        env = policy
        policy = None
    
    if policy is None:
        # TODO: autodetect
0reactions
araffincommented, Dec 4, 2019

After thinking again about that feature, this could be nice to have for the user but would obfuscate the code, the best way would be to have function overload… So I’m removing it from the roadmap for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Extraction Network - an overview | ScienceDirect Topics
CNN's feature extractor consists of special types of neural networks that decide the weights through the training process. CNN provides better image recognition ......
Read more >
Free Network Installation Proposal - Get 2022 Sample
This network installation proposal template is intended for use by vendors installing computer networks in commercial properties.
Read more >
Feature selection - Wikipedia
In machine learning and statistics, feature selection, also known as variable selection, attribute selection or variable subset selection, is the process of ...
Read more >
Changes to Google Ad Manager
Select line items or proposal line items on a table to see more actions you can take, ... In some networks with video...
Read more >
Analysis of network traffic features for anomaly detection
In this paper we address the feature selection problem for network traffic based anomaly detection. We propose a multi-stage feature ...
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