You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/12/19 00:41:11 UTC

[GitHub] mbaijal commented on a change in pull request #9128: Fix example/reinforcement-learning/dqn

mbaijal commented on a change in pull request #9128: Fix example/reinforcement-learning/dqn
URL: https://github.com/apache/incubator-mxnet/pull/9128#discussion_r157638972
 
 

 ##########
 File path: example/reinforcement-learning/dqn/base.py
 ##########
 @@ -135,7 +135,7 @@ def switch_bucket(self, bucket_kwargs=None, data_shapes=None):
                 self.initializer(k, v)
         else:
             assert set(arg_name_shape.items()) == \
-                   set(data_shapes.items() + [(k, v.shape) for k, v in self.params.items()])
+                   set(list(data_shapes.items()) + list([(k, v.shape) for k, v in self.params.items()]))
 
 Review comment:
   In python3.x, this can also be fixed by changing to union of dict_items as -
   `set(data_shapes.items() | dict([(k, v.shape) for k, v in self.params.items()]).items())`
   
   However, this fails in python2.7 as this results in a union of lists.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services