AttributeError: module ‘tensorflow’ has no attribute ‘Session’ In the latest version of tensorflow, e.g 2.2.0-rc3, session is not supported. Luckily it is now provided with backward compatibility . #sess = tf.Session(graph = graph1) sess = tf.compat.v1.Session(target=”, graph=graph1, config=None) Other attributes were also not supported e.g assign, global_variables_initializer #update = tf.assign(v, v+1) update = tf.compat.v1.assign(v, v+1) …
Author Archives: chitlesh
softmax() incompatibility
TypeError: softmax() got an unexpected keyword argument ‘axis’ The latest version of keras did not support axis as an argument to softmax . I had to downgrade keras. $ pip install keras==2.0.6
Weight quantization
Up till now, I was relentlessly pursuing the best accuracy I can get with my neural network. The size of my Core ML app is of course increasing. While going through the presentation slides of What’s New in Core ML, Part 1, Apple talked about the size of weight being a factor in the overall …
My AI insfrastructure at home
At home, I use machine learning /AI for mainly research purposes as I have the freedom to experiment new ideas or learn new networks without any external constraint and requirement. The only requirement I sort of imposed to myself is that AI infrastructure must be keep it as simple as possible. First, because I am …
What is Epoch, Batch Size and Iterations?
One Epoch is when an ENTIRE dataset is passed forward and backward through the neural network only ONCE. Since, one epoch is too big to feed at once it is divided into several smaller batches of size batch_size. Iterations is the number of batches needed to complete one epoch. For example, a dataset of 1000 samples …
Continue reading “What is Epoch, Batch Size and Iterations?”
What is input_data in TFLearn?
tflearn.layers.core.input_data (shape=None, placeholder=None, dtype=tf.float32, data_preprocessing=None, data_augmentation=None, name=’InputData’) In TFLearn, the input_data is the input layer to the neural network. It is used to specify how the input looks like, before adding any of the usual layer in the sequential model. For example, in the MNIST data set where a 784 array represents 28×28 images with …
How to install yosys on Fedora 26
Unlike my other posts in the past decade where I referred to install anything from a rpmbuild, today I just want to get the install done and move on. Prequisites for the yosys installation: $ sudo dnf install clang tcl-devel readline-devel libffi-devel mercurial iverilog Yosys build: $ git clone https://github.com/cliffordwolf/yosys.git $ cd yosys/ $ make …
Quartus 17.0 Prime install on Fedora 26
After installling Quartus on a x86_64 fedora 26, I fell upon the lib12.so.0 error. $ quartus quartus: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory The simple solution is $ sudo dnf install libpng12-devel.i686 Unfortunately I was not unable to program the bitstream on the fpga, thus …
uvm_dpi 32-bit requirements on Fedora 26
This morning I was trying to compile uvm’ s dpi plug on Fedora 26 and ended with the following error: Model Technology ModelSim – Intel FPGA Edition vlog 10.5c Compiler 2017.01 Jan 23 2017 vlog “+incdir+uvm-1.2/src” uvm-1.2/src/dpi/uvm_dpi.cc ** Warning: ** Warning: (vlog-7032) The 32-bit glibc RPM does not appear to be installed on this machine. …
Modelsim Intel-Altera 10.5c on Fedora26
This blog post is about how to run Modelsim Intel-Altera 10.5c on Fedora 26 (4.12.13-300.fc26.x86_64) after its installation. Modelsim Intel-Altera 10.5c comes with intelFPGA_pro 17.0. First install the 32-bit libraries. $ sudo dnf install glibc.i686 zlib.i686 bzip2-libs.i686 libXft.i686 libXext.i686 ncurses-compat-libs.i686 Download the freetype of el7 from here and copy the so files to modelsim’s internal directory. …