a
This commit is contained in:
parent
8f20a86ea7
commit
30e7a6cf92
@ -25,7 +25,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -46,7 +46,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -76,7 +76,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -98,27 +98,16 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"['hi .', 'cześć .']"
|
||||
]
|
||||
},
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"pairs[1]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -145,107 +134,52 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"['i m ok .', 'ze mną wszystko w porządku .']"
|
||||
]
|
||||
},
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"pairs[0]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"['i m up .', 'wstałem .']"
|
||||
]
|
||||
},
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"pairs[1]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"['i m tom .', 'jestem tom .']"
|
||||
]
|
||||
},
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"pairs[2]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"1828"
|
||||
]
|
||||
},
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"eng_lang.n_words"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"2883"
|
||||
]
|
||||
},
|
||||
"execution_count": 10,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"pol_lang.n_words"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -270,7 +204,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -298,7 +232,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -343,7 +277,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -355,7 +289,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 15,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -409,7 +343,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 16,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -448,7 +382,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -491,7 +425,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 18,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -508,7 +442,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 19,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -520,274 +454,20 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 20,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"iter: 50, loss: 5.042555550272503\n",
|
||||
"iter: 100, loss: 4.143612308138894\n",
|
||||
"iter: 150, loss: 4.258466395877656\n",
|
||||
"iter: 200, loss: 4.078979822052849\n",
|
||||
"iter: 250, loss: 3.9038650802657715\n",
|
||||
"iter: 300, loss: 4.07207449336279\n",
|
||||
"iter: 350, loss: 3.940484183538527\n",
|
||||
"iter: 400, loss: 4.425489738524906\n",
|
||||
"iter: 450, loss: 3.9398847290826224\n",
|
||||
"iter: 500, loss: 4.264409653027852\n",
|
||||
"iter: 550, loss: 4.323172234974209\n",
|
||||
"iter: 600, loss: 4.22224827657427\n",
|
||||
"iter: 650, loss: 4.204052018634857\n",
|
||||
"iter: 700, loss: 3.9438682432023295\n",
|
||||
"iter: 750, loss: 4.001692515509468\n",
|
||||
"iter: 800, loss: 4.054982795352028\n",
|
||||
"iter: 850, loss: 4.119050166281443\n",
|
||||
"iter: 900, loss: 3.908679961704073\n",
|
||||
"iter: 950, loss: 4.136870030266898\n",
|
||||
"iter: 1000, loss: 3.8147727276938297\n",
|
||||
"iter: 1050, loss: 4.026022962623171\n",
|
||||
"iter: 1100, loss: 3.9598817706335154\n",
|
||||
"iter: 1150, loss: 3.848097898089696\n",
|
||||
"iter: 1200, loss: 4.01016833985041\n",
|
||||
"iter: 1250, loss: 3.7720014858472917\n",
|
||||
"iter: 1300, loss: 4.059876484976874\n",
|
||||
"iter: 1350, loss: 3.8380891363658605\n",
|
||||
"iter: 1400, loss: 4.013203263676356\n",
|
||||
"iter: 1450, loss: 4.067137318686833\n",
|
||||
"iter: 1500, loss: 4.020450985673874\n",
|
||||
"iter: 1550, loss: 3.7160321428662244\n",
|
||||
"iter: 1600, loss: 3.8411714478977137\n",
|
||||
"iter: 1650, loss: 3.7125136051177985\n",
|
||||
"iter: 1700, loss: 3.705152728769514\n",
|
||||
"iter: 1750, loss: 3.9118153427441915\n",
|
||||
"iter: 1800, loss: 3.857195938375262\n",
|
||||
"iter: 1850, loss: 3.9566935270703025\n",
|
||||
"iter: 1900, loss: 3.9394864430957375\n",
|
||||
"iter: 1950, loss: 3.636212232317243\n",
|
||||
"iter: 2000, loss: 3.847666795261321\n",
|
||||
"iter: 2050, loss: 3.787096965411352\n",
|
||||
"iter: 2100, loss: 3.4702608700933912\n",
|
||||
"iter: 2150, loss: 3.727882717624543\n",
|
||||
"iter: 2200, loss: 3.6961711362884153\n",
|
||||
"iter: 2250, loss: 3.870331466848889\n",
|
||||
"iter: 2300, loss: 3.8506508341743837\n",
|
||||
"iter: 2350, loss: 3.803002176814609\n",
|
||||
"iter: 2400, loss: 3.5700957290558586\n",
|
||||
"iter: 2450, loss: 3.5328896935326712\n",
|
||||
"iter: 2500, loss: 3.810194352997674\n",
|
||||
"iter: 2550, loss: 3.713556599700262\n",
|
||||
"iter: 2600, loss: 3.6131167711303345\n",
|
||||
"iter: 2650, loss: 3.433012700254954\n",
|
||||
"iter: 2700, loss: 3.7313271602903084\n",
|
||||
"iter: 2750, loss: 3.5837062497366037\n",
|
||||
"iter: 2800, loss: 3.6265894929265214\n",
|
||||
"iter: 2850, loss: 3.5165250884616186\n",
|
||||
"iter: 2900, loss: 3.8752988719410366\n",
|
||||
"iter: 2950, loss: 3.709828086020455\n",
|
||||
"iter: 3000, loss: 3.742527751090035\n",
|
||||
"iter: 3050, loss: 3.5926183513232646\n",
|
||||
"iter: 3100, loss: 3.6629667194003157\n",
|
||||
"iter: 3150, loss: 3.7953110780715944\n",
|
||||
"iter: 3200, loss: 3.4833724756770663\n",
|
||||
"iter: 3250, loss: 3.5239689500066977\n",
|
||||
"iter: 3300, loss: 3.552185758560423\n",
|
||||
"iter: 3350, loss: 3.342997217700594\n",
|
||||
"iter: 3400, loss: 3.7131163925897512\n",
|
||||
"iter: 3450, loss: 3.2172264359110874\n",
|
||||
"iter: 3500, loss: 3.1694674255961464\n",
|
||||
"iter: 3550, loss: 3.5181667824548386\n",
|
||||
"iter: 3600, loss: 3.552696303821745\n",
|
||||
"iter: 3650, loss: 3.5465369727573703\n",
|
||||
"iter: 3700, loss: 3.3895190108844213\n",
|
||||
"iter: 3750, loss: 3.55357305569119\n",
|
||||
"iter: 3800, loss: 3.618841464133489\n",
|
||||
"iter: 3850, loss: 3.631707963504488\n",
|
||||
"iter: 3900, loss: 3.705602922939119\n",
|
||||
"iter: 3950, loss: 3.1555525365556987\n",
|
||||
"iter: 4000, loss: 3.423284879676879\n",
|
||||
"iter: 4050, loss: 3.74216214027859\n",
|
||||
"iter: 4100, loss: 3.273874522224304\n",
|
||||
"iter: 4150, loss: 3.9754231488666836\n",
|
||||
"iter: 4200, loss: 3.255707532473973\n",
|
||||
"iter: 4250, loss: 3.622867019956075\n",
|
||||
"iter: 4300, loss: 3.3847267730198216\n",
|
||||
"iter: 4350, loss: 3.6832511274095565\n",
|
||||
"iter: 4400, loss: 3.265418997968946\n",
|
||||
"iter: 4450, loss: 3.53306358509972\n",
|
||||
"iter: 4500, loss: 3.2655868359520333\n",
|
||||
"iter: 4550, loss: 3.579948601419965\n",
|
||||
"iter: 4600, loss: 3.554656519799005\n",
|
||||
"iter: 4650, loss: 3.324159849643708\n",
|
||||
"iter: 4700, loss: 3.357913894865249\n",
|
||||
"iter: 4750, loss: 3.048288846031067\n",
|
||||
"iter: 4800, loss: 3.185154194937811\n",
|
||||
"iter: 4850, loss: 2.9646709245159513\n",
|
||||
"iter: 4900, loss: 3.4766449508288546\n",
|
||||
"iter: 4950, loss: 3.1528075372302338\n",
|
||||
"iter: 5000, loss: 3.12558690051427\n",
|
||||
"iter: 5050, loss: 3.6565875165273276\n",
|
||||
"iter: 5100, loss: 3.113538140228817\n",
|
||||
"iter: 5150, loss: 3.0463946421638366\n",
|
||||
"iter: 5200, loss: 3.384180574084086\n",
|
||||
"iter: 5250, loss: 3.3104316232090913\n",
|
||||
"iter: 5300, loss: 2.9496352179807332\n",
|
||||
"iter: 5350, loss: 3.1814023027722804\n",
|
||||
"iter: 5400, loss: 2.9286732437345724\n",
|
||||
"iter: 5450, loss: 3.4691178646617464\n",
|
||||
"iter: 5500, loss: 3.373944672122834\n",
|
||||
"iter: 5550, loss: 3.213332776455653\n",
|
||||
"iter: 5600, loss: 3.3247368506931116\n",
|
||||
"iter: 5650, loss: 3.2702379176957272\n",
|
||||
"iter: 5700, loss: 3.4554740653038025\n",
|
||||
"iter: 5750, loss: 3.281306777431851\n",
|
||||
"iter: 5800, loss: 2.9936736260368706\n",
|
||||
"iter: 5850, loss: 3.277740831851959\n",
|
||||
"iter: 5900, loss: 3.120459364088754\n",
|
||||
"iter: 5950, loss: 3.387252744160001\n",
|
||||
"iter: 6000, loss: 3.238504883735898\n",
|
||||
"iter: 6050, loss: 2.738152531003195\n",
|
||||
"iter: 6100, loss: 3.231002421265556\n",
|
||||
"iter: 6150, loss: 3.0410601262819195\n",
|
||||
"iter: 6200, loss: 3.093445486522856\n",
|
||||
"iter: 6250, loss: 2.877119398207891\n",
|
||||
"iter: 6300, loss: 3.006740029849703\n",
|
||||
"iter: 6350, loss: 2.8918780979504657\n",
|
||||
"iter: 6400, loss: 3.3124666434015553\n",
|
||||
"iter: 6450, loss: 3.170363757602752\n",
|
||||
"iter: 6500, loss: 3.1445780278387527\n",
|
||||
"iter: 6550, loss: 3.0042706321610346\n",
|
||||
"iter: 6600, loss: 2.94450242013023\n",
|
||||
"iter: 6650, loss: 3.1747314814840046\n",
|
||||
"iter: 6700, loss: 3.325715871651966\n",
|
||||
"iter: 6750, loss: 3.1039765825120225\n",
|
||||
"iter: 6800, loss: 3.260562201068516\n",
|
||||
"iter: 6850, loss: 2.95558365320024\n",
|
||||
"iter: 6900, loss: 3.1284036347071327\n",
|
||||
"iter: 6950, loss: 3.161784927746607\n",
|
||||
"iter: 7000, loss: 3.083566860369275\n",
|
||||
"iter: 7050, loss: 3.1606678485643296\n",
|
||||
"iter: 7100, loss: 3.39304134529356\n",
|
||||
"iter: 7150, loss: 3.05389289476001\n",
|
||||
"iter: 7200, loss: 3.171286074725408\n",
|
||||
"iter: 7250, loss: 3.307133579034654\n",
|
||||
"iter: 7300, loss: 2.987511603022379\n",
|
||||
"iter: 7350, loss: 3.1221464098370264\n",
|
||||
"iter: 7400, loss: 2.9686622249966574\n",
|
||||
"iter: 7450, loss: 2.874706161885035\n",
|
||||
"iter: 7500, loss: 2.759323406164608\n",
|
||||
"iter: 7550, loss: 2.835318256658221\n",
|
||||
"iter: 7600, loss: 2.896953154404958\n",
|
||||
"iter: 7650, loss: 2.8871691599497717\n",
|
||||
"iter: 7700, loss: 3.049550093332927\n",
|
||||
"iter: 7750, loss: 2.9703013692507665\n",
|
||||
"iter: 7800, loss: 2.8142153175671893\n",
|
||||
"iter: 7850, loss: 2.8352768955987604\n",
|
||||
"iter: 7900, loss: 2.863677294496506\n",
|
||||
"iter: 7950, loss: 3.031682641491057\n",
|
||||
"iter: 8000, loss: 2.9286883136809814\n",
|
||||
"iter: 8050, loss: 2.9240697879488504\n",
|
||||
"iter: 8100, loss: 3.0172221147900546\n",
|
||||
"iter: 8150, loss: 2.8361169849426027\n",
|
||||
"iter: 8200, loss: 2.9860127468676803\n",
|
||||
"iter: 8250, loss: 2.9495567634294906\n",
|
||||
"iter: 8300, loss: 2.793946119104113\n",
|
||||
"iter: 8350, loss: 3.2106793221594785\n",
|
||||
"iter: 8400, loss: 2.736634517018757\n",
|
||||
"iter: 8450, loss: 2.8962079345536615\n",
|
||||
"iter: 8500, loss: 2.906407202516283\n",
|
||||
"iter: 8550, loss: 2.6900012663281148\n",
|
||||
"iter: 8600, loss: 2.8905927643056897\n",
|
||||
"iter: 8650, loss: 2.950769727600945\n",
|
||||
"iter: 8700, loss: 2.884238138978443\n",
|
||||
"iter: 8750, loss: 2.7154052526648083\n",
|
||||
"iter: 8800, loss: 2.8823739119030183\n",
|
||||
"iter: 8850, loss: 2.93061117755799\n",
|
||||
"iter: 8900, loss: 2.658344201617771\n",
|
||||
"iter: 8950, loss: 2.5747124820644887\n",
|
||||
"iter: 9000, loss: 2.8281182004307954\n",
|
||||
"iter: 9050, loss: 2.6702445936959895\n",
|
||||
"iter: 9100, loss: 2.8030708763485865\n",
|
||||
"iter: 9150, loss: 3.0742075329053966\n",
|
||||
"iter: 9200, loss: 2.7834522392787635\n",
|
||||
"iter: 9250, loss: 2.9308865650949025\n",
|
||||
"iter: 9300, loss: 2.776913931453039\n",
|
||||
"iter: 9350, loss: 2.7998796779011923\n",
|
||||
"iter: 9400, loss: 3.1615792548088795\n",
|
||||
"iter: 9450, loss: 3.2742855516539673\n",
|
||||
"iter: 9500, loss: 2.981044085154457\n",
|
||||
"iter: 9550, loss: 2.4407524968101866\n",
|
||||
"iter: 9600, loss: 2.624275121037923\n",
|
||||
"iter: 9650, loss: 2.4893303714971697\n",
|
||||
"iter: 9700, loss: 2.7211539438906183\n",
|
||||
"iter: 9750, loss: 2.8714180671828133\n",
|
||||
"iter: 9800, loss: 2.7188037380396373\n",
|
||||
"iter: 9850, loss: 2.4101966271173385\n",
|
||||
"iter: 9900, loss: 2.9492219283542926\n",
|
||||
"iter: 9950, loss: 2.547067801430112\n",
|
||||
"iter: 10000, loss: 2.8521263429191372\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"trainIters(encoder1, attn_decoder1, 10_000, print_every=50)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 21,
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"scrolled": true
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"> he is a tennis player .\n",
|
||||
"= on jest tenisistą .\n",
|
||||
"< jest tenisistą . <EOS>\n",
|
||||
"\n",
|
||||
"> i m not going to change my mind .\n",
|
||||
"= nie zamierzam zmieniać zdania .\n",
|
||||
"< nie idę do . <EOS>\n",
|
||||
"\n",
|
||||
"> i m totally confused .\n",
|
||||
"= jestem kompletnie zmieszany .\n",
|
||||
"< jestem dziś . . <EOS>\n",
|
||||
"\n",
|
||||
"> he is a pioneer in this field .\n",
|
||||
"= jest pionierem w tej dziedzinie .\n",
|
||||
"< on jest w w . . <EOS>\n",
|
||||
"\n",
|
||||
"> i m so excited .\n",
|
||||
"= jestem taki podekscytowany !\n",
|
||||
"< jestem jestem głodny . <EOS>\n",
|
||||
"\n",
|
||||
"> they are a party of six .\n",
|
||||
"= jest ich sześć osób .\n",
|
||||
"< oni nie są . . <EOS>\n",
|
||||
"\n",
|
||||
"> he is the father of two children .\n",
|
||||
"= on jest ojcem dwójki dzieci .\n",
|
||||
"< on jest na do . . <EOS>\n",
|
||||
"\n",
|
||||
"> i am leaving at four .\n",
|
||||
"= wychodzę o czwartej .\n",
|
||||
"< jestem na . <EOS>\n",
|
||||
"\n",
|
||||
"> i m not much of a writer .\n",
|
||||
"= pisarz ze mnie żaden .\n",
|
||||
"< nie jestem mnie . . <EOS>\n",
|
||||
"\n",
|
||||
"> you re disgusting !\n",
|
||||
"= jesteś obrzydliwy !\n",
|
||||
"< jesteś obrzydliwy . <EOS>\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"evaluateRandomly(encoder1, attn_decoder1)"
|
||||
]
|
||||
@ -797,7 +477,14 @@
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
"source": [
|
||||
"## ZADANIE\n",
|
||||
"\n",
|
||||
"Gonito \"WMT2017 Czech-English machine translation challenge for news \"\n",
|
||||
"\n",
|
||||
"Proszę wytrenować najpierw model german -> english, a później dotrenować na czech-> english.\n",
|
||||
"Można wziąć inicjalizować enkoder od nowa lub nie. Proszę w każdym razie użyć wytrenowanego dekodera."
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
Loading…
Reference in New Issue
Block a user