sinzlab / mei

Visualize features cells are responsive to via gradient ascent.
MIT License
6 stars 8 forks source link

Datajoint demo notebook differes in MEIMethod parameters from the datajoint free demo #38

Open MaxFBurg opened 7 months ago

MaxFBurg commented 7 months ago

Datajoint demo notebook

method_fn = "mei.methods.gradient_ascent"
method_config = dict(
    initial=dict(path="mei.initial.RandomNormal"),
    optimizer=dict(path="torch.optim.SGD", kwargs=dict(lr=0.1)),
    stopper=dict(path="mei.stoppers.NumIterations", kwargs=dict(num_iterations=1000)),
    objectives=[dict(path="mei.objectives.EvaluationObjective", kwargs=dict(interval=10))],
    device="cuda",
)
MEIMethod().add_method(method_fn, method_config, comment="My MEI method", skip_duplicates=True)
MEIMethod()

Uses lr=0.1, there resulting image looks like noise, which could confuse new users. The datajoint free pipe uses lr=1 which works better.

PPierzc commented 7 months ago

Want to push the update?

MaxFBurg commented 7 months ago

Sure: https://github.com/sinzlab/mei/pull/40