Hi all,
Which is the best way to learn pure tensorflow without using any libraries. Also if there are researches or projects used that, please mentioned it.
Thank you.
Hi all,
Which is the best way to learn pure tensorflow without using any libraries. Also if there are researches or projects used that, please mentioned it.
Thank you.
Hi there,
Before I provide a good source to learn TensorFlow code-first, I want to ask why exactly the constraint of not using any libraries?
Other than that, there is a beautiful TensorFlow course that teaches in a code-first approach, meaning you learn by doing. I think this is a perfect way to be introduced to this topic.
https://dev.mrdbourke.com/tensorflow-deep-learning/
It’s written by Daniel Bourke, who is sometimes also roaming these forums
Hope this helps!
I’m also curious to understand the “without using any libraries”
Another good start is the the main documentation Tutorials | TensorFlow Core
it goes from the basics to more advanced uses
when you mean “without using any libraries” you are referring to the low level API (no Keras)? if its the case you can always build stuff using common python and constructing models with tf.Module | TensorFlow v2.16.1
for example, this is the code to implement a simple conv layer without Keras:
weights initialization:
def weights(name, shape, mean=0.0, stddev=0.02):
var = tf.Variable(tf.random_normal_initializer(mean=mean, stddev=stddev)(shape), name=name)
return var
layer:
class Conv2D(tf.Module):
def __init__(self, out_feats=8 ks=3, use_relu=False, name=None):
super(Conv2D, self).__init__(name=name)
self.use_relu = use_relu
self.out_feats = out_feats
self.ks = ks
@tf.Module.with_name_scope
def __call__(self, input):
if not hasattr(self, 'weights'):
self.weights = weights('weights', (self.ks, self.ks, input.get_shape()[-1], self.out_feats))
conv = tf.nn.conv2d(input, self.weights, strides=[1, 1, 1, 1], padding='SAME')
if self.use_relu:
output = tf.nn.relu(conv)
else:
output = conv
return output