Speech
Ofsted's Chief Inspector spoke at CentreForum setting out his ambitions for education, including the need to improve vocational training.
Thank you for inviting me to talk to you today.
There will be many who think your ambitions for the future of English education are too bold and too unrealistic. I am not one of them. We simply have to aim high. Unless we can compete with the best jurisdictions in the world, all our hopes for a fair, cohesive and prosperous society will come to very little.
High expectations are essential to those ambitions. As a teacher and later head in some of the toughest parts of London, I had high expectations for each and every child in every classroom.
As I look back, I am proud to say that many of them lived up to those expectations. Most of my former pupils went on to lead successful lives, even though many came from poor backgrounds with limited experience of success. I was as proud of the student from a troubled family who started his own plumbing business as I was of the former pupil who ended up as the first black president of the Oxford Union.
The youngsters in schools that I led did well because we exploited their different talents and provided them with different pathways to success. A great all-ability school ensures that those with potential can be surgeons as well as nurses, architects as well as joiners, technocrats as well as technicians.
The great comprehensive school headteacher knows that a ‘one size fits all’ model of secondary education will never deliver the range of success that their youngsters need.
Some of our international competitors understand this probably better than we do.
Their education systems are more flexible than ours and are much more geared to aligning the potential of the student with the needs of their economies. As a result, countries with excellent academic and technical routes have far lower youth unemployment than we do. Despite 6 years of economic recovery and falling unemployment, youth unemployment in the UK still stands at 12%. In Germany it is 7% and in Switzerland 3.7%.
If our neighbours understand this, why don’t we? Surely we have got to understand that rebalancing our economy means rebalancing our education system as well – a point I’ll elaborate on later.
As Chief Inspector I have high ambitions for every child and every classroom in the country. Every child – not just those who are easy to teach – and every classroom – not just those in prosperous or urban communities.
All improvement is incremental. We know that. And the targets that CentreForum has set will take time to achieve. But setting the course and being clear about the destination are essential if standards are to improve.
You are right to emphasise the importance of a good early years education and mastery of English and maths at primary. If 85% of pupils manage to achieve at least a 4b at Key Stage 2 by 2025, then your expectations for three quarters of our young people to achieve good outcomes at 16 by 2030 should be perfectly feasible.
But what of the quarter to a third of youngsters who cannot achieve those challenging targets? What is to become of them? Even when I was head at Mossbourne Academy in Hackney, which had a great academic reputation, 20% of youngsters failed to reach our targets. Most of them went to a local FE [further education] college, usually a large, impersonal and amorphous institution, and did badly.
As somebody who was motivated by moral purpose, I always felt that I was letting down a significant number of good children who deserved better. Talk to any good secondary head and they would say much the same.
Yes, our ambitions should be bold. But they should be inclusive too. Our responsibilities as educators do not end when students fail to attain our targets. On the contrary, the written off and the ‘failed’ need our help most and we should never forget it.
Our ambition has to be broad if we are to ensure a step change in educational achievement. And it has to be deep. Vaulting ambition cannot succeed if its foundations are shallow. But I’m afraid our foundations in some areas are very shallow indeed. We do not have enough good leaders. We do not have enough good governors. And struggling schools in many areas of the country are finding it extremely difficult to get the good teachers they need.
Reform requires reformers and in many places we simply lack the talented people necessary to make progress happen. We are facing real capacity issues that need to be addressed urgently if we are to maintain our current performance, let alone the accelerated improvement demanded by CentreForum.
The start of a new year, however, is a time for optimism. And even though the challenges before us are great, we have much to be optimistic about. We have a far better education system than we did when I first became a head 30 years ago.
People forget how bad things were in the miserable decades of the 1970s, ’80s and ’90s. They forget how many children were failed by political neglect, misguided ideologies, weak accountability and low expectations. They forget how local authorities failed to challenge and support headteachers. They forget how much they conceded to vested interests and how infrequently they championed the rights of children to a decent education.
Before we steel ourselves for the challenges ahead, we should remember how far we have come. Before critics disparage our schools, they should recall our recent history. Ambition has to be sustained by hope. And it’s a lot easier to hope if we remember that standards have improved, and can improve further.
Across the country as a whole, nearly a million and a half more children are in good or better schools than were 5 years ago. The proportion of newly qualified teachers with good degrees has never been higher, while the proportion of the poorest pupils going to university has increased from an eighth to a fifth in a decade.
The most dramatic turnaround, as your report notes, has been in our primary schools. Primary schools are getting the basics right. Literacy and numeracy are much improved. There has been a steady rise in performance at Key Stage 2 – the results last year are the highest on record. And although much work needs to be done, primary schools have succeeded in narrowing the gap between disadvantaged pupils and their better-off peers. So I have every confidence, on the basis of what we know about primary schools, that your targets of 85% of children achieving a level 4B in reading, writing and mathematics will, again, be entirely feasible by 2025.
Ofsted’s greater challenge to the system has helped to bring about some of these improvements. The abolition of the satisfactory judgement and its replacement with ‘requires improvement’ signalled that the inspectorate would no longer accept mediocrity. I also believe that our new proportionate inspections of good schools, the end of inspections by third-party contractors and the recruitment of thousands of serving school leaders as inspectors have helped to refine and improve Ofsted’s oversight.
But for all these improvements, we would be deluding ourselves if we thought the battle to raise standards had been won. There is still much more to do. There can be no let up on educational reform because our international competitors are improving at a faster rate than we are.
There are many challenges facing our education system but 3 are acute:
As I said earlier, the improvements in primary education have been significant and widespread. Sadly, they are not sustained in many secondary schools. Things often go badly wrong at the very start of Key Stage 3.
Poor transition, poor literacy and numeracy, a lack of monitoring and poor teaching, particularly in foundation subjects, fail to prepare children for exams at Key Stage 4. Widespread, low-level disruption adds to the problem. It means that in many secondaries almost an hour of learning is lost each day because of poor behaviour. Quite frankly the culture of too many of our secondary schools is just not good enough. Instead of fostering a climate of scholarship and deep learning, inspectors see too many secondary schools with noisy corridors, lippy children and sullen classrooms. This, perhaps, explains why the caricatures of comprehensive secondary education are still well embedded in our media and popular culture.
It is no surprise then that 45% of our youngsters fail to achieve the benchmark GCSE grades, and just under 1 in 4 succeeds at EBacc. Yes, more disadvantaged and state school pupils now go to university than ever before. But disproportionately few of them go to our top universities.
According to the Office for Fair Access, teenagers from the richest 20% of families are 6 times more likely to go to the most selective universities than youngsters from the most disadvantaged 40% of families.
The fate of the most able pupils in non-selective schools is particularly depressing. Some 60,000 youngsters who achieved the top levels at Key Stage 2 did not achieve an A or A* in English and maths 5 years later. Indeed, only a quarter achieved a B grade.
According to the Sutton Trust, 7,000 children a year who were in the top 10% nationally at age 11 were not in the top 25% at GCSE 5 years later. These youngsters are drawn disproportionately from the white working class.
One stark fact probably sums up our under-performance at secondary more than any other: the gap in attainment between free school meal students and their peers has barely shifted in a decade.
Unless we raise the performance of disadvantaged pupils in general, and the white working class in particular, we won’t achieve the targets that you’ve set out in your paper.
As I pointed out in my last Annual Report , a disproportionate amount of secondary schools that are less than good are in the North and the Midlands. One in three secondaries in these regions is not good enough. Of the 16 local authorities with the poorest performing secondary schools, 13 are in the North and the Midlands.
It is no coincidence that these regions also account for the largest proportion of schools with behaviour and leadership problems. Three quarters of secondary schools judged inadequate for behaviour and for leadership were in the North and the Midlands.
Let me give you a sense of the scale of the challenge facing us. In 2015, in some of our biggest towns and cities in the North and the Midlands, less than half of our young people achieved 5 good GCSEs.
In Liverpool it was 48%. In Manchester it was 46%, in Bradford 45%, in Blackpool 42%. And in Knowsley, a local authority area without a single good secondary school, only 37% of young people achieved 5 A* to C grades in English and maths.
CentreForum has set ambitious targets for English schools to meet at Key Stage 4. It is going to be a challenge for the average performing school’s students to reach the new minimum acceptable grade 5, assessed between the present C and B grade. How much harder will it be for children in struggling schools, disproportionately concentrated in the North and the Midlands, to reach them from such a low base?
No area of the country, however, can really claim to succeed when it comes to provision for those youngsters who do not do well at 16. Nor can we say that we are really delivering high-quality vocational education to youngsters of all abilities who would prefer to take this route.
The statistics show that those who fail to achieve the required grades in maths and English at 16 make little or no progress in FE colleges 2 years later. The 16-19 Study Programme is yet to make an impact on these success rates.
Preparation for employment remains poor and careers guidance in both schools and colleges is uniformly weak.
But my goodness, the country needs these youngsters. Fifty years ago John Newsom warned that by failing them we beggared ourselves.  We cannot continue to fail half our future. Yet in the intervening half century, what has changed?
Nine out of 10 employers, according to the British Chambers of Commerce, say school leavers are not ready for employment. Six out of 10 firms say the skills gap is getting worse. Leading industrialists like Sir James Dyson complain that they cannot find the skilled workers their businesses need to grow.
Our system is adept at guiding students into higher education. But it still struggles, despite the recent focus on apprenticeships, to inform them about alternatives to university. We simply have to improve the quality of our technical provision and present it as a valid educational path if we are to equip youngsters with the skills they need and employers want.
I can almost sense eyes glazing over when I say this. For over 50 years, I’ve heard so many people bemoan the fact that vocational education is not good enough. So at the risk of switching you off, I’m going to say it again. It is a moral imperative as well as an economic one that we do something now to change direction. We must all make sure that the ambitious programme for apprenticeships does not prove to be another false dawn. And, even more importantly, that the school system prepares youngsters for these apprenticeship places.
This does not mean diluting a strong core curriculum. There should be no trade-off between the quality of academic studies and the pursuit of specialist vocational provision and training.
So I applaud CentreForum’s bold aims for English education. There is no good reason why the vast majority of pupils shouldn’t have mastered basic maths and English at primary and a Grade 5 at GCSE.
However, we should never forget the minority who will never do so, nor the larger number who may pass but who do not wish to pursue a wholly academic path. They too deserve an education worthy of the name. The country cannot continue to fail half its future.
Yes - the challenges facing our secondary schools and colleges in particular are immense. But these challenges can be met. CentreForum has highlighted how a number of schools are bucking the trend and are succeeding. They show what is possible with great leadership and great teaching.
Yet individual success stories also show how daunting the task is. They stand out because they are so atypical. The question is, how can we scale up improvement? How can individual success be replicated across the board?
Even if we have an answer to that, there is another pressing issue. How can we ensure that we have capacity in the system to bring about essential improvements? Because without the right people to make it happen, our dreams will remain just that.
We need to improve 3 things:
For a start, we will struggle to embed reform if oversight remains confused and inconsistent. I have long argued for a middle tier to oversee school performance and intervene where necessary. So the government’s decision to introduce Regional Schools Commissioners to oversee academies is one I support. Unfortunately, their roles and how they fit with other accountability bodies isn’t always clear.
Ofsted is charged with inspecting all schools and colleges. The Education Funding Agency not only funds schools but also intervenes when decline occurs. Individual multi-academy trusts have their own oversight arrangements and then there are local authorities. The latter complain they lack any influence over academies, even though they are still responsible for ensuring all children in their area are safe and receive a suitable standard of education. It is a patchwork of accountability rather than the seamless cover we need.
At the moment, we have a confusing and ill-defined system of oversight and intervention. Problems, inevitably, are shuffled between various agencies. This isn’t fair on parents and it certainly isn’t fair on schools. A symptom of that confusion has been a more than doubling of complaints to Ofsted about schools in the last 3 years. The danger is that only those able to navigate this accountability maze will have their concerns addressed.
Governance, too, is an issue. Three years ago I argued that school governing bodies needed to be far more professional. In that time, not a lot has changed. We need governors chosen for the skills they bring to a school, not because they represent a certain faction. We need governors who will hold schools properly to account, not who are largely concerned with furthering vested interests. And if that means paying for expertise, then we should consider paying them.
As we all know, the key to school improvement is early intervention. But can we realistically expect commissioners, with their current resources, to gather the necessary intelligence on the increasing number of schools under their control? Will they be able to step in when it matters most?
Now, I am not going to argue for the return of all schools to local authority control, far from it. The rot set in in large parts of our education system because local authorities allowed too many schools to decay over many years. But it would greatly simplify matters if all schools were held to account in the same way.
I have no doubt that commissioners will grow into their roles and my regional directors will continue to work alongside them. But, I think we are going to need something more if we are to bring about the kind of improvement we have seen in London.
We need powerful political figures who feel responsible to local people for the performance of local schools. Mayors like Robin Wales and Jules Pipe in London, who see it as their personal responsibility to improve underperforming schools in east London, with impressive results.
Obviously, it is a matter for government whether the recent drive to devolve powers locally should include education. But, even without more formal powers, shouldn’t local politicians take more responsibility for education and expect more of their schools?
Improvement across such a complex system needs strong leadership that is aware of local weaknesses and isn’t afraid to confront vested interests. In such a complex system, parents need clarity about who will stand up for them and their children. In such a complex system, someone with local knowledge needs to ensure that there are good schools for all, not just for those lucky enough to live in the right postcodes.
It can be done. Improvements in London are beginning to radiate across the capital and into surrounding areas as schools and politicians set higher and higher expectations. London has become a nursery for success. I know of outstanding headteachers who have chosen to leave the capital and work further afield.
If it can happen in London, it can happen elsewhere. But it won’t happen by accident or committee. Local politicians in Manchester, Newcastle, Liverpool and Leeds now need to provide the leadership and drive regardless of the powers bequeathed by Whitehall.
The second issue we have to address is the lingering damage caused by the botched reform of our schools in the ’60s and ’70s. Let me say straightaway that I am not going to argue for selection or a return to grammar schools. But the ideologues who drove the comprehensive agenda confused equality with equity. They took it to mean that one size should fit all.
As a consequence, there was a wholesale dumbing down of standards. It meant aggressive anti-elitism. It meant glittering prizes for all, whether merited or not. It meant scorning attempts to celebrate excellence. It meant paying scant regard to literacy, numeracy and good behaviour. It meant the erosion of headteacher authority by militant unionism.
For those who can’t remember those times, look up the history of Highbury Grove, or Holland Park or Hackney Downs to see what can go badly wrong in schools more interested in ideological conformity than educational excellence. Look up the initiatives that encrusted schools like useless barnacles, such as the SMILE maths programme, which encouraged children to amble up to the filing cabinet, pick out their worksheet and learn at their own speed.
I’m pleased to say that much of that nonsense has gone. There is now a growing awareness of the needs of different pupils. However, as I said at the beginning, the one-size-fits-all approach still lets down far too many, particularly at both ends of the ability spectrum. The most able are not being stretched. The options for those who struggle are limited. And too few children have access to a curriculum that prepares them for the workplace.
There is another, unremarked disadvantage to many comprehensive schools. They expect teachers to do too many things. Some teachers are good at teaching able students; others are better with youngsters with special educational needs. Teachers, like everyone else, are rarely good at everything. Yet many comprehensives treat them as if they are. In smaller secondaries, with limited numbers of staff, they have no choice but to do this.
Teachers may be required to teach a high-flying sixth form group in one lesson and a low-ability Year 7 group in the next. On top of this, they are expected to be pastoral tutors, behaviour experts, playground patrollers and outreach workers. It’s no wonder they become exhausted. It isn’t good for them, the students or the school.
We have a real opportunity to put this right. The raising of the participation age to 18, the increased freedoms offered to school leaders, the incentives for schools to collaborate within academy trusts provide us with a once-in-a-generation opportunity to create a smarter comprehensive system, without the need for more legislation or further structural change.
Let me explain what I mean. If I were running a group of schools, I would include both primaries and secondaries. I would make sure the primary schools were either working closely with local nurseries or taking children from the age of 2 into on-site early years provision. I would work with local health visitors to make sure disadvantaged 2 year olds were taking available places.
I would make sure the secondary schools learnt from what is working well at primary. I would make sure the different phases worked together to understand and track pupil progress. And I would appoint a heavy-hitting senior leader to track free school meal pupils from one phase to the next.
I would include in my federation a 14-19 university technical college that would admit youngsters across the ability range to focus on apprenticeships at levels 4, 3 and 2. It would not be a dumping ground for the disaffected and cater just for the lower-ability youngsters.
Careers advice across the federation would be a priority, with a real focus on Year 9 to ensure that each student, at the end of Key Stage 3, had a clear sense of the different pathways in front of them.
In my ideal federation, English, maths and science teachers would be contracted to work in the partnership and would be obliged to move across the different schools in the consortium. I would encourage extensive business and school links and introduce salary incentives to attract the best leaders to work in the more complex and challenging institutions.
Working in this joined-up way across phases and school types would have 3 powerful effects. First, youngsters would be able to transfer across institutions in the cluster and access high-level academic and technical study.
Second, teachers would have better opportunities for increased specialisation and professional development.
Third, if done transparently and effectively, such federations would allow improvements to cascade through the system because they would be implemented across the organisation and not left to individual schools.
Let me be clear – what I would want to offer is not selection at 14 but maximum opportunity at 14. Above all, I would want all routes through the federation to have equal prestige in the eyes of pupils, teachers and parents.
As I said earlier, creating a federation like that would not require legislation or massive structural change. But it would require leadership, imagination and courage. Leadership is the third aspect of the system that I believe is crucial for wide-ranging school improvement. So we have to ask ourselves – do we have enough people with the right skills? And if we don’t – what are we going to do about it?
This isn’t just a question of raw numbers. It is also about the need to identify talented individuals and incentivize them to move to the schools that need them most. As we move to a much more autonomous system, with so much depending on appointing people who know how to use the freedoms given to them, it is vital that we do more to nurture leadership.
All our evidence shows that it is good leadership that makes the biggest difference to school standards. Yet, many areas of the country, especially those with a disproportionate amount of poorly performing schools, simply do not have access to the calibre of leadership required. What’s worse, there is no reliable regional data to highlight what the local situation really is.
Our inspections of the weakest academy chains show that they have the same problems as weak local authorities – poor governance, confusing lines of responsibility, insufficient monitoring and inadequate intervention.
More and more responsibility now rests with chief executives of academy trusts. Yet how many programmes are there to train them in best practice? How are we making sure we identify potential leaders at an early stage of their careers? How are we incentivising them? What programmes are in place to support them? Far too few, I fear.
No organisation in the private sector would have such a haphazard approach to leadership training. Indeed, it’s hard to believe any other service in the public sector has such a laissez-faire attitude to career development. Can you imagine a trainee medic not being aware of the ladder they have to climb if they wish to progress and the training necessary for it? But that is the state of affairs confronting our young teachers.
You highlight in your paper a number of schools that are already achieving your targets. I know many of the headteachers of these schools well. The reason they are good is because they learnt their craft working with successful heads elsewhere. This model needs to be developed nationally. Leaving it to the market will not do. We can’t leave it, for example, to a mediocre academy chain with a paucity of good leaders to model excellent practice from which others can learn. It needs a national programme, bought into by everyone and which harnesses the support of the best heads in the land.
There are, of course, admirable leadership programmes set up by charities such as Future Leaders. But they are too small and piecemeal to address the entire problem. If we are to meet the targets you have set for 2030, we have to expand the best practice you have identified in a few schools across the whole country. If we are to improve our secondary schools we must beef up our leadership programmes. That requires joined-up thinking. It requires a far more strategic approach to leadership training.
I hope it is clear that I am not offering a counsel of despair but a call to arms. I share your ambitions for a step change in the quality of English education. But this will only happen if we address the confusion around school accountability, if we encourage schools of all types to work together in tight partnerships and federations. Most of all, we must stop paying lip service to improving vocational education and get on and do it.
It means we need national politicians to step up to the plate and we need local politicians to take more responsibility for education standards in their area. It means we need joined-up accountability and school partnerships that cater for the needs of all pupils. And it means identifying and developing the next generation of school leaders so that they can create the conditions in which teachers can thrive.
We are right to be ambitious. The conditions are there. We need to act now and we need to act together, because history will not forgive us if we let this moment pass.
Thank you.


