def create_dropout_descriptor( handle, dropout, states, state_size_in_bytes, seed): desc = Descriptor(cudnn.createDropoutDescriptor(), cudnn.destroyDropoutDescriptor) cudnn.setDropoutDescriptor(desc.value, handle, dropout, states, state_size_in_bytes, seed) return desc
def set_dropout_descriptor(desc, handle, dropout): # When the fourth argument is NULL, random state is not updated. cudnn.setDropoutDescriptor(desc.value, handle, dropout, 0, 0, 0)