
from sklearn.neural_network import MLPClassifier

__lowerCamelCase								=					[[0.0, 0.0], [1.0, 1.0], [1.0, 0.0], [0.0, 1.0]]
__lowerCamelCase								=					[0, 1, 0, 0]


__lowerCamelCase								=					MLPClassifier(
    solver='lbfgs', alpha=1e-5, hidden_layer_sizes=(5, 2), random_state=1
)

clf.fit(X, y)


__lowerCamelCase								=					[[0.0, 0.0], [0.0, 1.0], [1.0, 1.0]]
__lowerCamelCase								=					clf.predict(test)




def 		lowerCAmelCase_     (     _SCREAMING_SNAKE_CASE  )   ->      Any:

							"""simple docstring"""






							return list(_SCREAMING_SNAKE_CASE  )


if __name__ == "__main__":
				import doctest

				doctest.testmod()






import unittest

from transformers import is_torch_available
from transformers.testing_utils import require_sentencepiece, require_tokenizers, require_torch, slow, torch_device


if is_torch_available():
				import torch

				from transformers import CamembertModel
@require_torch
@require_sentencepiece
@require_tokenizers
class    _UpperCamelCase(   unittest.TestCase				):

						@slow
						def 						a__ (					self		:			Optional[Any]			):
													_UpperCAmelCase  :			Tuple	       =		CamembertModel.from_pretrained("camembert-base"			)
													model.to(_lowerCamelCase			)

													_UpperCAmelCase  :			List[Any]	       =		torch.tensor(
													    [[5, 1_21, 11, 6_60, 16, 7_30, 2_55_43, 1_10, 83, 6]]	,						device=_lowerCamelCase	,						dtype=torch.long	,						)  # J'aime le camembert !
													with torch.no_grad():
																				_UpperCAmelCase  :			Dict	       =		model(_lowerCamelCase			)["last_hidden_state"]
													_UpperCAmelCase  :			Optional[int]	       =		torch.Size((1, 10, 7_68)			)
													self.assertEqual(output.shape	,						_lowerCamelCase			)
													# compare the actual values for a slice.
													_UpperCAmelCase  :			List[str]	       =		torch.tensor(
													    [[[-0.02_54, 0.02_35, 0.10_27], [0.06_06, -0.18_11, -0.04_18], [-0.15_61, -0.11_27, 0.26_87]]]	,						device=_lowerCamelCase	,						dtype=torch.float	,						)
													# camembert = torch.hub.load('pytorch/fairseq', 'camembert.v0')
													# camembert.eval()
													# expected_slice = roberta.model.forward(input_ids)[0][:, :3, :3].detach()

													self.assertTrue(torch.allclose(output[:, :3, :3]	,						_lowerCamelCase	,						atol=1E-4			)			)




