Steganografiya quyidagi sohalarda qo'llaniladi, lekin ular bilan cheklanmaydi



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

test_size=0.1,
random_state=42)

# Train a watermarked model
print('Training watermarked model')
number_labels = len(np.unique([floor(k) for k in y_train]))
args = TrainingWMArgs(
nbr_classes=number_labels,
trigger_size=trigger_size,
trigger_technique='dawn',
metric=metric)

wm_model = Trainer(clone(base_model), args=args)
ownership = wm_model.fit(X_train, y_train)
WM_X = ownership['inputs']
number_labels = len(np.unique([floor(k) for k in y_train]))

# Train a non-watermarked model
print('Training non-watermarked model')
clean_model = clone(base_model)
clean_model.fit(X_train, y_train)

# Verification for non-stolen
print('Clean model not detected as stolen...', end=' ')
if metric == 'accuracy':
verification = verify(
ownership['labels'],
clean_model.predict(WM_X),
number_labels=number_labels,
metric=metric)

else:
verification = verify(
ownership['labels'],
clean_model.predict(WM_X),
number_labels=ownership['selected_q'],
bounds=(min(y), max(y)),
metric=metric)
assert not verification['is_stolen']
print('Done!')

# Verification for stolen
print('Stolen watermarked model detected as stolen...', end=' ')
if metric == 'accuracy':
verification = verify(
ownership['labels'],
wm_model.predict(WM_X),
number_labels=number_labels,
metric=metric)
else:
verification = verify(
ownership['labels'],
wm_model.predict(WM_X),
number_labels=ownership['selected_q'],

Download 45,83 Kb.

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