demo_model(random)
Criteria
Which parameter is important in a neural network ?
The criteria implemented come from this paper.
Weight Based Criteria
Random
Large Final Value
demo_model(large_final)
Squared Final Value
demo_model(squared_final)
Small Final Value
demo_model(small_final)
Large Init Value
demo_model(large_init)
Small Init Value
demo_model(small_init)
Large Init Large Final Value
80) demo_model(large_init_large_final,
Small Init Small Final Value
demo_model(small_init_small_final)
Increasing Magnitude
60) demo_model(magnitude_increase,
Movement Pruning
demo_model(movement)
Updating Versions
The following criteria use an updating value of the weights, i.e. the value from the previous iteration of training, instead of the initialization value to better capture the training dynamics.
Updating Magnitude Increase
demo_model(updating_magnitude_increase)
Updating Movement
50) demo_model(updating_movement,
mov-magnitude
demo_model(movmag)
Updating mov-magnitude
demo_model(updating_movmag)
Gradient Based Criteria
New Ideas
= Criteria(torch.abs, needs_update=True, output_f= lambda x,y: torch.abs(torch.sub(x,y)))
updating_magnitude_increase
demo_model(updating_magnitude_increase)
= Criteria(torch.abs, needs_update=True, output_f= lambda x,y: torch.sub(x,y))
updating_magnitude_increase
demo_model(updating_magnitude_increase)
= Criteria(torch.square, needs_update=True, output_f= lambda x,y: torch.abs(torch.sub(x,y)))
updating_magnitude_increase
demo_model(updating_magnitude_increase)
= Criteria(noop, needs_update=True, output_f=lambda x,y: torch.abs(torch.mul(x, torch.sub(x,y))))
updating_movmag demo_model(updating_movmag)
= Criteria(noop, needs_update=True, output_f=lambda x,y: torch.abs(torch.mul(torch.square(x), torch.sub(x,y))))
updating_movmag demo_model(updating_movmag)
= Criteria(torch.square, needs_update=True, output_f=lambda x,y: torch.abs(torch.mul(x, torch.sub(x,y))))
updating_movmag #updating_movmag = Criteria(noop, needs_update=True, output_f=lambda x,y: torch.mul(x, torch.sub(x,y)))
demo_model(updating_movmag)
= Criteria(torch.abs, needs_update=True, output_f=lambda x,y: torch.abs(torch.mul(x, torch.sub(x,y))))
updating_movmag #updating_movmag = Criteria(noop, needs_update=True, output_f=lambda x,y: torch.mul(x, torch.sub(x,y)))
30) demo_model(updating_movmag,
= Criteria(torch.abs, needs_update=True, output_f=lambda x,y: torch.mul(x, torch.sub(x,y)))
updating_movmag
80) demo_model(updating_movmag,
= Criteria(torch.square, needs_update=True, output_f=lambda x,y: torch.mul(x, torch.sub(x,y)))
updating_movmag
demo_model(updating_movmag)
= Criteria(noop, needs_update=True, output_f=lambda x,y: torch.mul(x, torch.sub(x,y)))
updating_movmag
demo_model(updating_movmag)
= Criteria(noop, needs_update=True, output_f= lambda x,y: torch.abs(torch.sub(-x,y)))
updating_movement 50) demo_model(updating_movement,
= Criteria(torch.abs, needs_update=True, output_f= lambda x,y: torch.abs(torch.sub(-x,y)))
updating_movement demo_model(updating_movement)
= Criteria(torch.abs, needs_update=True, output_f= lambda x,y: torch.abs(torch.cosh(torch.sub(x,y))))
updating_movement demo_model(updating_movement)
= Criteria(torch.square, needs_update=True, output_f= lambda x,y: torch.abs(torch.sub(x,y)))
updating_movement demo_model(updating_movement)
= Criteria(noop, needs_update=True, output_f= lambda x,y: torch.sub(x,y))
updating_movement demo_model(updating_movement)
= partial(torch.pow, exponent=4) mine
= Criteria(torch.frac)
large_final demo_model(large_final)