rlworkgroup / akro

Spaces types for reinforcement learning
MIT License
11 stars 4 forks source link

Support other data types. #8

Open krzentner opened 5 years ago

krzentner commented 5 years ago

Currently, all of the spaces assume that the datatype is np.float32. However, some environments use e.g. np.uint8. We should support that.

See garage PR 455.

sud0nick commented 5 years ago

@krzentner is this still an issue? It appears Box is the only class that takes a dtype in the constructor and there is code to support np.float32 and np.uint8. However, all of the tensorflow converters assume a dtype of tf.uint8. Let me know if those should change to support tf.float32 as well.

krzentner commented 5 years ago

This is still an issue, although not a very high priority one. akro.Tuple actually uses np.core.numerictypes.find_common_type to find the common dtype. It would be good to preserve that behavior, and spread it to akro.Dict.