this post was submitted on 27 Oct 2023
1 points (100.0% liked)

Machine Learning

1 readers
1 users here now

Community Rules:

founded 11 months ago
MODERATORS
 

Hii,

suppose I have two .pt files and they have a common key results and I want to join the results values of the two file how do I do it??

eg:

  1. test1.pt has 4 values : 1 ,2 ,3, 4
  2. test2.pt has 3 values: 5 , 6 ,7
  3. I want a test3.pt with values : 1, 2, 3 ,4, 5 ,6 ,7

Is this possible?? how can I accomplish this ??

top 3 comments
sorted by: hot top controversial new old
[–] im_datta0@alien.top 1 points 10 months ago (1 children)

Probably load the files, iterate over parameters using model.named_parameters() and add them to another tensor while you iterate?

[–] rakk109@alien.top 1 points 10 months ago

Model.named_parameters() are used to get the weights of all the parameters they don't provide any value as results(accuracies). So I obviously can't use that

[–] slashdave@alien.top 1 points 10 months ago

Nothing prevents you from loading two models from separate files in one piece of code and to combine them (in any fashion you choose) into a third model, which you can then save into a third file.