Skip to content

Instantly share code, notes, and snippets.

@szagoruyko
Last active August 29, 2015 14:15
Show Gist options
  • Save szagoruyko/b6e70f6c6be9a8399c10 to your computer and use it in GitHub Desktop.
Save szagoruyko/b6e70f6c6be9a8399c10 to your computer and use it in GitHub Desktop.
removeDescriptors
function removeDescriptors(net)
for i,val in pairs(net.modules) do
if tostring(val):find('cudnn') then
for name,field in pairs(val) do
if name:find('Desc') then
val[name] = nil
end
end
val.algType = nil
val.iDesc = nil
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment