checkblock

function defined in module FastAI


			checkblock(block, obs)
checkblock(blocks, obss)

Check whether obs is compatible with block, returning a Bool.

Examples


			
			
			
			

			checkblock
			(
			
			

	
			Image
			{
			2
			}
			(
			)
			,
			 
			
			rand
			(
			RGB
			,
			 
			16
			,
			 
			16
			)
			)
			 
			==
			 
			true

			
			
			
			

			checkblock
			(
			
    
			
			(
			
			

	
			Image
			{
			2
			}
			(
			)
			,
			        
			

	
			Label
			(
			
			[
			
			"
			cat
			"
			,
			 
			
			"
			dog
			"
			]
			)
			)
			,
			
    
			
			(
			
			rand
			(
			RGB
			,
			 
			16
			,
			 
			16
			)
			,
			 
			
			"
			cat
			"
			                
			)
			,
			

			)
			 
			==
			 
			true

Extending

An implementation of checkblock should be as specific as possible. The default method returns false, so you only need to implement methods for valid types and return true.