Skip to content

Commit

Permalink
delete type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
VScoldness committed Jan 10, 2024
1 parent bdc42de commit a25334e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyxtal_ff/models/neuralnetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def mutli_thread_loss(self, model, batch):
return output

@staticmethod
def _sum_together(output: list[list[float]]) -> list[float]:
def _sum_together(output):
res = [0 for _ in range(len(output[0]))]
for cur in output:
res = [i+j for (i, j) in zip(res, cur)]
Expand Down Expand Up @@ -1051,13 +1051,15 @@ def normalize(self, data, drange, unit, norm=[0., 1.]):

def get_stress_group(self, data):
""" Get every kind of stress groups if None is defined by the user. """
print("self.stress_group is ", self.stress_group)
if self.stress_coefficient and (self.stress_group is None):
db = shelve.open(self.path+data)
sg = []
for i in range(self.no_of_structures):
if db[str(i)]['group'] not in sg:
sg.append(db[str(i)]['group'])
self.stress_group = sg
print("self.stress_group is ", self.stress_group)


def _SOFTMAX(self, data, beta=-1):
Expand Down

0 comments on commit a25334e

Please sign in to comment.