Direct Debit Guarantee
The Guarantee is offered by all banks and building societies that accept instructions to pay Direct Debits.
If there are any changes to the amount, date or frequency of your Direct Debit GOV.UK Pay will notify you (normally 3 working days) in advance of your account being debited or as otherwise agreed. If you request GOV.UK Pay to collect a payment, confirmation of the amount and date will be given to you at the time of the request.
If an error is made in the payment of your Direct Debit, by GOV.UK Pay or your bank or building society, you are entitled to a full and immediate refund of the amount paid from your bank or building society.
If you receive a refund you are not entitled to, you must pay it back when GOV.UK Pay asks you to.
You can cancel a Direct Debit at any time by simply contacting your bank or building society. Written confirmation may be required. Please also notify GOV.UK Pay.


--- title: Assessing a Variational Autoencoder on MNIST using Pytorch author: Mauro Camara Escudero date: '2020-10-05' slug: assessing-a-variational-autoencoder-on-mnist-using-pytorch categories: - vae - pytorch - mnist tags: - vae - pytorch - mnist subtitle: 'Visualize Latent Space and Generate Data with a VAE' summary: 'Learn how to visualize the latent space and generate data using a VAE in Pytorch.' authors: [] lastmod: '2020-10-05T14:34:07+01:00' featured: no image: caption: '' focal_point: '' preview_only: no projects: [] bibliography: biblio_vaepytorch.bib nocite: | @kingma, @bergamin, @colab ---
In the previous post we learned how one can write a concise Variational Autoencoder in Pytorch. While that version is very helpful for didactic purposes, it doesn’t allow us to use the decoder independently at test time. In what follows, you’ll learn how one can split the VAE into an encoder and decoder to perform various tasks such as: testing, data generation and visualization of the latent space (when it is 2D).
First, let’s see how the reconstructed images compare with the original ones.
Now it’s time to see what our reconstructions look like. Notice from the code block above that the last testing batch of images and their reconstructions are saved in the test_images
and reconstructions
variables. These have shape [100, 1, 28, 28]
and [100, 784]
respectively. What follows may look a bit messy but we are essentially doing the following operations for both sets of images:
.cpu()
. This is needed because we cannot transform a tensor to numpy when the tensor is saved on GPU. Therefore we first move it to CPU and then transform it to numpy.0
and 1
. This means that values above 1
are set to 1
. Values below 0
are set to 0
and values in between are kept the same. This shouldn’t be necessary due to the sigmoid function, but we still do it for good practice.50
images.plt.imshow()
.# Display original images
with torch.no_grad():
print("Original Images")
test_images = test_images.cpu()
test_images = test_images.clamp(0, 1)
test_images = test_images[:50]
test_images = make_grid(test_images, 10, 5)
test_images = test_images.numpy()
test_images = np.transpose(test_images, (1, 2, 0))
plt.imshow(test_images)
plt.show()
# Display reconstructed images
with torch.no_grad():
print("Reconstructions")
reconstructions = reconstructions.view(reconstructions.size(0), 1, 28, 28)
reconstructions = reconstructions.cpu()
reconstructions = reconstructions.clamp(0, 1)
reconstructions = reconstructions[:50]
plt.imshow(np.transpose(make_grid(reconstructions, 10, 5).numpy(), (1, 2, 0)))
plt.show()
We can now assess its performance on the test set. There are a few key points to notice, which are discussed also here:
vae.eval()
will tell every layer of the VAE that we are in evaluation mode. In general, this means that dropout and batch normalization layers will work in evaluation mode. In this particular example, vae.eval()
will make sure that we are not sampling from the latent space, but we are simply using mu
.torch.no_grad()
tells VAE that it doesn’t need to keep track of gradients, which speeds up evaluation.# Set VAE to evaluation mode (deactivates potential dropout layers)
# So that we use the latent mean and we don't sample from the latent space
vae.eval()
# Keep track of test loss (notice, we have no epochs)
test_loss, number_of_batches = 0.0, 0
for test_images, _ in testloader:
# Do not track gradients
with torch.no_grad():
# Send images to the GPU/CPU
test_images = test_images.to(device)
# Feed images through the VAE to obtain their reconstruction & compute loss
reconstructions, latent_mu, latent_logvar = vae(test_images)
loss = vae_loss(test_images, reconstructions, latent_mu, latent_logvar)
# Cumulative loss & Number of batches
test_loss += loss.item()
number_of_batches += 1
# Now divide by number of batches to get average loss per batch
test_loss /= number_of_batches
print('average reconstruction error: %f' % (test_loss))
Depending on how many epochs we trained for, we should find a similar loss as to the training set, showing that the network has learned.
average reconstruction error: 15142.687080
With our minimalist version of the Variational Autoencoder, we cannot sample an image or visualize what the latent space looks like. To sample an image we would need to sample from the latent space and then feed this into the “decoder” part of the VAE. To visualize what the latent space looks like we would need to create a grid in the latent space and then feed each latent vector into the decoder to see what the images at each grid point look like. Unfortunately we cannot easily split our network as it currently is. This is why most implementations of the VAE that you will likely find online will separate the encoder and the decoder either as two different methods of the VAE or even as two different classes, each inheriting from nn.Module
. For instance, this version of the VAE would allow you to sample images and visualize the latent space:
class VAE(nn.Module):
def __init__(self):
"""Variational Auto-Encoder Class"""
super(VAE, self).__init__()
# Encoding Layers
self.e_input2hidden = nn.Linear(in_features=784, out_features=e_hidden)
self.e_hidden2mean = nn.Linear(in_features=e_hidden, out_features=latent_dim)
self.e_hidden2logvar = nn.Linear(in_features=e_hidden, out_features=latent_dim)
# Decoding Layers
self.d_latent2hidden = nn.Linear(in_features=latent_dim, out_features=d_hidden)
self.d_hidden2image = nn.Linear(in_features=d_hidden, out_features=784)
def encoder(self, x):
# Shape Flatten image to [batch_size, input_features]
x = x.view(-1, 784)
# Feed x into Encoder to obtain mean and logvar
x = F.relu(self.e_input2hidden(x))
return self.e_hidden2mean(x), self.e_hidden2logvar(x)
def decoder(self, z):
return torch.sigmoid(self.d_hidden2image(torch.relu(self.d_latent2hidden(z))))
def forward(self, x):
# Encoder image to latent representation mean & std
mu, logvar = self.encoder(x)
# Sample z from latent space using mu and logvar
if self.training:
z = torch.randn_like(mu).mul(torch.exp(0.5*logvar)).add_(mu)
else:
z = mu
# Feed z into Decoder to obtain reconstructed image. Use Sigmoid as output activation (=probabilities)
x_recon = self.decoder(z)
return x_recon, mu, logvar
To sample images from the generative model we can do something like this. Notice how we set the VAE in evaluation mode and we make sure that Pytorch doesn’t keep track of gradients. All we do is sampling an array with shape [50, latent_dim]
of standard normal variates, making sure that this tensor is saved to GPU. Then, we feed it through the decoder, obtaining a reconstruction, we reshape it the correct image shape. The rest, is just the usual trick to print images from Pytorch GPU with matplotlib.
vae.eval()
with torch.no_grad():
# Sample from standard normal distribution
z = torch.randn(50, latent_dim, device=device)
# Reconstruct images from sampled latent vectors
recon_images = vae.decoder(z)
recon_images = recon_images.view(recon_images.size(0), 1, 28, 28)
recon_images = recon_images.cpu()
recon_images = recon_images.clamp(0, 1)
# Plot Generated Images
plt.imshow(np.transpose(make_grid(recon_images, 10, 5).numpy(), (1, 2, 0)))
The result should look something like this, depending on the number of epochs:
Finally, we can also visualize the latent space. Notice that since we are using simple linear layers and very few epochs, this will look very messy. For better performance we would need to use convolutional layers in the encoder & decoder.
with torch.no_grad():
# Create empty (x, y) grid
latent_x = np.linspace(-1.5, 1.5, 20)
latent_y = np.linspace(-1.5, 1.5, 20)
latents = torch.FloatTensor(len(latent_x), len(latent_y), 2)
# Fill up the grid
for i, lx in enumerate(latent_x):
for j, ly in enumerate(latent_y):
latents[j, i, 0] = lx
latents[j, i, 1] = ly
# Flatten the grid
latents = latents.view(-1, 2)
# Send to GPU
latents = latents.to(device)
# Find their representation
reconstructions = vae.decoder(latents).view(-1, 1, 28, 28)
reconstructions = reconstructions.cpu()
# Finally, plot
fig, ax = plt.subplots(figsize=(10, 10))
plt.imshow(np.transpose(make_grid(reconstructions.data[:400], 20, 5).clamp(0, 1).numpy(), (1, 2, 0)))
Basically we are generating a grid of values in the latent space. Then we are decoding the grid into images, reshaping it and plotting it. The result, looks like this:
In order to write the code here I made use of a few resources. Firstly, Kingma is a great example of a minimalist variational autoencoder. In addition, this implementation by Federico Bergamin was extremely helpful in clarifying what does what. Last but not least, this Google Colab notebook helped me work out how to display the latent space and how to generate images from the VAE.
You can find the code used here in this Google Colab notebook.
Durk Kingma. 2020. “Variational Autoencoder in Pytorch.” https://github.com/dpkingma/examples/blob/master/vae/main.py.
Federico Bergamin. 2020. “Variational-Autoencoders.” https://github.com/federicobergamin/Variational-Autoencoders/blob/master/VAE.py.
Paul Guerrero, Nils Thuerey. 2020. “Smart Geometry Ucl - Variational Autoencoder Pytorch.” https://colab.research.google.com/github/smartgeometry-ucl/dl4g/blob/master/variational_autoencoder.ipynb#scrollTo=TglLFCT1N7iF.


