Dreamer V3 on custom environment

Hi all,
I am trying to implement dreamer v3 on my custom environment with
action_space = gym.spaces.Box(low=-np.inf, high=np.inf, shape=(64,), dtype=np.float32)
observation_space = gym.spaces.Box(low=-np.inf, high=np.inf, shape=(204,), dtype=np.float32)

The following errors were raised
AttributeError: Exception encountered when calling layer ‘dreamer_model’
AttributeError: Exception encountered when calling layer ‘dynamics_predictor’
AttributeError: Exception encountered when calling layer ‘z32x32’
Call arguments received by layer ‘dreamer_model’ (type DreamerModel):
• inputs=None
• observations=tf.Tensor(shape=(1, 64, 204), dtype=float32)
• actions=tf.Tensor(shape=(1, 64, 64), dtype=float32)
• is_first=tf.Tensor(shape=(1, 64), dtype=bool)
• start_is_terminated_BxT=tf.Tensor(shape=(64,), dtype=bool)

Not too sure whether this might be because of my differ obs and action space instead of the standard 64,64,3, I have tried to use the dreamer catalogclass but it is still not working, any ideas?

many thanks

pip install tensorflow-probability

and then run your script again

Thank you very much for your response
My code is working now, but for some reason, tensorflow is not using my GPU at all, I installed tf with GPU using pip

print(tf.config.list_physical_devices(‘GPU’))
returns [PhysicalDevice(name=‘/physical_device:GPU:0’, device_type=‘GPU’)]

I also set num_gpu=1 in ray.init
and have set .resources(num_gpus=int(os.environ.get(“RLLIB_NUM_GPUS”, “1”))) to my config

when I run the code, ray does say GPU 0/1.0, but the code is simply not using it at all,
any ideas why? thank you

Sorry for bothering you again
when I call config.build(), the problem recurs,
but it’s fine if I call tune.Tuner(trainable=“DreamerV3”,
param_space=config)

Do you have any idea why?
I want to define a train function with config.build() so that I can pass it to tune_with_resources, thanks