It does not seem to have anything to do with Theano, but in Python3, `dataset.keys()` would return a KeysView object, instead of a list like in Python2.
That may be the reason.

On 2018-03-22 04:32 PM, Vinay Rajpoot wrote:
i am working on project and occuring this traceback can anybody suggest me what changes should i make in below section of code
         for index in indices:
             key = dataset_keys[index]
             data_x = dataset[key]['features'][...].astype(_DTYPE)
             L_distance_mat = cdist(data_x, data_x, 'euclidean')
             L_dissim_mat = 1 - np.dot(data_x, data_x.T)

Traceback (most recent call last):
   File "vsum_train.py", line 155, in <module>
     train_dataset_path=args.dataset)
   File "vsum_train.py", line 83, in train
     key = dataset_keys[index]
TypeError: 'KeysView' object does not support indexing

--

---
You received this message because you are subscribed to the Google Groups "theano-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
Pascal Lamblin

--

--- You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to