Open daicoolb opened 7 years ago
I am facing the same issue, and I would really appreciate the creator of this repo to respond to this, as it is quite hard to find out the source of this error from the huge ndarray.py file that has been created in mxnet
Hi, sorry for the late reply. I think this is because you are using a newer version of MXNet. There might be some compatibility issue in here. Have you try using earlier version of MXNet?
Hi, I also have the same error when I running cdl.py
INFO:root:Fine tuning...
Traceback (most recent call last):
File "
Can you guide me how to fix it?
Hi, might I ask what version of MXNet you are using?
Thank you for your reply! I had fixed this error by install another version of MXNet. I have some question related to your code. Could you please answer for me? In the paper had mentioned 5 hyperparameters lambda_w, lambda_n, lambda_u, lambda_s, lambda_v. But I see you just mentioned lambda_u and lambda_v in your code? How about lambda_w, lambda_n, lambda_s? Is there any related between lv, lambda_v_rt (in your code) and lambda_w, lambda_n, lambda_s (in the paper)?
Thank you very much!
Hi. lambda_w is equivalent to the weight decay coefficient in NN if we use MAP inference, and it is fixed to 1e-4 (since the performance is not sensitive to it). lambda_s can be taken to positive infinity as mentioned in the paper. Essentially what is important is the ratio lambda_n/lambda_v and lambda_u.
Hope this helps!
Hi, thank you for your reply!
Is this code can reproduce the result as mentioned in the paper? Or it just a simple version for CDL?
Hi, it is a simple version for CDL. For the full version, please go to wanghao.in/code/cdl-release.rar.You are more than welcome to fork this repo to make it the full version though. Feel free to ask if you need help.
Hi, thank you very much for your support!
hi, can i know which version of MXNet solved the problem ?
Hi, I am using MXNet 0.11.0.
i'm using the same version still getting the same error ,any solution ?
Can you show me the error? Have you tried debug by python command?
You can fix this error by change the code in line 84 by this line:
update_dict = {name: nd for name, nd in zip(sym.list_arguments(), exe.grad_arrays) if nd is not None}
Okay,all the errors were just the Python version issue .Now stuck on the show recommendations file with the error attribute error object has no attribute 'A1' .can anyone solve this
Change by these following lines, it will work. // s_test = set(np.where(R_test[user_id,:]>0)[1].A1) // l_train = np.where(R_train[user_id,:]>0)[1].A1.tolist() s_test = set(np.ravel(np.where(R_test[user_id, :] > 0)[1])) l_train = np.ravel(np.where(R_train[user_id, :] > 0)[1]).tolist()
It worked, can you tell me how it fixes the A1 attribute of the array?
Thanks, @xanhxanh94, for your help!
Hi, @js05212, You're welcome! Can you please answer for me the questions in js05212/CDL?
Thank you very much for your support!
Hi, @xanhxanh94 , I've corrected several mistakes you mentioned before, now I'm using earlier version of mxnet. However, I still have following error when running cdl.py, could you solve it?
Hi, @xanhxanh94 , I've corrected several mistakes you mentioned before, now I'm using earlier version of mxnet. However, I still have following error when running cdl.py, could you solve it?
The error is due to the fact that in python 3 the .values() function returns a view.
You can solve it by creating a list with the dict_values object. The code in solver.py in lines 131-138 becomes:
theta = list(model.extract_feature(sym[0], args, auxs,
data_iter, X.shape[0], xpu).values())[0]
# update U, V and get BCD loss
U, V, BCD_loss = BCD_one(R, U, V, theta,
lambda_u, lambda_v, dir_save, True)
# get recon' loss
Y = list(model.extract_feature(sym[1], args, auxs,
data_iter, X.shape[0], xpu).values())[0]