|
Loops |
|
| Loop are a powerful technique that give the programmer the ability to have the program repeat code. Repeating code saves time for the programmer, save space in the program, and makes programs easier to read (more compact code). There are three types of loops that we will learn about. Each loop has a particular function with certain advantages. | |
| 1. For Next loop
The For-Next loop is designed to run a set number of times. Useful when you want a loop to run exactly a certain number of times. Enter and run the following PRINT "Enter three
numbers" |
Note that the loop allows you
to enter three numbers but doesn't do anything with the numbers.
Remember to indent your code within a loop (easier to read). As well, put a line of white space before and after the loop. |
| 2. For Next loop
Let's change the loop in number 1 to add the numbers and prompt the user for each number (red code). For x = 1 to 3 |
Now the program will ask for each number. The line Sum = Sum + Num is how we add the numbers. As the loop runs each time, Sum will add to itself the new Num entered. We are still missing part of the program? |
| 3. For Next Loop
Are program in number 2 will add the numbers entered but does not display the result. Add the following line at the bottom of the program. Print "The sum is " ; Sum |
Have your instructor check off your program |
| 4. Using For Next to
draw graphics
We can use the For Next to draw using QBasic graphics mode (Screen 12). Enter the following to draw rectangles screen 12 For x = 0 to 30 STEP 10 |
* The code will only
draw one rectangle and then the top three lines for the inner
rectangles.
* The loop is counting up by 10's starting at 0 and going to 30. That will give us a total of four rectangles. In effect, the loop adds/subtracts depending how you set up each column/row number. * You have to use the x to add/subtract from the column/row numbers to get the loop to draw the lines properly.
|
| 5. Do-Loop Until
This loop will run at least once and will stop when the condition is met. Enter the following at run. Print "Guess a number 1-10" Do Print "Correct!" |
The condition to quit this
loop is Guess = 2. You can set up any condition you want.
Remember, the loop runs UNTIL the condition is True, then the loop stops
and the program continues.
Change the program so that the correct number is any number greater than 6. Have your instructor check off your program |
| 6. While - Wend loop
The While loop may not run at all depending on the initial condition. Enter and run. Print "Enter your favourite
colour"; While Colour$ <>
"red" Print "That is the correct colour!" |
Note that the condition is at
the beginning of the loop. If the
user enters red at the start, the loop will never run. The loop
will only run if the condition is True.
Have your instructor check off your program |
| 7. Print the Loops sheet off >>>>> | Working with Loops Sheet |
| 8. When your instructor has checked off your Working with Loops sheet, print the hand in assignment assignment >>>>>> | Loop Assignment - Sales Program |


