680f4831e6c8f3102be8d99056b746b48ce34051,einops.py,TransformRecipe,reconstruct_from_shape,#TransformRecipe#,62
Before Change
if axes_lengths[axis] is not None:
// checking dimension
if isinstance(axes_lengths[axis], int) and isinstance(length, int):
print("checked dimension")
// TODO check for static graphs
assert axes_lengths[axis] == length
else:
axes_lengths[axis] = length
After Change
for axis in known_axes:
known_product *= axes_lengths[axis]
if len(unknown_axes) == 0:
if isinstance(length, int) and isinstance(known_product, int):
assert length == known_product
else:
if isinstance(length, int) and isinstance(known_product, int):
assert length % known_product == 0
unknown_axis, = unknown_axes
axes_lengths[unknown_axis] = length // known_product
init_shapes = axes_lengths
reduced_axes_lengths = [dim for i, dim in enumerate(axes_lengths) if i not in self.reduced_elementary_axes]
final_shapes = []
for grouping in self.output_composite_axes:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: arogozhnikov/einops
Commit Name: 680f4831e6c8f3102be8d99056b746b48ce34051
Time: 2018-09-27
Author: iamfullofspam@gmail.com
File Name: einops.py
Class Name: TransformRecipe
Method Name: reconstruct_from_shape
Project Name: Logan1x/Python-Scripts
Commit Name: 2ef5c047b4296a807eea8366f67d7f271f0d47de
Time: 2020-06-28
Author: 59202862+Monsieurvishal@users.noreply.github.com
File Name: bin/password-strength-checker.py
Class Name:
Method Name: pass1
Project Name: suragnair/alpha-zero-general
Commit Name: bc8b17cdd3b742352e3f9af128e9741bd6badde1
Time: 2019-11-12
Author: edward_tau@yahoo.com
File Name: othello/OthelloPlayers.py
Class Name: HumanOthelloPlayer
Method Name: play