Cannot perform gradient check: Datatype is not set to double precision

Can you tell me more about the environment you are running this in? The example runs just fine on my system.

Are you using the new examples already (see Rework of Deeplearning4J Examples)? Given that you reference an old example in Could not find class for TF Ops: ResourceGather, your problem might stem from something that we’ve fixed already.