<jupyter_start><jupyter_text><jupyter_code>import theano
import theano.tensor as T
x = T.scalar()
x
y = 3*(x**2) + 1
type(y)
y.shape
print(y)
theano.pprint(y)
theano.printing.debugprint(y)
y.eval({x: 2})
f = theano.function([x], y)

f(2)
X = T.vector()
X = T.matrix()
X = T.tensor3()
X = T.tensor4()
x = T.scalar()
y = T.log(x)
gradient = T.grad(y, x)
print(gradient)
print(gradient.eval({x: 2}))
print((2 * gradient))
import numpy as np
x = theano.shared(np.zeros((2, 3), dtype=theano.config.floatX))

x
values = x.get_value()
print(values.shape)
print(values)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19627749576988154, 'fraction_numerical': 0.018612521150592216, 'mean_word_length': 5.297872340425532, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '193645', 'license': 'MIT', 'n_tokens_mistral': 273, 'n_tokens_neox': 263, 'n_words': 56, 'path': '2_1_Introduction_Theano.ipynb', 'repo_name': 'benvictoria17/Machinelearning', 'size': '591'}