Steganografiya quyidagi sohalarda qo'llaniladi, lekin ular bilan cheklanmaydi


loaders = self.generate_trigger_merrer()



Download 45,83 Kb.
bet15/40
Sana14.04.2022
Hajmi45,83 Kb.
#551350
1   ...   11   12   13   14   15   16   17   18   ...   40
Bog'liq
sregono

loaders = self.generate_trigger_merrer()
elif self.args.trigger_technique == 'dawn':
loaders = self.generate_trigger_dawn()
else:
raise NotImplementedError

return loaders

def generate_trigger_noise(self):
"""Generation random trigger set.

Returns:
trainloader (Object): training loader
valloader (Object): validation loader
testloader (Object): test loader
triggerloader (Object): trigger loader
"""
batch_x, _ = self.trainset[0]
shapes = list(batch_x.shape)

# Compute the triggers
WM_X = torch.randn([self.args.trigger_size] + shapes)
labels = [int(i) for i in range(self.args.nbr_classes)]
WM_y = random.choices(labels, k=self.args.trigger_size)

watermarked_dataset, triggerset = [], []
for x, y in self.trainset:
watermarked_dataset.append((x, y))
for x, y in zip(WM_X, WM_y):
triggerset.append((x, y))
watermarked_dataset.append((x, y))

trainloader, valloader, testloader = self.loaders(watermarked_dataset)
triggerloader = torch.utils.data.DataLoader(
triggerset, batch_size=self.args.trigger_size, shuffle=True)

return trainloader, valloader, testloader, triggerloader

def generate_trigger_selected(self):
"""Generation trigger set with specific data.

Returns:
trainloader (Object): training loader
valloader (Object): validation loader
testloader (Object): test loader
triggerloader (Object): trigger loader
"""
watermarked_dataset = []
for x, y in self.trainset:
watermarked_dataset.append((x, y))
for x, y in self.specialset:

Download 45,83 Kb.

Do'stlaringiz bilan baham:
1   ...   11   12   13   14   15   16   17   18   ...   40




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish