MCPcopy Create free account
hub / github.com/pytorch/examples / poly_desc

Function poly_desc

regression/main.py:24–30  ·  view source on GitHub ↗

Creates a string description of a polynomial.

(W, b)

Source from the content-addressed store, hash-verified

22
23
24def poly_desc(W, b):
25 """Creates a string description of a polynomial."""
26 result = 'y = '
27 for i, w in enumerate(W):
28 result += '{:+.2f} x^{} '.format(w, i + 1)
29 result += '{:+.2f}'.format(b[0])
30 return result
31
32
33def get_batch(batch_size=32):

Callers 1

main.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected