File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -322,9 +322,9 @@ def process_weights(
322
322
if nzw_size == 0 or num_neurons < min_allowed_weights :
323
323
logging .warning ("No non-zero weights returning all ones." )
324
324
final_weights = (
325
- torch .ones (( num_neurons ) ).to (num_neurons ) / num_neurons
325
+ torch .ones (num_neurons ).to (num_neurons ) / num_neurons
326
326
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
328
328
)
329
329
logging .debug (f"final_weights: { final_weights } " )
330
330
final_weights_count = (
@@ -344,9 +344,9 @@ def process_weights(
344
344
)
345
345
# ( const ): Should this be np.zeros( ( num_neurons ) ) to reset everyone to build up weight?
346
346
weights = (
347
- torch .ones (( num_neurons ) ).to (num_neurons ) * 1e-5
347
+ torch .ones (num_neurons ).to (num_neurons ) * 1e-5
348
348
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
350
350
) # creating minimum even non-zero weights
351
351
weights [non_zero_weight_idx ] += non_zero_weights
352
352
logging .debug (f"final_weights: { weights } " )
You can’t perform that action at this time.
0 commit comments