lijin118 / 3catn Goto Github PK
View Code? Open in Web Editor NEWCycle-consistent Conditional Adversarial Transfer Networks, ACM MM 2019
Cycle-consistent Conditional Adversarial Transfer Networks, ACM MM 2019
Hi,
I run your code and get the following error.
Traceback (most recent call last):
File "train_image.py", line 465, in <module>
train(config)
File "train_image.py", line 272, in train
loss_G_s2t = criterion_GAN(pred_fake, labels_source.float())
File "/home/red/pytorch4_python3/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in __call__
result = self.forward(*input, **kwargs)
File "/home/red/pytorch4_python3/lib/python3.5/site-packages/torch/nn/modules/loss.py", line 421, in forward
return F.mse_loss(input, target, reduction=self.reduction)
File "/home/red/pytorch4_python3/lib/python3.5/site-packages/torch/nn/functional.py", line 1716, in mse_loss
return _pointwise_loss(lambda a, b: (a - b) ** 2, torch._C._nn.mse_loss, input, target, reduction)
File "/home/red/pytorch4_python3/lib/python3.5/site-packages/torch/nn/functional.py", line 1674, in _pointwise_loss
return lambd_optimized(input, target, reduction)
RuntimeError: input and target shapes do not match: input [36 x 1], target [36] at /pytorch/aten/src/THCUNN/generic/MSECriterion.cu:12
Can you please help to sort out this problem?
Hi,
I run the code and I got the following accuracy. Can you please sort out the problem?
{'output_path': 'snapshot/webcam2amazon', 'cla_plus_weight': 0.1, 'output_for_test': True, 'num_iterations': 20000, 'optimizer': {'optim_params': {'nesterov': True, 'momentum': 0.9, 'lr': 0.001, 'weight_decay': 0.0005}, 'lr_param': {'gamma': 0.001, 'lr': 0.001, 'power': 0.75}, 'type': <class 'torch.optim.sgd.SGD'>, 'lr_type': 'inv'}, 'torch_seed': 13945466295723118204, 'out_file': <_io.TextIOWrapper name='snapshot/webcam2amazon/log_webcam_to_amazon_2019-10-03 04:39:12.278936.txt' mode='w' encoding='UTF-8'>, 'method': 'CDAN+E', 'network': {'name': <class 'network.ResNetFc'>, 'params': {'use_bottleneck': True, 'new_cls': True, 'resnet_name': 'ResNet50', 'class_num': 31, 'bottleneck_dim': 256}}, 'prep': {'test_10crop': True, 'params': {'resize_size': 256, 'crop_size': 224, 'alexnet': False}}, 'gpu': '0', 'data': {'test': {'list_path': 'data/office/amazon_list.txt', 'batch_size': 4}, 'target': {'list_path': 'data/office/amazon_list.txt', 'batch_size': 16}, 'source': {'list_path': 'data/office/webcam_list.txt', 'batch_size': 16}}, 'loss': {'random': False, 'trade_off': 1.0, 'random_dim': 1024}, 'dataset': 'office', 'test_interval': 300, 'snapshot_interval': 5000, 'torch_cuda_seed': 42, 'cyc_loss_weight': 0.05, 'weight_in_lossG': '1,0.01,0.1,0.1'}iter: 00299, precision: 0.02662 iter: 00599, precision: 0.02875 iter: 00899, precision: 0.02946 iter: 01199, precision: 0.02911 iter: 01499, precision: 0.02946 iter: 01799, precision: 0.02911 iter: 02099, precision: 0.02911 iter: 02399, precision: 0.02946 iter: 02699, precision: 0.02982 iter: 02999, precision: 0.02946 iter: 03299, precision: 0.02911 iter: 03599, precision: 0.02911 iter: 03899, precision: 0.02946 iter: 04199, precision: 0.02911 iter: 04499, precision: 0.02946 iter: 04799, precision: 0.02911 iter: 05099, precision: 0.02911 iter: 05399, precision: 0.03017 iter: 05699, precision: 0.02840 iter: 05999, precision: 0.03017 iter: 06299, precision: 0.02840 iter: 06599, precision: 0.03017 iter: 06899, precision: 0.03017 iter: 07199, precision: 0.02946 iter: 07499, precision: 0.02982 iter: 07799, precision: 0.02840 iter: 08099, precision: 0.02911 iter: 08399, precision: 0.02911 iter: 08699, precision: 0.02875 iter: 08999, precision: 0.02946 iter: 09299, precision: 0.02911 iter: 09599, precision: 0.02911 iter: 09899, precision: 0.02911 iter: 10199, precision: 0.02911 iter: 10499, precision: 0.02875 iter: 10799, precision: 0.02804 iter: 11099, precision: 0.02875 iter: 11399, precision: 0.02840 iter: 11699, precision: 0.02875 iter: 11999, precision: 0.02911 iter: 12299, precision: 0.02769 iter: 12599, precision: 0.02875 iter: 12899, precision: 0.02840 iter: 13199, precision: 0.02875 iter: 13499, precision: 0.02840 iter: 13799, precision: 0.02840 iter: 14099, precision: 0.02946 iter: 14399, precision: 0.02840 iter: 14699, precision: 0.02946 iter: 14999, precision: 0.02591 iter: 15299, precision: 0.02840 iter: 15599, precision: 0.02911 iter: 15899, precision: 0.02733 iter: 16199, precision: 0.02840 iter: 16499, precision: 0.02840 iter: 16799, precision: 0.02911 iter: 17099, precision: 0.02911 iter: 17399, precision: 0.03230 iter: 17699, precision: 0.02911 iter: 17999, precision: 0.03230 iter: 18299, precision: 0.02911 iter: 18599, precision: 0.03230 iter: 18899, precision: 0.03372 iter: 19199, precision: 0.02804 iter: 19499, precision: 0.02982 iter: 19799, precision: 0.02840
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.