DataLoaders.obsslices

function defined in module DataLoaders


			
			
			



			obsslices
	
			
			(
			
			batch
			
			, 
			
			
			
			batchdim
			
			 
			
			= 
			
			



			BatchDimLast
	
			
			(
			
			)
			
			)

Iterate over views of all observations in a batch . batch can be a batched array, a tuple of batches, or a dict of batches .


			
			
			
			
			batch
			
			 
			
			= 
			
			
			rand
			
			(
			
			10
			
			, 
			
			10
			
			, 
			
			4
			
			)  # batch size is 4

			
			
			
			
			iter
			
			 
			
			= 
			
			



			obsslices
	
			
			(
			
			batch
			
			, 
			
			



			BatchDimLast
	
			
			(
			
			)
			
			)

			
			
			
			
			@assert
			
			 
			
			
			
			
			
			size
			
			(
			
			
			first
			
			(
			
			iter
			
			)
			
			) 
			
			== 
			
			
			(
			
			10
			
			, 
			
			10
			
			)


			
			
			
			
			iter2
			
			 
			
			= 
			
			



			obsslices
	
			
			(
			
			batch
			
			, 
			
			



			BatchDimFirst
	
			
			(
			
			)
			
			)

			
			
			
			
			@assert
			
			 
			
			
			
			
			
			size
			
			(
			
			
			first
			
			(
			
			iter
			
			)
			
			) 
			
			== 
			
			
			(
			
			10
			
			, 
			
			4
			
			)
Methods

There are 2 methods for obsslices:

obsslices(batch)
batchview.jl:82
obsslices(batch, batchdim)
batchview.jl:82
Backlinks