3.6.3. Building SIMP From Source¶
<IP_ADDRESS>. Getting Started¶
Please have your environment prepared as specified by Environment Preparation before continuing.
Download the CentOS/RedHat installation media:
- SIMP_6.X: * EL 7: CentOS-7-x86_64-DVD-1611.iso * EL 6: DVD1 and DVD2 of the CentOS 6.8 release. For example, CentOS-6.8-x86_64-bin-DVD1.iso
- SIMP_5.X: CentOS-7-x86_64-DVD-1611.iso
- SIMP_4.X: DVD1 and DVD2 of the CentOS 6.8 release. For example, CentOS-6.8-x86_64-bin-DVD1.iso
<IP_ADDRESS>. Generating The ISO!¶
Change into the simp-core
directory.
$ cd simp-core
Check out your desired branch of SIMP:
- To check out a stable SIMP release, check out a tag (Recommended):
$ git checkout tags/6.0.0-0
- To check out an unstable SIMP release, check out the latest
master
:
$ git checkout master
Run bundle
to make sure that all of the build tools and dependencies are installed and up to date:
$ bundle install
Make sure all of the source materials that were downloaded above are in your current working directory.
Run the build:auto
rake task to create a bootable ISO using the following template:
$ bundle exec rake build:auto[<Directory containing install media>,<SIMP version>]
For example:
$ # for SIMP 6
$ bundle exec rake build:auto[/path/to/ISOs,6.X]
$ # for SIMP 5 and CentOS 7
$ bundle exec rake build:auto[/path/to/ISOs,5.1.X]
$ # for SIMP 4 and CentOS 6
$ bundle exec rake build:auto[/path/to/ISOs,4.2.X]
Once the process completes, you should have a bootable SIMP ISO ready for installation!
<IP_ADDRESS>. After You Build¶
If you’ve built from source, you will probably have noticed that a development GPG key has been generated for this build.
This key is only valid for one week from generation and has been specifically generated for your ISO build.
Doing this allows you to have a validly signed set of RPMs while reducing the risk that you will have invalid RPMs distributed around your infrastructure.
Note
If you need to build and sign your RPMs with your own key, you can certainly
do so using the rpm --resign
command.
The new development key will be placed at the root of your ISO and will be
called RPM-GPG-KEY-SIMP_dev
. This key can be added to your clients, or
served via a web server, if you need to install from a centralized yum
repository.
Please see the Red Hat Guide to Configuring YUM and YUM Repositories for additional information.


