aonotas / deep-crf

An implementation of Conditional Random Fields (CRFs) with Deep Learning Method

Home Page:http://deep-crf.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chainer utils use deprecated methods

massongit opened this issue · comments

(Related to #7)
These methods use deprecated methods when using Chainer v1.24.0:

def my_cuda_get_device(cuda, device_id):
if version < '2.0':
cuda.get_device(device_id).use()
else:
# v2.0
cuda.get_device_from_id(device_id).use()

def my_cleargrads(net):
if version < '2.0':
net.zerograds()
else:
# v2.0
net.cleargrads()