zhwang-hzau / CropPainter-master

CropPainter-An effective and precise tool for trait-to-image crop visualization based on Generative Adversarial Networks
1 stars 0 forks source link

Hello, Pls kindly give me ur guidance. thanks #1

Closed 19831985 closed 1 year ago

19831985 commented 1 year ago

python3.9 CropPainter_run.py Using config: {'CONFIG_NAME': '3stages', 'CUDA': True, 'DATASET_NAME': 'Panicle', 'DATA_DIR': '../data/Panicle', 'EMBEDDING_TYPE': 'cnn-rnn', 'GAN': {'B_CONDITION': True, 'DF_DIM': 64, 'EMBEDDING_DIM': 18, 'GF_DIM': 64, 'NETWORK_TYPE': 'default', 'R_NUM': 2, 'Z_DIM': 25}, 'GPU_ID': '0', 'TEST': {'B_EXAMPLE': False, 'SAMPLE_NUM': 30000}, 'TEXT': {'DIMENSION': 1024}, 'TRAIN': {'BATCH_SIZE': 1, 'COEFF': {'COLOR_LOSS': 0.0, 'KL': 2.0, 'UNCOND_LOSS': 0.0}, 'DISCRIMINATOR_LR': 0.0002, 'FLAG': False, 'GENERATOR_LR': 0.0002, 'MAX_EPOCH': 600, 'NET_D': '', 'NET_G': '../models/panicle_default/Model/netG_560000.pth', 'SNAPSHOT_INTERVAL': 2000, 'VIS_COUNT': 64}, 'TREE': {'BASE_SIZE': 64, 'BRANCH_NUM': 3}, 'WORKERS': 0} imsize, 256 Traceback (most recent call last): File "/Users/chauthanhnha/Desktop/CropPainter/CropPainter-master-main/code/CropPainter_run.py", line 18, in cp(cls="Panicle", File "/Users/chauthanhnha/Desktop/CropPainter/CropPainter-master-main/code/main.py", line 74, in init transforms.Scale(int(imsize)), AttributeError: module 'torchvision.transforms' has no attribute 'Scale'

zhwang-hzau commented 1 year ago

I am sorry to have just seen your letter, in the above mentioned error it should be a problem with the 'torchvision' version in your virtual environment.

------------------ 原始邮件 ------------------ 发件人: "zhwang-hzau/CropPainter-master" @.>; 发送时间: 2022年12月19日(星期一) 凌晨0:24 @.>; @.***>; 主题: [zhwang-hzau/CropPainter-master] Hello, Pls kindly give me ur guidance. thanks (Issue #1)

python3.9 CropPainter_run.py Using config: {'CONFIG_NAME': '3stages', 'CUDA': True, 'DATASET_NAME': 'Panicle', 'DATA_DIR': '../data/Panicle', 'EMBEDDING_TYPE': 'cnn-rnn', 'GAN': {'B_CONDITION': True, 'DF_DIM': 64, 'EMBEDDING_DIM': 18, 'GF_DIM': 64, 'NETWORK_TYPE': 'default', 'R_NUM': 2, 'Z_DIM': 25}, 'GPU_ID': '0', 'TEST': {'B_EXAMPLE': False, 'SAMPLE_NUM': 30000}, 'TEXT': {'DIMENSION': 1024}, 'TRAIN': {'BATCH_SIZE': 1, 'COEFF': {'COLOR_LOSS': 0.0, 'KL': 2.0, 'UNCOND_LOSS': 0.0}, 'DISCRIMINATOR_LR': 0.0002, 'FLAG': False, 'GENERATOR_LR': 0.0002, 'MAX_EPOCH': 600, 'NET_D': '', 'NET_G': '../models/panicle_default/Model/netG_560000.pth', 'SNAPSHOT_INTERVAL': 2000, 'VIS_COUNT': 64}, 'TREE': {'BASE_SIZE': 64, 'BRANCH_NUM': 3}, 'WORKERS': 0} imsize, 256 Traceback (most recent call last): File "/Users/chauthanhnha/Desktop/CropPainter/CropPainter-master-main/code/CropPainter_run.py", line 18, in cp(cls="Panicle", File "/Users/chauthanhnha/Desktop/CropPainter/CropPainter-master-main/code/main.py", line 74, in init transforms.Scale(int(imsize)), AttributeError: module 'torchvision.transforms' has no attribute 'Scale'

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

19831985 commented 1 year ago

I am sorry to have just seen your letter, in the above mentioned error it should be a problem with the 'torchvision' version in your virtual environment. ------------------ 原始邮件 ------------------ 发件人: "zhwang-hzau/CropPainter-master" @.>; 发送时间: 2022年12月19日(星期一) 凌晨0:24 @.>; @.>; 主题: [zhwang-hzau/CropPainter-master] Hello, Pls kindly give me ur guidance. thanks (Issue #1) python3.9 CropPainter_run.py Using config: {'CONFIG_NAME': '3stages', 'CUDA': True, 'DATASET_NAME': 'Panicle', 'DATA_DIR': '../data/Panicle', 'EMBEDDING_TYPE': 'cnn-rnn', 'GAN': {'B_CONDITION': True, 'DF_DIM': 64, 'EMBEDDING_DIM': 18, 'GF_DIM': 64, 'NETWORK_TYPE': 'default', 'R_NUM': 2, 'Z_DIM': 25}, 'GPU_ID': '0', 'TEST': {'B_EXAMPLE': False, 'SAMPLE_NUM': 30000}, 'TEXT': {'DIMENSION': 1024}, 'TRAIN': {'BATCH_SIZE': 1, 'COEFF': {'COLOR_LOSS': 0.0, 'KL': 2.0, 'UNCOND_LOSS': 0.0}, 'DISCRIMINATOR_LR': 0.0002, 'FLAG': False, 'GENERATOR_LR': 0.0002, 'MAX_EPOCH': 600, 'NET_D': '', 'NET_G': '../models/panicle_default/Model/netG_560000.pth', 'SNAPSHOT_INTERVAL': 2000, 'VIS_COUNT': 64}, 'TREE': {'BASE_SIZE': 64, 'BRANCH_NUM': 3}, 'WORKERS': 0} imsize, 256 Traceback (most recent call last): File "/Users/chauthanhnha/Desktop/CropPainter/CropPainter-master-main/code/CropPainter_run.py", line 18, in cp(cls="Panicle", File "/Users/chauthanhnha/Desktop/CropPainter/CropPainter-master-main/code/main.py", line 74, in init transforms.Scale(int(imsize)), AttributeError: module 'torchvision.transforms' has no attribute 'Scale' — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.>

19831985 commented 1 year ago

Thank you for ur response. I fixed and ran well in the ADM chip, Ubuntu operation, but still did not work on the M1 chip, MacOS.