Category : machine-learning

I have trained a masked language model using my own dataset, which contains sentences with emojis (trained on 20,000 entries). Now, when I make predictions, I want emojis to be in the output, however, most of the predicted tokens are words, so I think that the emojis are right at the bottom of the list ..

Read more

I’m learning Seaborn for Machine Learning data visualization I’m starting on sns.displot and sns.distplot I only found out that these two function did the same thing except that distplot provide us the kde if we do not turn it off, but is there any specific difference between these two. Are they the same but just ..

Read more

In Neural Networks and Deep Learning, there’s an object called network3 (which is a PY file, written for python 2.7 and theano 0.7). I modified it to run with python 3.9 and theano 1.0.3. However, when I run the following code (in google colab): import network3 from network3 import Network from network3 import ConvPoolLayer , ..

Read more

I am using the following code to to perform K-means clustering, how can I tell which color belongs to which values in "centers" array ? pixel_values = img.reshape((-1, 2)) pixel_values = np.float32(pixel_values) criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 10000, 0.1) k = 4 _, labels, (centers) = cv2.kmeans(pixel_values, k, None, criteria, 0, cv2.KMEANS_PP_CENTERS) centers = np.uint8(centers) ..

Read more

I was using mmdetection but while installing the "setup.py" file this error appears File "setup.py", line 98 sources=[os.path.join(*module.split(‘.’), p) for p in sources], SyntaxError: only named arguments may follow *expression link from where I have cloned the repo : https://github.com/open-mmlab/mmdetection.git Please let me know the solution Source: Python-3x..

Read more

I’m trying to train the model. This is the epoch loop seed_val = 17 random.seed(seed_val) np.random.seed(seed_val) torch.manual_seed(seed_val) torch.cuda.manual_seed_all(seed_val) device = torch.device(‘cuda’ if torch.cuda.is_available() else ‘cpu’) # model.to(device) training_stats = [] for epoch_i in range(0, epochs): print("") print(‘======== Epoch {:} / {:} ========’.format(epoch_i + 1, epochs)) print(‘Training…’) # Reset the total loss for this epoch. total_train_loss ..

Read more