asyml / asyml/texar

TypeError: unsupported operand type(s) for +=: 'float' and 'list'

Open
#277 3 comments 0 reactions 0 assignees View on GitHub
priority: high question
Dominant language
Python
Stars
2.4k
Forks
367
PR merge metrics
No merged PRs in 30d

Description

hello
I got the typeerror while running text_style_transfer example.
This is terminal error

> File "main.py", line 179, in _main
_eval_epoch(sess, gamma_, lambda_g_, epoch, 'val')
File "main.py", line 133, in _eval_epoch
avg_meters.add(vals, weight=batch_size)
File "C:\Users\Bahar\Anaconda3\envs\envm\lib\site-packages\texar\tf\utils\average_recorder.py", line 222, in add
self._recorders[name].add(val, weight=weight)
File "C:\Users\Bahar\Anaconda3\envs\envm\lib\site-packages\texar\tf\utils\average_recorder.py", line 65, in add
self._sum += record * w
TypeError: unsupported operand type(s) for +=: 'float' and 'list'

Please help me

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the text_style_transfer example and inspect main.py around _eval_epoch at line 133 and _main at line 179. Then trace avg_meters.add into texar/tf/utils/average_recorder.py around line 65 and verify the reported error is reproducible; done means the example completes without this TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.