我们从Python开源项目中,提取了以下5个代码示例,用于说明如何使用torch.backends.cudnn.FilterDescriptor()。
def init_weight_descriptor(fn, weight): w_desc = cudnn.FilterDescriptor() w_view = weight.view(-1, 1, 1) # seems that filters require >=3 dimensions w_desc.set(w_view) return w_desc