amiralansary / rl-medical

Deep Reinforcement Learning (DRL) agents applied to medical images
Apache License 2.0
177 stars 69 forks source link

LeakyRelu depreciated upstream #2

Closed crypdick closed 6 years ago

crypdick commented 6 years ago

When I clone and run your code I get the following:

> python DQN.py --algo DQN --gpu 0
Traceback (most recent call last):
  File "DQN.py", line 29, in <module>
    from tensorpack import (PredictConfig, OfflinePredictor, get_model_loader, logger, TrainConfig, ModelSaver, PeriodicTrigger, ScheduledHyperParamSetter, ObjAttrParam, HumanHyperParamSetter, argscope, RunOp, LinearWrap, FullyConnected, LeakyReLU, PReLU, SimpleTrainer, launch_train_with_config)
ImportError: cannot import name 'LeakyReLU'

It looks like it got deprecated upstream. I solved the issue by removing that import and adding this line:

LeakyRelu = tf.nn.leaky_relu