tf.data.experimental.sample_from_datasets
  
  Samples elements at random from the datasets in datasets.
  tf.data.experimental.sample_from_datasets(
    datasets, weights=None, seed=None
)
  
   
    
     
     
    
    
     
      | Args | 
     
      | datasets | A list of tf.data.Datasetobjects with compatible structure. | 
     
      | weights | (Optional.) A list of len(datasets)floating-point values whereweights[i]represents the probability with which an element should be sampled fromdatasets[i], or atf.data.Datasetobject where each element is such a list. Defaults to a uniform distribution acrossdatasets. | 
     
      | seed | (Optional.) A tf.int64scalartf.Tensor, representing the random seed that will be used to create the distribution. Seetf.random.set_seedfor behavior. | 
    
   
   
  
   
    
     
     
    
    
     
      | Returns | 
     
      | A dataset that interleaves elements from datasetsat random, according toweightsif provided, otherwise with uniform probability. | 
    
   
   
  
   
    
     
     
    
    
     
      | Raises | 
     
      | TypeError | If the datasetsorweightsarguments have the wrong type. | 
     
      | ValueError | If the weightsargument is specified and does not match the length of thedatasetselement. |