DH_INSTALLDEB(1) Debhelper DH_INSTALLDEB(1) NAME dh_installdeb - install files into the DEBIAN directory SYNOPSIS dh_installdeb [debhelperÂ options] DESCRIPTION dh_installdeb is a debhelper program that is responsible for installing files into the DEBIAN directories in package build directories with the correct permissions. FILES package.postinst package.preinst package.postrm package.prerm These maintainer scripts are installed into the DEBIAN directory. Inside the scripts, the token #DEBHELPER# is replaced with shell script snippets generated by other debhelper commands. package.triggers package.shlibs These control files are installed into the DEBIAN directory. package.conffiles This control file will be installed into the DEBIAN directory. In v3 compatibility mode and higher, all files in the etc/ directory in a package will automatically be flagged as conffiles by this program, so there is no need to list them manually here. package.maintscript Lines in this file correspond to dpkg-maintscript-helper(1) commands and parameters. Any shell metacharacters will be escaped, so arbitrary shell code cannot be inserted here. For example, a line such as "mv_conffile /etc/oldconffile /etc/newconffile" will insert maintainer script snippets into all maintainer scripts sufficient to move that conffile. A versioned Pre-Dependency on dpkg is needed to use dpkg-maintscript-helper(1). An appropriate Pre-Dependency is set in ${misc:Pre-Depends} ; you should make sure to put that token into an appropriate place in your debian/control file. SEE ALSO debhelper(7) This program is a part of debhelper. AUTHOR Joey Hess<EMAIL_ADDRESS>9.20120909 2011-09-12 DH_INSTALLDEB(1)


Ocala events
-
peers and hilton henley on thames
2 - Legacy.com
Results 26 - 50 of 997 . Family-Placed Death Notice BARNARD, Thomas THOMAS JOSEPH BARNARD Thomas Joseph Barnard, age 57, of Kennesaw died June .
http://www.legacy.com/obituaries/atlanta/fh-obituary-search.aspx?page=2&fhid=5429&entriesperpage=25Topics on Page 2 - Genealogy Trails
Mr. Hawley was dead and the older sons had gone west. Owing to his failing . Among these battles were Vicksburg, Dallas, Kennesaw Mountain, Jonesville, Fayetteville and Bentonville. . Company : Thomas Barnard who died May 4, 1865.
http://genealogytrails.com/ill/kane/hampshirehistory2.html
panasonic 7 portable dvd player Upcoming events in Ocala
- Sponsored event
the room store home page
Apr 6 - Downtown Disney
royal omni new orleans criminal defendant punches lawyer cnn video
teacher's safety in the work place Hottest Tickets
-
Apr 11how to teach on online course
Amway Center -
Apr 28kyle gustafson minnesota attorney
Amway Center -
Jun 25lieutenant robert d weekes jr
Bob Carr Performing Arts Center -
Mar 30newcastle amsterdam cheap flights
Amway Center -
Aug 27no spit no quit
Amway Center -
Jun 21vik construction eugene oregon
Amway Center -
Sep 13one moore productions voice over talant
Francis Field -
Mar 17vodo doll possed movie
St Augustine Amphitheatre -
Oct 8botas para moto cross
Amway Center -
May 4president that served shortest time
Bob Carr Performing Arts Center
Ocala's best venues
-
Marion COUNTY GA Civil War Roster Co H 46th Regt File ...
Left leg permanently disabled June 27 1864 at Kennesaw Mtn Ga. . Died Nov 2 1862 at Charleston, S.C. Bell, Thomas J.-Private Mar 1 1862. . Surrendered Apr 26 1865 Greensboro N.C. (Born 1823 in Barnard N.C.) He filed for pension in .
http://files.usgwarchives.net/ga/marion/military/civilwar/rosters/marh46.txt -
10th Mississippi Infantry
A. Wounded in the Battle of Kennesaw Mt., GA. . Barnard, E. A., Sgt. Sgt. . Baker, Thomas M. Pvt. Pvt. Died 6/29/1900, buried Metairie Cemetery, Metairie, LA .
http://www.rootsweb.ancestry.com/~mscivilw/10thms.htm -
TDGH - October 9
1868 Georgia politician and Confederate general Howell Cobb died while on a visit to New York City. . [Contributed by Dr. Tom Scott, Kennesaw State University] . innocent Indians, as evidenced by this letter from Timothy Barnard to Gov.
http://georgiainfo.galileo.usg.edu/tdgh-oct/oct09.htm2008 ncaa football rosters div 1
98 people's favorite
-
Sherpa Guides | Georgia | Civil War | Atlanta Intro
The Kennesaw Mountain National Battlefield Park, opened in 1935 and covering 2,884 acres, . where you can actually see trenches from the battle and learn the life-and-death importance of high ground. . of Confederate heroes Robert E. Lee , Thomas J. "Stonewall" Jackson, and Jefferson Davis. . 2, George N. Barnard, .
http://www.sherpaguides.com/georgia/civil_war/atlanta/ -
Trading Cards - Master List - National Park Service
The Fighting Parson. Isaac Mason Born a Slave; Died a . General George H. Thomas. Savior of the . John G. Barnard . Kennesaw Mountain National Battle- .
http://www.nps.gov/guis/forkids/upload/All-Trading-Cards-Master-List-6-8-12.pdf


