Skip to content

Commit a288696

Browse files
committed
Formatting.
1 parent a555e5e commit a288696

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bittensor/utils/weight_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,9 @@ def process_weights(
322322
if nzw_size == 0 or num_neurons < min_allowed_weights:
323323
logging.warning("No non-zero weights returning all ones.")
324324
final_weights = (
325-
torch.ones((num_neurons)).to(num_neurons) / num_neurons
325+
torch.ones(num_neurons).to(num_neurons) / num_neurons
326326
if use_torch()
327-
else np.ones((num_neurons), dtype=np.int64) / num_neurons
327+
else np.ones(num_neurons, dtype=np.int64) / num_neurons
328328
)
329329
logging.debug(f"final_weights: {final_weights}")
330330
final_weights_count = (
@@ -344,9 +344,9 @@ def process_weights(
344344
)
345345
# ( const ): Should this be np.zeros( ( num_neurons ) ) to reset everyone to build up weight?
346346
weights = (
347-
torch.ones((num_neurons)).to(num_neurons) * 1e-5
347+
torch.ones(num_neurons).to(num_neurons) * 1e-5
348348
if use_torch()
349-
else np.ones((num_neurons), dtype=np.int64) * 1e-5
349+
else np.ones(num_neurons, dtype=np.int64) * 1e-5
350350
) # creating minimum even non-zero weights
351351
weights[non_zero_weight_idx] += non_zero_weights
352352
logging.debug(f"final_weights: {weights}")

0 commit comments

Comments
 (0)