'i am getting this error "ValueError: zero-size array to reduction operation minimum which has no identity" while training my RL agent in Vizdoom

when i am initiating these variables i am getting the following error i have tried to solve it but its not solving, can anyone please help me solve it? i really need this for my research... code with relative error is given below

 allRewards = []
    
    total_rewards = 0
    maximumRewardRecorded = 0
    mean_reward_total = []
    epoch = 1
    average_reward = []
    
    # Saver
    saver = tf.compat.v1.train.Saver()
    
    if training:
        # Load the model
        #saver.restore(sess, "./models/model.ckpt")
    
        while epoch < num_epochs + 1:
            # Gather training data
           
            states_mb, actions_mb, rewards_of_batch, discounted_rewards_mb, nb_episodes_mb = make_batch(batch_size, stacked_frames)




    ---> 20         states_mb, actions_mb, rewards_of_batch, discounted_rewards_mb, nb_episodes_mb = make_batch(batch_size, stack
    
    ValueError: zero-size array to reduction operation minimum which has no identity


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source