login
register
Home
All Products
My Products
Chatroom
On-sale Orders
Ordered Orders
Completed Orders
+ Add


This class represents a Click-to-Call Call.
More...
|
| override void | InitFromDictionary (Dictionary< string, object > dico) |
| | This method initializes object properties from the parameter dictionary. More...
|
| |
|
| CallStatus | AStatus [get, set] |
| | Party A call status. More...
|
| |
| List< Target > | ATargets [get, set] |
| | Targets called first ("A"). More...
|
| |
| App.App | App [get, set] |
| | Voice App. More...
|
| |
| CallStatus | BStatus [get, set] |
| | Party B call status. More...
|
| |
| List< Target > | BTargets [get, set] |
| | Targets called second ("B"). More...
|
| |
| string | CdrField [get, set] |
| | Custom CDR field. More...
|
| |
| string | Cli [get, set] |
| | CLI presented to party A. Party B will see the party A target number that answered the call. More...
|
| |
| DateTime | DateCreation [get, set] |
| | Date and time of creation. More...
|
| |
| DateTime | DateScheduled [get, set] |
| | Date and time scheduled. More...
|
| |
| DateTime | DateStarted [get, set] |
| | Date and time started. More...
|
| |
| DateTime | DateUpdate [get, set] |
| | Date and time of last update. More...
|
| |
| string | Hash [get, set] |
| | Call unique ID. More...
|
| |
This class represents a Click-to-Call Call.
| override void ThecallrApi.Objects.ClickToCall.Call.InitFromDictionary |
( |
Dictionary< string, object > |
dico | ) |
|
|
virtual |
| App.App ThecallrApi.Objects.ClickToCall.Call.App |
|
getset |
| CallStatus ThecallrApi.Objects.ClickToCall.Call.AStatus |
|
getset |
| List<Target> ThecallrApi.Objects.ClickToCall.Call.ATargets |
|
getset |
Targets called first ("A").
| CallStatus ThecallrApi.Objects.ClickToCall.Call.BStatus |
|
getset |
| List<Target> ThecallrApi.Objects.ClickToCall.Call.BTargets |
|
getset |
Targets called second ("B").
| string ThecallrApi.Objects.ClickToCall.Call.CdrField |
|
getset |
| string ThecallrApi.Objects.ClickToCall.Call.Cli |
|
getset |
CLI presented to party A. Party B will see the party A target number that answered the call.
| DateTime ThecallrApi.Objects.ClickToCall.Call.DateCreation |
|
getset |
Date and time of creation.
| DateTime ThecallrApi.Objects.ClickToCall.Call.DateScheduled |
|
getset |
| DateTime ThecallrApi.Objects.ClickToCall.Call.DateStarted |
|
getset |
| DateTime ThecallrApi.Objects.ClickToCall.Call.DateUpdate |
|
getset |
Date and time of last update.
| string ThecallrApi.Objects.ClickToCall.Call.Hash |
|
getset |
The documentation for this class was generated from the following file:
- Objects/ClickToCall/Call.cs


about the artist
Claire Gaulin-Brown was raised in a small cabin tucked away in Vancouver Island’s rustic Cowichan Valley. This naturally beautiful setting leant to an upbringing that gave Claire the initial push into an artistic career based on a deep, intuitive understanding of the way humans interact with their environment.
Through relentless education and outdoor exploration, Claire has learned the many faces of the interaction between our planet and its inhabitants. In her artwork, Claire demonstrates these many faces as beautiful, destructive, hopeful, and helpless. Her work is reminiscent of a children’s fairytale illustration, with almost macabre undertones in order to bring these faces of conflict and connections to life.


--- title: Another disingenuous piece of Stonebraker propoganda layout: post ---
Since we had to pick one system to start, we picked Cassandra. Cassandra is roughly the BigTable data model with the Dynamo consistency scheme.
Does he honestly think people choosing Cassandra will pick Volt over that based on this shit-ass article?  That man needs to learn the meaning of "addressable market".


Bale Says He Gets More Enjoyment From Wales
by SW EditorGareth Bale has risked fuelling the criticism of his commitment to Real Madrid by admitting on Friday he is more excited playing for Wales than for the Spanish giants.
Bale has not featured for Real since scoring in his country’s 1-1 draw against Croatia on October 13 and a calf injury has prevented him from even training with his club’s first-team squad.
So his decision to join up with Wales for their final Euro 2020 qualifiers against Azerbaijan in Baku on Saturday and Hungary on Tuesday has drawn negative comments in the Spanish press.
“I definitely have more excitement playing for Wales,” Bale said at a press conference in Baku.
“I’ve been with most of the older players since we were in the Under-17s.  It’s normal.
“With Wales, I’m speaking my own language and feel more comfortable. But it doesn’t change what I do on the pitch. I always give 100 percent on the pitch wherever I am, that’s what I always strive to do.”
Former Real players and the media regularly accuse Bale of putting his love of golf before the club.
“I find it hilarious to be honest, especially some of the pictures and stuff my friends send me,” Bale said.
“On one it said triple bogey – and I’ve never had a triple bogey! At least give me an albatross! It’s funny.
“Some of the things I have seen, people don’t understand and don’t know what they’re on about. So I just find it quite funny.”
To have a chance of qualifying for their second successive European Championship, Wales probably need to win both games.
Bale said he wasn’t sure he would play the whole of both matches but defended his return to action in time for the Wales matches.
“I’ve done as much as I can in terms of trying to get back as quick as I can.
“If there had been a Real Madrid game this week, I would’ve been fit and training to play. Maybe to them it doesn’t look great, but it’s just a kind of coincidence that the national team comes around this week.”


User Guide
The following modules have userguide pages. Please keep in mind that not all of them are updated to Koseven, but everything should work as described. If you face issues with an example shown in this documentation feel free to let us know.
Koseven - Documentation for Koseven core.
Auth - User authentication and authorization.
Cache - Common interface for caching engines.
Codebench - Code benchmarking tool.
Database - Database agnostic querying and result management.
Image - Image manipulation.
Minion - Minion is a simple command line task runner
ORM - Official ORM module, a modeling library for object relational mapping.
Unittest - Unit testing module
Userguide - Documentation viewer and api generation.


| DOSE: |
1 cig. |
smoked |
Cannabis |
(plant material) |
This actually just happened tonight, when I was smoking a nice fat joint at 6:00 pm.  Right after I smoked that joint, I decided to go on the computer and listen to music I felt a little numbness in my throat. 20 minutes after that I could feel my heart pounding. I was also experiencing my legs and arms constantly shaking. Almost 30 minutes went by, and I was still experiencing these problems. I was really confused and didnt know where to go so I decided to go back in the computer room. I started listening to music and I actually starting rapping and it seemed like once I started to talk and speaking out loud my heart started to return to its regular heart rate on weed. Once I did this for about 10 mins an amazing high came in.
I started seeing double of things. As I moved my head slowly back and forth it would feel like an amazing fluid circulating my head and once I took a deep breathe I could fell a warm slow feeling going in my bloodstream and its like every time I would breathe in oxygen and exhale I would also feel it going all over my body.
I'm still high right now but it was really messed up. I am taking a acne pill right now but I blazed that a few months ago and up till the incident that happened today. My heart now feels normal. Of course I'm going to blaze again, but I think I'm goin to take a break n not blaze that much.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


