super(InteractiveSession, self).__init__(target, graph, config) TypeError: super(type, obj): obj must be an instance or subtype of type
This is error I got:
super(InteractiveSession, self).init(target, graph, config)
TypeError: super(type, obj): obj must be an instance or subtype of type
session = tf.InteractiveSession()
tf.global_variables_initializer().run()
print('Initialized')
average_loss = 0
for step in range(num_steps):
batch_data, batch_labels, batch_weights = generate_batch(
batch_size, num_skips, skip_window)
(data,labels,co-occurance weights)
batch_weights = []
batch_xij = []
for inp,lbl in zip(batch_data,batch_labels.reshape(-1)):
batch_weights.append((np.asscalar(cooc_mat[inp,lbl])/100.0)**0.75)
batch_xij.append(cooc_mat[inp,lbl])
batch_weights = np.clip(batch_weights,-100,1)
batch_xij = np.asarray(batch_xij)
feed_dict = {train_dataset : batch_data.reshape(-1), train_labels : batch_labels.reshape(-1), weights_x:batch_weights,x_ij:batch_xij}
_, l = session.run([optimizer, loss], feed_dict=feed_dict)
Comments
Post a Comment