I want to create a model in PyTorch, where first I use ROBERTA to create the contexualized representation of the input sentence, and then I want to use it and some more inputs (which aren’t words) for a prediction task. That’s why I want to use the basic TFRobertaModel to get the contexualized embeddings, but ..

Read more

I wrote this simple program. import multiprocessing d = {"what":’1′} import time from multiprocessing import Pool def square(x): print("Adding process:", x) d[x]=x print("Inner d", d) if __name__ == "__main__": pool = Pool() pool.map(square, range(0, 5)) pool.close() print(d) Output (‘Adding process:’, 0) (‘Inner d’, {0: 0, ‘what’: ‘1’}) (‘Adding process:’, 1) (‘Inner d’, {0: 0, 1: ..

Read more

my graph couldn’t change. when I try to use y_sel and x_sel in the plot it throws error. sometimes it says value error ‘Countries’ and some time too many inputs for one value something like that. ydata = online_act_major.loc[ : , [‘socionet’, ‘info_good_serv’,’banking’,’selling’,’news’,’learn_act’] ] xdata = online_act_major.index.values # gca stands for ‘get current axis’ dropdown ..

Read more

N | T Is there a way to find the pattern above in the input below? It’s a vertical pattern that spans across several lines of text. 5′ TCAGATGTGTATAAGAGACAGTGCGTATTCTCAGTCAGTTGAAGTGNTACAGAA :: ::: :: : : : ||||| : 3′ ATTCAGCCTGCACTCGTTACCGAGGCATGACAGAGAATATGTGTAGAGGCGAGCTAAGGTACTTGAAAGGGTGTATTAGAG I tried multiple ways but I am not sure whether it is possible or not. This ..

Read more

How to generate mathematical operations using values of predefined list and also the math operations generated must equal a certain value, like: math_set = [1, 2, 5, 6] target_value = 21 >>> generate_math_operation_now(math_set, target_value) >>> ‘5*6-2*5+1’ #random 100%, (length doesn’t matter as long the value is desired) small note: i tried to use itertools.combinations but ..

Read more