browse
Rename File
Manage File
Result
Delete Character
Replace Character
Insert Character
Delete Duplicated File
APPLY


I have the emonTX version 2.5 shield for arduinos. My plan is to monitor the current draw for four different items in an HVAC system. I have an UNO, an Adafruit LCD shield with buttons, and a LIPO battery shield. I can get the UNO, LIPO shield, and the LCD shield to play nice with each other. The world falls apart when I add the emonTX shield to the stack. The LCD no longer displays and the buttons don't respond. I removed the LCD from the stack and ran jumpers from A4, A5, 5V, and GND on the emonTX shield to the LCD and still didn't get anything on the LCD. I removed the emonTX shield from the stack and jumpered A4, A5, 5V, and GND from the LIPO shield to the LCD and it worked fine.
The LIPO shield uses I2C to report battery status and that is what I am using so far to verify that I have some functionality on the LCD.
What pins on the UNO does the emonTX use? I don't have the wifi option. If it uses I2C, then what is it's address? With my luck, I might have an address conflict. I found a diagram here (http://openenergymonitor.org/emon/emontx/reference) that looks like nearly everything is used for the wireless module that I don't have. If this is really the board I have, then it looks like it uses the UART port of the arduino and one interrupt pin.
Re: Arduino ports used
I'm pretty sure you are right about the I²C being the issue, ADC4 and ADC5 pins double up as the SDA/SCL lines and ADC4 is used on the emonTx shield for CT4.
I'm not familiar with stacking arduino shields but can you either remove a ADC4 stacking pin and put the emonTx at the top or remove the burden resistor for CT4, either way you won't be able to use CT4 and I²C.
Paul
EDIT - another option that might be worth investigating is maybe using a software I²C library and mapping I²C away from ADC4 if you must have the display and 4 CT's
Re: Arduino ports used
I found a software version of I2C that allows me to pick two pins for I2C. Which leads me back to my original question. Is there a port map for the shield? Since I am not using the RF portion (it's not on my board at all), those ports should be available. I would think that the port map for the emonTX would be the same as the shield since the emonTX is effectively a shield already glued to an Arduiino. That would also make the sketches and library work the same. Is that a true statement?
Re: Arduino ports used
There isn't a formal port map on the Wiki. The port map for the emonTx is a starting point, but the Shield has some lines selectable by jumpers/links, which are on the circuit diagram. That is accessible from the Wiki, and should give you all the information you need.
Re: Arduino ports used
I ended up using a Mega instead of a Leonardo or Uno. In order to get your shield to fit, I had to use an extra set of pins to create more separation. Your shield doesn't include the SCL and SDA pins on the digital side, so I used another set of pins to raise my LCD and left off the A4 and A5 pins. I jumpered the SCL and SDA pins from the Mega to the LCD. Now that works. I also used some of the other Mega pins and a SparkFun OpenLog to log the data. Everything seems to be working, but I need to verify the current readings. I have the CTs plugged in but they are just sitting on my desk (i.e. not around a powered wire). I am getting apparentPower readings anywhere from 9 to 40 amps.
Re: Arduino ports used
"I am getting apparentPower readings anywhere from 9 to 40 amps."
I don't believe 9 - 40 A unless you have an extremely high current CT connected. Normally, with a 100 A CT and the emonTx calibrated to match, we expect a few hundred mA, i.e. significantly below 1%.
It is a fairly safe bet that what you are seeing is noise. The act of calculating the rms current (and to a much lesser extent the rms voltage) involves squaring the readings, which automatically means that random noise is rectified along with the wanted signal. We believe the noise originates in the digital circuits inside the processor and travels into the analogue side via the analogue reference voltage. There's little you can do about it, other than adding a voltage input and measuring real power, as the main influences are the design and layout of the Arduino board.
It the noise is constant, you can mitigate the effect by subtracting a constant value somewhere - either in the sketch or in emoncms.
Re: Arduino ports used
The power supply is often a source of noise, and that is something you may be able to improve. How are you powering it all?... i.e. where does the 5V come from? Do you have a schematic for the exact Arduino you're using. Have a read of this thread as well: http://openenergymonitor.org/emon/node/10111
Re: Arduino ports used
I am powering the Mega 2560 (not a clone) via the USB port. I am using the 9VAC power supply that came with the shield for Vrms. I am also using four SCT013 100A CTs.
I assume that the readserial is outputting amps and not milliamps since this device isn't really designed for low power measurements. Is it safe to assume that the realPower and apparentPower commands also output amps and not milliamps?
I just had a thought (it hurt, too). I am on a ship, surrounded by metal bulkheads (walls for landlubbers), 480VAC power cables for heaters, fluorescent lights, and computers. Even though the CTs are closed and there are no wires passing through them, do you think that they might be picking up that much noise?
I took about 700 samples at about a one second rate. I removed the first 50 to get rid of the initial power-up values that get averaged out. Irms is ranging from 0 to 1.5 with an average of , realPower is ranging from -7.67 to 14.2, apparentPower is ranging from 0.6 to 181.39. Vrms is ranging from 121.26 to 124.39. CT1 apparentPower seems to be picking up more noise in that, while CT3 had the highest value, the minimum reading for CT1 apparentPower was 25.31. I dumped my data into a spreadsheet.
CT1
realPower
CT1
apparentPower
CT1
Irms
CT1
Vrms
CT2
realPower
CT2
apparentPower
CT2
Irms
CT3
realPower
CT3
apparentPower
CT3
Irms
CT4
realPower
CT4
apparentPower
CT4
Irms
Re: Arduino ports used
If you're using the standard 'discrete samples' sketch, powers are in watts, apparent powers in VA, currents in amps, voltage in volts.
So you're seeing less than 15 W in an input that's good to 12 kW at your system voltage.
As I explained above, apparent power is always more susceptible to noise because all the noise current is rectified and averaged, and not multiplied by the voltage and then averaged as is done for the real power calculation.
One thought: are you running at 400 Hz?
Re: Arduino ports used
Watts. Well I'll be darn. That makes a world of difference. That means what I am seeing is really in the mud. That is great! Thanks!
Re: Arduino ports used
Well, it has to be said that most people measure powers in watts or a multiple (or sub-multiple) thereof!
Re: Arduino ports used
You may find your RMS noise values improve a lot if you power your Arduino via the DC-IN jack, rather than the USB port. At the moment you're at the mercy of the quality of your 5V USB supply. Some of those can be quite low ripple, but generally it's not a requirement for most applications so they aren't. If you power it via the DC-IN jack, you'll get to enjoy the benefits of the Arduino's onboard linear regulator. There's more in that link I posted above.
Re: Arduino ports used
Everything is 60Hz. I am using this for something that I don't think it was really designed for. Nearly all the comments on these forums is regarding measuring power at a house meter or solar panel. In that case, watts reigns supreme. I am more interested in amps since I am digging inside equipment to investigate an intermittent problem. At that point, amps reigns supreme. That is where my head was (and not in a dark, stinky place!) and I wasn't even thinking about watts.
Once I get back to the ship after Christmas, I'll have to try using an alternative power supply.
Thanks for all y'alls help, and y'all have Merry Christmas and a Happy New Year!!


Page not found :(
The page that you're looking for may have been moved or deleted. Make sure to check your spelling.
{% extends "base.html" %}
{% block page_title %}Page not found (404) | {{ super() }}{% endblock %}
{% block page_id %}error{% endblock %}
{% block page_class %}{{ super() }} guides-inner brochure-page{% endblock %}
{% block content %}
Oops
The page that you're looking for may have been moved or deleted. Make sure to check your spelling.


--- layout: page title: About header-img: "img/about-bg.png" ---
I am 25 years old, I produce and compose music, and am just beginning my journey into software engineering and web development in order to open more creative avenues in my life and to improve my life overall. I strive to always be learning and to see the bigger picture of things. Currently I am living in Spokane, WA and originally I am from Baton Rouge, LA.


Upload Policy
Last updated: June 28th, 2018The Museum of ZZT operates with the goal of collecting and sharing as complete a copy of all worlds produced with ZZT and related to ZZT as possible. In order to accomplish this visitors are encouraged to upload their own works as well as the works of others which are currently missing from the Museum.
Acceptable Files
All files uploaded via the upload form must be compressed and in the ZIP archive format.
Uploaded files must contain at least one of the following:
- ZZT World Files.
- Super ZZT World Files.
- ZIG World Files.
- ZZM Audio Files.
- Programs to aid in the creation, modification, or playing of previously listed file types
- Custom palettes or fonts specifically created for the creation of previously listed world files.
- Graphic or Audio Files relating to ZZT or its derivatives (excluding MegaZeux as DigitalMZX covers those).


Be4
Track a Run
The motivation needed to hit the ground running is just a click away!
Attention!
x
Please only type in the city without comma (,) and state.
Submit
It's a beautiful day to lace up your shoes and see the world!
The temperature is
Look up and you'll see
The humidity is
The wind is blowing at


Moving on to Seasar by H.Ozawa
In our earlier examples, we've seen how using interfaces can make the "Hello World" program flexible. In this page, we'll see how using Seasar can make the program more maintainable.
We'll be using the same Greeting.java, GreetingClient.java, and GreetingClientImpl.java as in Why Use Interfaces? page.
We'll just change GreetingImpl.java to output "3 Hello World" this time.
(GreetingImpl.java)
public class GreetingImpl implements Greeting {
public String greet() {
return "3 Hello World!"; // output message
}
}
Seasar is a DI container with AOP. What this means is that we can define variables types in an external configuration file. This external configuration file is most often a xml like the Greeting.dicon file below. It is a convention to use file extension "dicon" for Seasar extension file. Abiding by convention make our program more manageable as we'll see later on.
Line <component name="greeting" class="examples3.GreetingImpl"> tells Seasar that variable "greeting" is of class "examples3.GreetingImpl". In the same manner, line <component name="greetingClient" class="examples3.GreetingClientImpl"> tells Seasar "greetingClient" is of class "examples3.GreetingClientImpl".
Line <property name="greeting">greeting</property> tells "greetingClient" has a property "greeting".
(Greeting.dicon)
What the application program now have to do is to read in the configuration file , get an instance of an implementation of an interface, and invoke a method in the instance. In this example, configuration file is "Greeting.dicon", the interface we want to use is "GreetingClient", an implementation of this interface is "GreetingClientImpl", an instance of this implementation is "greetingClient" (as we defined in the configuration file), and the method to invoke in this interface is "execute()".
(HelloWorld3.java)
import org.seasar.framework.container.S2Container;
import org.seasar.framework.container.factory.S2ContainerFactory;
import org.seasar.framework.util.ResourceNotFoundRuntimeException;
public class HelloWorld3 {
// relative path of the configuration file
private static final String CONFIGURE_PATH = "Greeting.dicon";
public static void main(String[] args) {
try {
// create an Seasar container using the configuration file
S2Container container = S2ContainerFactory.create(CONFIGURE_PATH);
// get instance of "greetingClient" from the container
GreetingClient greetingClient
= (GreetingClient) container.getComponent("greetingClient");
greetingClient.execute(); // output the message
} catch (ResourceNotFoundRuntimeException e){
System.out.println("Configuration file \"" + CONFIGURE_PATH + "\" not found.");
}
}
}
Execution result:
To run the example, first open the examples3.bat with a text editor and set the path of S_LIB to the lib folder of seasar2.
Remember, to use Seasar, following jar files are required in the classpath.
Additionally, following properties file is also required.
log4j.properties
We could add these jar files in the operating system environmental variable or specify them when invoking javac and java.
(examples3.bat)
@echo off
REM change the path below to where Seasar2 was extracted
SET S_LIB=C:\seasar2\lib
SET SCLASSPATH=%S_LIB%\javassist.jar;%S_LIB%\commons-logging.jar;
%S_LIB%\log4j-1.2.8.jar;%S_LIB%\ognl-2.6.5.jar;%S_LIB%\aopalliance.jar;
%S_LIB%\servlet-api.jar;%S_LIB%\s2-framework-2.3.0.jar;%S_LIB%\log4j.properties
javac -cp .;%CLASSPATH%;%SCLASSPATH% -d examples3 examples3\*.java
cd examples3
java -cp .;%CLASSPATH%;%SCLASSPATH% examples3.HelloWorld3
cd ..
Execute the "examples3.bat" file that is included with the source code. Trace with the message "3 Hello World!" is outputted to the console.
Now, we only have to change the configuration file to change the implementation. That is, we won't have to recompile the Java codes! Let's change the implementation of Greeting to Greeting2Impl.
(Greeting.dicon)
Execution result after the change:
To run the example, execute the "examples3.bat" file that is included with the source code. Trace with the message "3b Hello World!" is outputted to the console.
In this example, we'll apply an aspect to output a trace the process. Only the Greeting.dicon file needs to be modified. All other files are the same as the last example above.
Lines to trace is in maroon. Line <include path="aop.dicon"/> reads in aop.traceInterceptor that will output the trace. Line <aspect>aop.traceInterceptor</aspect> applies the aop.traceInterceptor to the component (variable) it is included in.
(Greeting.dicon)
Execution result:
To run the example, we need to add file aop.dicon file which we specified in the Greeting.dicon file. In the source code file available above, it's in the root folder.
Execute the "examples4.bat" file that is included with the source code.
This seems to be convenient but in the production application system, there are many classes. This means we'll have to write and write xml configuration files. This is not fun. This is where convention comes in. If we stick to a convention, we could just tell Seasar to define all instances of all Java classes in a folder with a specific file name.
First, we'll create folders "dicon", "impl", and "main" for dicon files, implementation files, and applications files respectively and move the respective files into the folders as below:
All except the Greeting.dicon is the same as the above example.
Configuration Greeting.dicon is changed as below to make Seasar automatically associate variables with object types.
Lines <component class="org.seasar.framework.container.autoregister.FileSystemComponentAutoRegister"> and <component class="org.seasar.framework.container.autoregister.AspectAutoRegister"> tells to associate classes and aspects respectively.
Line <initMethod name="addClassPattern"> is used to specify which files to use to generate associations.
Lines <arg>"examples4.impl"</arg> and <arg>".*Impl"</arg> tells to use all files with file name ending with "Impl" in folder "examples4.impl".
Line <initMethod name="registAll"/> tells to
actually tell Seasar to generate associations for these files.
Aspect is specified in the same manner as the example above.
(Greeting.dicon)
There isn't a major change in HelloWorld program except a try { - } finally { block was inserted to explictly clean up the container. When using automatic generation, line container.destroy(); is necessary in the try - finally block so the .destroy() method will be executed even when there is an exception.
(HelloWorld5.java)
Execution result:
To run the example, first open the examples5.bat with a text editor and set the path of S_LIB to the lib folder of seasar2.
(examples5.bat)
@echo off
REM change the path below to where Seasar2 was extracted
SET S_LIB=C:\seasar2\lib
SET SCLASSPATH=%S_LIB%\javassist.jar;%S_LIB%\commons-logging.jar;
%S_LIB%\log4j-1.2.8.jar;%S_LIB%\ognl-2.6.5.jar;%S_LIB%\aopalliance.jar;
%S_LIB%\servlet-api.jar;%S_LIB%\s2-framework-2.3.0.jar;%S_LIB%\log4j.properties
javac -cp .;%CLASSPATH%;%SCLASSPATH% -d examples5 examples5\*.java
javac -cp .;%CLASSPATH%;%SCLASSPATH% -d examples5 examples5\main\*.java
javac -cp .;%CLASSPATH%;%SCLASSPATH% -d examples5 examples5\impl\*.java
cd examples5
java -cp .;dicon;%CLASSPATH%;%SCLASSPATH% examples5.main.HelloWorld5
cd ..
Execute the "examples5.bat" file that is included with the source code.
Seasar has more features to make application system development easier. Additionally, Seasar has many family software like S2Struts and S2Hibernate to enable us to use many deFacto software.