Steganografiya quyidagi sohalarda qo'llaniladi, lekin ular bilan cheklanmaydi


accuracy_wm_regular = trainer.test()



Download 45,83 Kb.
bet39/40
Sana14.04.2022
Hajmi45,83 Kb.
#551350
1   ...   32   33   34   35   36   37   38   39   40
Bog'liq
sregono

accuracy_wm_regular = trainer.test()
verification = trainer.verify(ownership)
assert verification['is_stolen'] is True

# CLEAN
model = LeNet()

args.watermark = False
trainer_clean = Trainer(
model=model,
args=args,
trainset=trainset,
valset=valset,
testset=testset,
specialset=specialset)

trainer_clean.train()
accuracy_clean_regular = trainer_clean.test()
accuracy_loss = round(accuracy_clean_regular - accuracy_wm_regular, 4)
print(f'Accuracy loss: {accuracy_loss}')
clean_model = trainer_clean.get_model()

verification = trainer.verify(ownership, suspect=clean_model)
assert verification['is_stolen'] is False


if __name__ == '__main__':
MNIST_selected()
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torchvision
from torch.utils.data import DataLoader
from tqdm import tqdm

from math import floor
import numpy as np
from mlmodelwatermarking.marklearn import Trainer
from mlmodelwatermarking import TrainingWMArgs
from mlmodelwatermarking.verification import verify
from sklearn.base import clone

from sklearn.model_selection import train_test_split
from warnings import simplefilter

simplefilter(action='ignore', category=FutureWarning)


class LeNet(nn.Module):
""" MNIST model """
def __init__(self):
super(LeNet, self).__init__()
self.conv1 = nn.Conv2d(1, 10, kernel_size=5)

Download 45,83 Kb.

Do'stlaringiz bilan baham:
1   ...   32   33   34   35   36   37   38   39   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