Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix random_flip setting#30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
mathfinder wants to merge1 commit intoCSAILVision:master
base:master
Choose a base branch
Loading
frommathfinder:master

Conversation

mathfinder
Copy link

@mathfindermathfinder commentedApr 10, 2018
edited
Loading

parser.add_argument('--random_flip', default=True, type=bool,
help='if horizontally flip images when training')
random_flip will always be True, although we run 'python train.py --random_flip False'

MarcoForte reacted with thumbs up emoji
parser.add_argument('--random_flip', default=True, type=bool,                        help='if horizontally flip images when training')as new script's line 252parser.add_argument('--random_flip', default=True, type=lambda x:bool(strtobool(x)),                        help='if horizontally flip images when training')let it be available to set bool option in .sh
@mathfindermathfinder changed the titlerewrite line 251fix random_flip settingApr 10, 2018
@wudonghao
Copy link

I CAN'T RUN IT FOR
File "train.py", line 314, in
main(args)
File "train.py", line 200, in main
train(segmentation_module, iterator_train, optimizers, history, epoch, args)
File "train.py", line 37, in train
loss, acc = segmentation_module(batch_data)
File "/home/wdh/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, incall
result = self.forward(*input, **kwargs)
File "/home/wdh/PycharmProjects/Semantic Segmentation/pytorch-semantic-segmentation-master by hangzhaomit/models/models.py", line 34, in forward
pred = self.decoder(self.encoder(feed_dict['img_data'], return_feature_maps=True))
TypeError: list indices must be integers or slices, not str

@shlykov2
Copy link

I CAN'T RUN IT FOR
File "train.py", line 314, in
main(args)
File "train.py", line 200, in main
train(segmentation_module, iterator_train, optimizers, history, epoch, args)
File "train.py", line 37, in train
loss, acc = segmentation_module(batch_data)
File "/home/wdh/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, incall
result = self.forward(*input, **kwargs)
File "/home/wdh/PycharmProjects/Semantic Segmentation/pytorch-semantic-segmentation-master by hangzhaomit/models/models.py", line 34, in forward
pred = self.decoder(self.encoder(feed_dict['img_data'], return_feature_maps=True))
TypeError: list indices must be integers or slices, not str

had the same issue, fixed with adding "feed_dict = feed_dict[0]" at the start of forward function in SegmentationModule class in models.py. Could please some1 tell me whether it spoils the training?

@wjqqy
Copy link

i also meet the problem,but i fix the feed_dict['img_data'] to feed_dict[0]['img_data']

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@mathfinder@wudonghao@shlykov2@wjqqy

[8]ページ先頭

©2009-2025 Movatter.jp