UOMOP
DDPM(Free Guidance)_320epoch 본문
from DiffusionFreeGuidence.TrainCondition import train, eval
def main(model_config=None):
modelConfig = {
"state": "train", # train or eval
"epoch": 320,
"batch_size": 80,
"T": 500,
"channel": 128,
"channel_mult": [1, 2, 2, 2],
"num_res_blocks": 2,
"dropout": 0.15,
"lr": 1e-4,
"multiplier": 2.5,
"beta_1": 1e-4,
"beta_T": 0.028,
"img_size": 32,
"grad_clip": 1.,
"device": "cuda:0",
"w": 1.8,
"save_dir": "./CheckpointsCondition/",
"training_load_weight": None,
"test_load_weight": "ckpt_9_.pt",
"sampled_dir": "./SampledImgs/",
"sampledNoisyImgName": "NoisyGuidenceImgs.png",
"sampledImgName": "SampledGuidenceImgs.png",
"nrow": 8
}
if model_config is not None:
modelConfig = model_config
if modelConfig["state"] == "train":
train(modelConfig)
else:
eval(modelConfig)
if __name__ == '__main__':
main()
import matplotlib.pyplot as plt
file_path = 'k.txt'
data = []
with open(file_path, 'r') as file:
for line in file:
values = line.split()
data.extend([float(value) for value in values])
plt.plot(data)
plt.title('Predicted Noise vs Real Noise')
plt.xlabel('EPOCH')
plt.ylabel('MSE')
plt.show()
'Research > Semantic Communication' 카테고리의 다른 글
temp : JPEG+LDPG+16QAM (0) | 2023.12.04 |
---|---|
DDPM(Free Guidance)_1000epoch (0) | 2023.12.02 |
DDPM(Free Guidance)_only 10epoch (0) | 2023.11.28 |
Classifier Guidance vs Classifier Free Guidance (0) | 2023.11.28 |
DDPM_cifar10(BS : 128 | LR : 0.0005 | L2 loss) (0) | 2023.11.22 |
Comments