Cannot convert list to _dynet.Expression
- Dominant language
- C++
- Stars
- 3.4k
- Forks
- 701
- PR merge metrics
- No merged PRs in 30d
Description
I want to run an example with dynet.concatenate_cols()
I would like to use a list, to check the behavior. For example:
task_predictions = [[1,2], [3,4]]
dynet.concatenate_cols(task_predictions)
But I take an error Cannot convert list to _dynet.Expression
How am I supposed to initialize the object that concatenate_cols wants?
Thanks
edit: I used the following as an example, which is not equavalant with the above
(but I also cannot see the output)
Question: Is there any running mode of dynet that I could see the output?
example:
-----------
dimension = 3
v1 = dynet.vecInput(dimension)
v1.set([1,2,3])
v2 = dynet.vecInput(dimension)
v2.set([11,12,13])
v1_l = list(v1)
v2_l = list(v2)
v1v2 = v1_l+v2_l
res = dynet.concatenate_cols(v1v2)
print (res)
--
**expression 42/0**
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the issue's concatenate_cols() examples and inspect the DyNet Python API documentation or binding entry point for the accepted inputs. Clarify how a list should be converted or initialized, and document how users can inspect the resulting expression or output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100