amiralansary/rl-medical

LeakyRelu depreciated upstream

Closed this issue · 0 comments

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